General
Button to turn Fader on and off
Started by Kaatza_Music on .
Sign in or create an account to join the conversation.
Pretty simple question. I want an on/off switch for my Fader which turns it off as if it doesn't exist, not set it to 0.
So what is the easiest approach, have the switch turn the MIDI output from it's assigned value to MIDI disabled? What is the value for MIDI disabled for a Fader? I assume the script would be in the Switches object and that it would reference the Fader it is linked to. So how do I switch it from MIDI 0 to Disabled in the Fader?
Thanks,
So what is the easiest approach, have the switch turn the MIDI output from it's assigned value to MIDI disabled? What is the value for MIDI disabled for a Fader? I assume the script would be in the Switches object and that it would reference the Fader it is linked to. So how do I switch it from MIDI 0 to Disabled in the Fader?
Thanks,
You cannot switch midi mapping on-off. You CAN however create a custom expression that will only operate (change values) if a condition statement is true in a script.
for example
Create a switch.
create in fader expression c, leave it blank.
create in fader script, on expression x, any
for example
Create a switch.
create in fader expression c, leave it blank.
create in fader script, on expression x, any
If (Switch_name.x==1) c=x;Softcore,
I entered it just like you said, but it doesn't seem to be working. Whether the switches is on or off, the MIDI data is still be transmitted by the Fader.
I thought I did everything right. Both the expression and the script go in the Fader correct? Nothing goes in the Switches?
I created an expression in the Fader called "c" and left everything else blank.
I created a script in the Fader:
act()
On expression
x
any
if (Switches_name.x==1) x=c;
The script went black like there were no errors, but it just doesn't work.
Any idea what I did wrong? Thanks!
I entered it just like you said, but it doesn't seem to be working. Whether the switches is on or off, the MIDI data is still be transmitted by the Fader.
I thought I did everything right. Both the expression and the script go in the Fader correct? Nothing goes in the Switches?
I created an expression in the Fader called "c" and left everything else blank.
I created a script in the Fader:
act()
On expression
x
any
if (Switches_name.x==1) x=c;
The script went black like there were no errors, but it just doesn't work.
Any idea what I did wrong? Thanks!
oooopssssss....sorry for that....
I should have written:
I should have written:
if (Switches_name.x==1) c=x;
EDIT: I HAD written c=x; you just typed it wrong (x=c)Looks to be working...here's my testing project....
Of course, needless to say, you will have to Midi/OSC map the "c" expression, not the default x

fader_on-off.jzml
Of course, needless to say, you will have to Midi/OSC map the "c" expression, not the default x
fader_on-off.jzml
I think I understand what you are doing now. I will try it out. Thanks once again for the help.
Had plenty of time to fool around with it....
So....when you disable the fader (switch is off) we start to have unequal values for c,x. This means, that upon re-enabling the fader and moving it, the transmitted value (c) "jumps" to current fader position (x).
The improved "didnt know what to do with my time this morning" version features a handy display to show that x!=c and by clicking on it you manually re-sync them!
The feature can also be used for fast "jumps" between the current fader position and the position just before that (by tapping on the "arrow" buttons)
have fun!
fader_on-off-reset.jzml
So....when you disable the fader (switch is off) we start to have unequal values for c,x. This means, that upon re-enabling the fader and moving it, the transmitted value (c) "jumps" to current fader position (x).
The improved "didnt know what to do with my time this morning" version features a handy display to show that x!=c and by clicking on it you manually re-sync them!
The feature can also be used for fast "jumps" between the current fader position and the position just before that (by tapping on the "arrow" buttons)
have fun!
fader_on-off-reset.jzml
Ok lol - another idea lol
Hitting the left arrow resets c to fader, hitting the right arrow reset fader to c....
better try it to see the difference....lol....Im out for today!
fader_on-off-reset-2options.jzml
BTW in both the two last versions I ve made extra steps in the scripts jsut to make sure moving around the fader or resizing doesnt "break" the functionality...the "moving" of the arrows is always relative to the size and position of the fader.
Hitting the left arrow resets c to fader, hitting the right arrow reset fader to c....
better try it to see the difference....lol....Im out for today!
fader_on-off-reset-2options.jzml
BTW in both the two last versions I ve made extra steps in the scripts jsut to make sure moving around the fader or resizing doesnt "break" the functionality...the "moving" of the arrows is always relative to the size and position of the fader.
Hey, Softcore,
I ended up using your original version and it is working perfectly for what I wanted. Thanks once again for the help.
I ended up using your original version and it is working perfectly for what I wanted. Thanks once again for the help.
Still dont like the fact that in the first version you are gonna have a value jump which is unpredictable.
here's a more elegant solution: whne the fader is disabled (switch is off) the fader is LOCKED to its position - even if you move it it returns to its initial value untill you enable it again.
I think now we have covered all the posible usage scenarios for future members
fader_on-off-lock.jzml
EDIT: This last one can also be used as a fader with "auto-reset" and "learn" function by mapping x instead of c. You engage the switch and move the fader to the desired "reset" value. After disengaging the switch you can move tha fader and it will always return to that "reset" value previously entered.
here's a more elegant solution: whne the fader is disabled (switch is off) the fader is LOCKED to its position - even if you move it it returns to its initial value untill you enable it again.
I think now we have covered all the posible usage scenarios for future members
fader_on-off-lock.jzml
EDIT: This last one can also be used as a fader with "auto-reset" and "learn" function by mapping x instead of c. You engage the switch and move the fader to the desired "reset" value. After disengaging the switch you can move tha fader and it will always return to that "reset" value previously entered.