thopa
2014-04-23 22:50:36
I have a button that controls mute on / off of a channel in Ableton, it has a led. The led colour responds to the velocity received. 10 is white and 20 is yellow.
If the channel is muted then the button receives the message 9a 01 10, white
If the channel is unmuted then the button receives the message 9a 01 20, yellow
I created a shift button (9a 02 pp) that when is pressed it triggers a timer (TIMER1) that changes the Led colour to red while having the shift button pressed, also changing what message the button sends (so i can trigger loop recording in ableton)
Input 9a 02 pp
if pp=127 then g0=1
if pp=0 then g0=0
OUTPUT TIMER1
Another translator that changes the led to red depending on if the shift button is pressed or not:
Input TIMER1
if g0=1 then pp=10
if go=1 then pp=50
OUTPUT 9a 01 pp
And another translator is triggered when i release the shift button, that is meant to return the led to it original state, on or off. For this i tried creating a global variable that holds a value depending on the state of the led, on or off:
Store Value Translator
Input 9a 01 pp
if pp=10 then ga=0
if pp=20 then ga=1
Out:NONE
And finally the translator that tells the led what state it was originally depending on the global variable ga
if ga=0 then pp=10
if ga=1 then pp=20
Out 9a 01 pp
Basically want i want to do is have the shift button change the led colour and midi message, so i can trigger loop recording, and then when i release the shift button the led goes back to its original state, on or off.
I haven’t been using homes for too long, i bet there is a way to store the value of the led button originally, band when the shift button is released send that value back to the led.
Thanks a lot!!
If the channel is muted then the button receives the message 9a 01 10, white
If the channel is unmuted then the button receives the message 9a 01 20, yellow
I created a shift button (9a 02 pp) that when is pressed it triggers a timer (TIMER1) that changes the Led colour to red while having the shift button pressed, also changing what message the button sends (so i can trigger loop recording in ableton)
Input 9a 02 pp
if pp=127 then g0=1
if pp=0 then g0=0
OUTPUT TIMER1
Another translator that changes the led to red depending on if the shift button is pressed or not:
Input TIMER1
if g0=1 then pp=10
if go=1 then pp=50
OUTPUT 9a 01 pp
And another translator is triggered when i release the shift button, that is meant to return the led to it original state, on or off. For this i tried creating a global variable that holds a value depending on the state of the led, on or off:
Store Value Translator
Input 9a 01 pp
if pp=10 then ga=0
if pp=20 then ga=1
Out:NONE
And finally the translator that tells the led what state it was originally depending on the global variable ga
if ga=0 then pp=10
if ga=1 then pp=20
Out 9a 01 pp
Basically want i want to do is have the shift button change the led colour and midi message, so i can trigger loop recording, and then when i release the shift button the led goes back to its original state, on or off.
I haven’t been using homes for too long, i bet there is a way to store the value of the led button originally, band when the shift button is released send that value back to the led.
Thanks a lot!!