PRESET HELP ! Stack overflow in UMENU

May 19, 2011 at 11:35am

PRESET HELP ! Stack overflow in UMENU

I want to be able to both click on a preset and it SHOW the name of the preset in a UMENU +++ AND+++ Be able to select an item in that same UMENU and have the preset change…
BUT I am getting a “Stack Overflow” warning with the way I have it set up…
Any suggestions ?


  1. presettest.maxpat
May 19, 2011 at 12:23pm

Have a look to the set message:

– Pasted Max Patch, click to expand. –
May 19, 2011 at 12:26pm

I pasted youre code… But it is only a preset object

May 19, 2011 at 3:35pm

as ej said, use the “set $1″ message. this is the same in many cases where you want to have visual feedback *back* to an object after a number comes out (like if you want a slider to go into a number box, but changing the number box also sets the slider level). Without “set” in the loop, you’re choosing a umenu number, it goes into the preset and selects it, the preset sends the number out into the umenu, it sends it back into preset, etc… not allowed. Put “set $1″ between preset and umenu so that the umenu actually selects the preset (which is the overall goal) but when you click a preset, it will only *set* the umenu selection.

Also, umenu counts from 0, but preset counts from 1, so you will need to use +1 and -1 respectively.

May 19, 2011 at 3:43pm
– Pasted Max Patch, click to expand. –
May 20, 2011 at 1:30pm

Thanks !

May 27, 2011 at 5:07pm

oups… sorry… it was probably to early to write on the forum ;-) seejayjames example is what I was thinking about.


You must be logged in to reply to this topic.