Help with multi line script - multiple Fader defaults
Posted: 16 Feb 2013 13:34
Softcore helped me with a script to make a Fader snap back to a default value:
act()
On Expression
z
mode - leave or reach zero
Script
CC19.x=0.475362
It works great. The problem I have, is several instruments use the same Fader, but have different default settings. What I would like to do is have a Switches with 4 rows and 1 column with radio turned on so I can use it to select one of 4 Instruments. I would like the Fader default to be controlled by the Switches with a multi line script so that whatever Instrument is selected by the radio button, that instrument's default setting are loaded by the fader.
I don't have a clue how to write this script, I've read the manual and couldn't figure it out. So don't laugh, but this is just to kind of illustrate what I am trying to do. Obviously the script is not written correctly, if anyone could help me correct the coding for this to make it work,it would be appreciated.
Object being controlled by the script is a Fader linked to Switches
act()
On Expression
z
mode - leave or reach zero
Script
if Switches,radio.on.selected,'name'='Trumpet' CC19.x=0.3 ;
else if Switches,radio.on.selected 'name'='Trombone' CC19.x=0.4 ;
else if Switches,radio.on.selected,'name'='Horn' CC19.x=0.5 ;
else if Switches,radio.on.selected,'name'='Tuba' CC19.x=0.6 ;
I have no idea how you link the radio on value to which of the 4 buttons is selected.
act()
On Expression
z
mode - leave or reach zero
Script
CC19.x=0.475362
It works great. The problem I have, is several instruments use the same Fader, but have different default settings. What I would like to do is have a Switches with 4 rows and 1 column with radio turned on so I can use it to select one of 4 Instruments. I would like the Fader default to be controlled by the Switches with a multi line script so that whatever Instrument is selected by the radio button, that instrument's default setting are loaded by the fader.
I don't have a clue how to write this script, I've read the manual and couldn't figure it out. So don't laugh, but this is just to kind of illustrate what I am trying to do. Obviously the script is not written correctly, if anyone could help me correct the coding for this to make it work,it would be appreciated.
Object being controlled by the script is a Fader linked to Switches
act()
On Expression
z
mode - leave or reach zero
Script
if Switches,radio.on.selected,'name'='Trumpet' CC19.x=0.3 ;
else if Switches,radio.on.selected 'name'='Trombone' CC19.x=0.4 ;
else if Switches,radio.on.selected,'name'='Horn' CC19.x=0.5 ;
else if Switches,radio.on.selected,'name'='Tuba' CC19.x=0.6 ;
I have no idea how you link the radio on value to which of the 4 buttons is selected.