Combine data to list


    Nov 18 2010 | 12:06 am
    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.

    • Nov 18 2010 | 12:16 am
      This is abstract enough that you really do need to provide some kind of example patch of what you're doing.
    • Nov 18 2010 | 1:44 am
      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.
    • Nov 18 2010 | 1:46 am
      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!
    • Nov 18 2010 | 3:15 am
      By the way, I'm sharing the patch at Maxforlive.com if anyone need a way to midimap fold/unfold group