Page 1 of 1

Need help with Menu

Posted: 08 Apr 2013 01:03
by electrofux
Hi,

i have a Problem with the Menu Object. I have a button, a Menu and a global variable that saves the index of the currently selected Menu item when the button is pushed.

The menu sets the text of a couple of Knobs according to the selection (i am selecting a Fx device for Send 1 in Reason with that Menu). I have a second menu that does the same for Send 2 (sets the text of the device in Send 2 in Reason) so i need a way to reset the first menu. Thats what the button was meant for. I want it to take the index of Menu1 then set Menu1 to 0 and then back to the index so all text is set to the original setting for Menu1.

The script in the button looks like this:

sel1=Menu1.selection;
Menu1.selection=0;
Menu1.selection=sel1;

When i put in lets say 5 instead of sel1 the Menu jumps to 5 like expected and it sets the text to what is specified under index 5. Most likely it ignores the jump to 0 and just jumps to sel1 on which it is already sitting so the text setting scripts dont get triggered again. How do i make it to go to 0 and then to sel1? Some kind of wait in between to give it more time?

Re: Need help with Menu

Posted: 08 Apr 2013 07:01
by Softcore
Not really sure what you are doing but if you are using a pad as the button the quickest - easiest way would be to set menu to 0 on x rising from zero (up arrow) and then create a second script on expression x dropping to 0 (down arrow) to re-set to index. Furthermore, by using the "release" setting in the pad you can specify the time delay during which those two re-settings will happen.

Re: Need help with Menu

Posted: 08 Apr 2013 13:49
by electrofux
Ok got it figured out. I had to put all the set text into the button. For some reason the push/release solution didn't work. Anyways it works now.