Combine data to list

Nov 18, 2010 at 12:06am

Combine data to list

Hi.
I’m trying to make at patch that will let you select a grouptrack to fold/unfold (something that will make it possible to midimap fold/unfold groups).
My plan is to first get all tracks, then use the is_foldable to check which one of the tracks that is group-tracks, and send these to a umenu item, so it’s possible for me to choose which grouptracks i want to fold/unfold.
My problem is that after finding the grouptracks, i can’t find a way to combine these to a list before sending them to the umenu. I know this probably is a stupid problem, but I’m quite new to this, so it’a problem even if it’s stupid….
I’ve thought about splitting “id” and the id-number, then use zl.stream on both before combining the two list with zl.lace. But that didn’t work out since i have to know how many numbers to combine with zl.stream, before combining them.
Hope anyone can help me with this problem.

#53383
Nov 18, 2010 at 12:16am

This is abstract enough that you really do need to provide some kind of example patch of what you’re doing.

#192050
Nov 18, 2010 at 1:44am

Just iterate and process them one by one.

No need to combine them; unlike the live.menu object umenu supports appending to what is already there.

So you can safely setup a routine to handle any id’s coming out (for example; I can imagine that using the track name is easier than merely displaying an ID ;-)) and add the result right into the menu.

#192051
Nov 18, 2010 at 1:46am

Jesse: Sorry for wasting time with this question! I should have done that at once. Problem was just that the patch was a mess at that time after hours of frustrated max building.
A friend of mine who’s a max programmer called and problem solved.

ShelLuser: Thanks very much. that’s another solution that i ended up with, but seems to work better than mine!

#192052
Nov 18, 2010 at 3:15am

By the way, I’m sharing the patch at Maxforlive.com if anyone need a way to midimap fold/unfold group

http://www.maxforlive.com/library/device.php?id=448

#192053

You must be logged in to reply to this topic.