3 Interacting Buttons Script. Help!
Posted: 19 Jul 2014 04:22
Hi everyone,
I'm fairly new to Lemur, and I'm having trouble with a particular script. I want to have three buttons, and have each button output different midi note on/off messages based on the current status of the other two buttons.
So, in other words, when the #1 button is pressed, I want it to query the #2 button and the #3 button and output accordingly based on the status of buttons #2 and #3. So there would be 7 different possible midi notes sent, as there are 7 different possible combinations of off/on that the three buttons could be in at any given time. I also want the same thing to occur whenever a button is turned off as well.
I've successfully done this with two buttons, which I've attached below, but adding a third button seems to complicate things. I think if I could see the proper way to script "when I press button 1, if button 2 and 3 are off then output C1, but if button 2 is on but 3 is off then output D1 etc" then I could probably figure out the rest. I hope I'm explaining this sufficiently. I've searched and searched and my brain is numb. Any help would be much appreciated. Thanks so much!
-craig
I'm fairly new to Lemur, and I'm having trouble with a particular script. I want to have three buttons, and have each button output different midi note on/off messages based on the current status of the other two buttons.
So, in other words, when the #1 button is pressed, I want it to query the #2 button and the #3 button and output accordingly based on the status of buttons #2 and #3. So there would be 7 different possible midi notes sent, as there are 7 different possible combinations of off/on that the three buttons could be in at any given time. I also want the same thing to occur whenever a button is turned off as well.
I've successfully done this with two buttons, which I've attached below, but adding a third button seems to complicate things. I think if I could see the proper way to script "when I press button 1, if button 2 and 3 are off then output C1, but if button 2 is on but 3 is off then output D1 etc" then I could probably figure out the rest. I hope I'm explaining this sufficiently. I've searched and searched and my brain is numb. Any help would be much appreciated. Thanks so much!
-craig