Old 10-14-2013, 07:42 AM   #1
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 274
Default Automate Presets by Scripts ?

Hi
I wonder if is possible to automate,change the presets by scripts in one track along the time of the song
I have discovered in Actions there are several about presets SWS/S&M but all are referent Trigger next or previous but none to specific preset
Is possible to do a script that trigger a specific number of preset of the preset list of the plugin inserted,JS Vst Au or Cockos ?
A script that launches a window where you can set at when time of the song must be change,automate the number of the new preset or something similar

Regards
Mario
reapertribal is offline   Reply With Quote
Old 10-14-2013, 08:30 AM   #2
Breeder
Human being with feelings
 
Join Date: Nov 2010
Posts: 1,809
Default

You could create basic scripts to change presets with
Code:
REAPERAPI_DECL bool (*TrackFX_SetPreset)(MediaTrack* track, int fx, const char* presetname);
and then use SWS marker actions to call them at specific point in time.

However, what I would recommend (and do my self) is to use SWS live configs which you can trigger from dedicated MIDI track and send to Reaper with this nice plug made by Jeffos: http://forum.cockos.com/showthread.php?t=43741
Breeder is offline   Reply With Quote
Old 10-14-2013, 10:55 AM   #3
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 274
Default

Hi
Breeder thanks to your great tips
I did not know marker actions,powerful tool
You suggest me two options:
One seems easiest,the script with the marker action and the other more sophisticated and complicated
I have seen its links and is very difficult to my understanding capacity,very complex language
It would be better please if one day, if you feel bored and have free time to make one gif video showing how do you get to change the presets with the sophisticated method,sometimes an image has more value than a thousand words,in this case a image in movement (gif video,LiCEcap,a treasure of Reaper)
I have tried with the script and it gives this error :

ReaScript error: Presetname.py

Script execution error

Traceback (most recent call last):
File "Presetname.py", line 1
REAPERAPI_DECL bool (*TrackFX_SetPreset)(MediaTrack* track, int fx, const char* presetname);
^
SyntaxError: invalid syntax


Thanks
Mario
Attached Images
File Type: jpg Presetname.jpg (42.7 KB, 53 views)
reapertribal is offline   Reply With Quote
Old 10-15-2013, 07:04 AM   #4
Breeder
Human being with feelings
 
Join Date: Nov 2010
Posts: 1,809
Default

It's not a script per se, I just pasted the function from reaper_plugin_functions.h to show it is possible

This would be the simplest example without knowing what you need exactly:
Code:
track = RPR_GetSelectedTrack(0, 0) # Get first selected track
RPR_TrackFX_SetPreset(track, 0, "preset name") # 0 means first FX in the chain, 1 would be second etc..."preset name" is the exact name of the preset you need
Hmm...live configs. What exactly do you need it for? I use it in it's most basic form. Each track is set with certain settings and FXs to reproduce a desired sound (guitar in my case).
Then, with live configs I mute all of them but the active one. In tandem with reaper settings it makes muted tracks use 0% CPU
Since I don't need a tons of presets I can live with separate track for each...it lets me use a bunch of different stuff and it's quite easy to edit when needed.

I use midi controller to change configs, but as pointed out earlier you can use plug by Jeffos to control it from a track.
You could also use preload/fx chain/fx preset features etc...It really depends on what do you want to use it for so I guess I need more info from you

Last edited by Breeder; 10-15-2013 at 07:20 AM.
Breeder is offline   Reply With Quote
Old 10-15-2013, 10:56 AM   #5
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 274
Default

Hi
Breeder thanks to your help

*** track = RPR_GetSelectedTrack(0, 0) # Get first selected track
††† What is the meaning of the first 0 and the second 0 ?
First 0 is the title,the name of the track and second 0 is the track number of the project?
If yes then 0 is the first track,1 the second,2 the third.....

*** RPR_TrackFX_SetPreset(track, 0, "preset name")
# 0 means first FX in the chain, 1 would be second etc...
"preset name" is the exact name of the preset you need
††† This is very clear

Please see the gif (you and all the members of the forum) and let me know what i am doing wrong because when i play the cursor from the start of the song stops in the marker action and the preset does not change




Regards
reapertribal is offline   Reply With Quote
Old 10-15-2013, 10:58 AM   #6
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 274
Default

Hi
Breeder thanks to your help

*** track = RPR_GetSelectedTrack(0, 0) # Get first selected track
††† What is the meaning of the first 0 and the second 0 ?
First 0 is the title,the name of the track and second 0 is the track number of the project?
If yes then 0 is the first track,1 the second,2 the third.....

*** RPR_TrackFX_SetPreset(track, 0, "preset name")
# 0 means first FX in the chain, 1 would be second etc...
"preset name" is the exact name of the preset you need
††† This is very clear

Please see the gif (you and all the members of the forum) and let me know what i am doing wrong because when i play the cursor from the start of the song it pass across the marker action and the preset does not change




Regards
reapertribal is offline   Reply With Quote
Old 10-15-2013, 11:06 AM   #7
Breeder
Human being with feelings
 
Join Date: Nov 2010
Posts: 1,809
Default

Quote:
Originally Posted by reapertribal View Post
*** track = RPR_GetSelectedTrack(0, 0) # Get first selected track
††† What is the meaning of the first 0 and the second 0 ?
First 0 is the title,the name of the track and second 0 is the track number of the project?
If yes then 0 is the first track,1 the second,2 the third.....
First zero denotes project in which you wish to run the action. 0 means active project
Second zero is index based number of Nth selected track. If you have 5 tracks selected 0 would mean 1st selected track, 1 would mean 2nd selected etc...
It's all described in ReaScript documentation (Help->HTML lists) and you should definitely check it out if you want to learn ReaScript (use find functionality of your browser to search for keywords of the stuff you need)

Of course, it doesn't have to work that way (selected track only)...it really depends on what you want to do.

Quote:
Originally Posted by reapertribal View Post
let me know what i am doing wrong because when i play the cursor from the start of the song stops in the marker action and the preset does not change
Right click your .py script and Copy selected action cmdID/identifier string. Use that instead of ReaEQ 1
Breeder is offline   Reply With Quote
Old 10-15-2013, 11:28 AM   #8
reapertribal
Human being with feelings
 
reapertribal's Avatar
 
Join Date: Apr 2013
Location: Spain
Posts: 274
Default

Hi
Breeder a lot of thanks,now works perfect and i have understood your explanations about the meanings of the numbers of the script



*I wrote the name of my custom action instead the cmd because i read in http://www.standingwaterstudios.com/markeractions.php :
If you want to run a custom action or an extension action, use the action name instead of # from the Reaper actions dialog, eg !_SWS_SNAPSHOT_GET1.

***It's all described in ReaScript documentation (Help->HTML lists) and you should definitely check it out if you want to learn ReaScript
Yes,you have all the reason,i did not know Help-Reascript Documentation,is amazing the amount of Reaper Api Functions

Thanks Breeder

Last edited by reapertribal; 10-15-2013 at 11:51 AM.
reapertribal is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.