umenu and coll

Sep 26, 2009 at 8:39am

umenu and coll

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 ?

Thank’s

#45623
Sep 26, 2009 at 1:38pm

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.

#164573
Sep 29, 2009 at 7:38am

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.

Cheers

#164574
Sep 29, 2009 at 10:42am

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

– Pasted Max Patch, click to expand. –
#164575
Sep 29, 2009 at 11:27am

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

#164576
Sep 29, 2009 at 12:55pm

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.)

l&k
j2k

#164577
Jan 9, 2010 at 4:58am

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!

#164578
Jan 9, 2010 at 5:35am

try this

– Pasted Max Patch, click to expand. –
#164579
Jan 12, 2010 at 6:27pm

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

#164580
Jul 2, 2013 at 3:18pm
– Pasted Max Patch, click to expand. –
#254772
Jul 3, 2013 at 12:32pm

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

#254880

You must be logged in to reply to this topic.