Forums > MaxMSP

umenu and coll

Sep 26 2009 | 8:39 am

Hi Maxers !

I’m using an [umenu] and I know it has a feature to autopopulate and a "prefix" attribute/message which allows to autopopulate from a folder for example.

And I was wondering if there’s a way to autopopulate the [umenu] directly from a [coll]. I have one good reason to do that : in a [coll], you can retrieve an element with a symbol. Thing you cannot do (as far as I know) with a [umenu]. So it would be very nice to have my [umenu] always in sync with my [coll].

Do you know how to do something like this ?


Sep 26 2009 | 1:38 pm

There’s quite a few messages the can be used to fill umenu dynamically. First ‘clear’ the umenu, ‘dump’ the content of coll and ‘append’ each item in the menu. The umenu can by the way be search using symbols. I believe that set does this, but check the reference for that.

Sep 29 2009 | 7:38 am

Hi !

Yes, actually you can access the menu items with their names using the message "symbol" followed by the name of the item. But my main problem is that you cannot do the same to delete an item. I have a system which populates and deletes [umenu] items when launching and closing patches. And each patch is identified by its name. But in the [umenu] you need to know the item number (ie. the order of appearance of the patches) to be able to delete the item. This is where I use the [coll]: to keep somewhere the association between a name and the item number.
I did managed a way (with "append", you’re right and other messages) to keep manually the [umenu] and the [coll] in sync. But I was wondering if there was some more elegant way to do it ;o)

I’ll post my patch soon. Maybe it will be useful for a maxer to take it as it is and don’t bother rebuilding such a sync.


Sep 29 2009 | 10:42 am

You could grab the info from the menu to retrieve the item number.

-- Pasted Max Patch, click to expand. --
Sep 29 2009 | 11:27 am

like for most things on this world i have an abstraction for that.

Sep 29 2009 | 12:55 pm

Glad to see others do this: a patch very similar to Roman’s is in my commonly used clippings…very useful!
The question: will it work with the new Live menus in Max4Live?
We shall see.
(or someone will let us know, whichever comes first.)


Jan 09 2010 | 4:58 am

I am also working on something very similar. I would be very interested in seeing how you did the management of umenu and coll together!

Jan 09 2010 | 5:35 am

try this

— Pasted Max Patch, click to expand. —
Jan 12 2010 | 6:27 pm

could you post the patch above with copy compressed? For some reason when i try to load this patch it crashes max!?

Jul 02 2013 | 3:18 pm
— Pasted Max Patch, click to expand. —
Jul 03 2013 | 12:32 pm

hey, thanks bwagner.. that is just what the dr. ordered.

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

Forums > MaxMSP