Button to turn Fader on and off
-
- Newbie
- Posts: 27
- Joined: 10 Feb 2013 16:16
Button to turn Fader on and off
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,
Leon Portelance, aka The Katz, B of Mus.
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
Re: Button to turn Fader on and off
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
Code: Select all
If (Switch_name.x==1) c=x;
-
- Newbie
- Posts: 27
- Joined: 10 Feb 2013 16:16
Re: Button to turn Fader on and off
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!
Leon Portelance, aka The Katz, B of Mus.
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
Re: Button to turn Fader on and off
oooopssssss....sorry for that....
I should have written:
EDIT: I HAD written c=x; you just typed it wrong (x=c)
I should have written:
Code: Select all
if (Switches_name.x==1) c=x;
Last edited by Softcore on 23 Feb 2013 12:13, edited 1 time in total.
Re: Button to turn Fader on and off
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
Of course, needless to say, you will have to Midi/OSC map the "c" expression, not the default x
-
- Newbie
- Posts: 27
- Joined: 10 Feb 2013 16:16
Re: Button to turn Fader on and off
I think I understand what you are doing now. I will try it out. Thanks once again for the help.
Leon Portelance, aka The Katz, B of Mus.
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
Re: Button to turn Fader on and off
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!
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!
Re: Button to turn Fader on and off
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!
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!
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.
-
- Newbie
- Posts: 27
- Joined: 10 Feb 2013 16:16
Re: Button to turn Fader on and off
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.
Leon Portelance, aka The Katz, B of Mus.
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
composer . songwriter . producer
Website - IMDb - Vinny's Last Ride
Re: Button to turn Fader on and off
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
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
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.