Forums > MaxMSP

PRESET HELP ! Stack overflow in UMENU

May 19, 2011 | 11:35 am

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 | 12:23 pm

Have a look to the set message:

— Pasted Max Patch, click to expand. —
May 19, 2011 | 12:26 pm

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

May 19, 2011 | 3:35 pm

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 | 3:43 pm
— Pasted Max Patch, click to expand. —
May 20, 2011 | 1:30 pm

Thanks !

May 27, 2011 | 5:07 pm

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

Viewing 7 posts - 1 through 7 (of 7 total)

Forums > MaxMSP