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 ?

[attachment=162626,2265]

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

Have a look to the set message:

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

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

#204899
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.

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

Thanks !

#204902
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.

#204903

You must be logged in to reply to this topic.