api to get track names inside a umenu?

Aug 8, 2010 at 1:19pm

api to get track names inside a umenu?

i know where the api’s are… but i cant seem to find the right one…

thanks

#51628
Aug 8, 2010 at 6:14pm

You have a couple of options:

I’m using JavaScript for some of my work and I ended up setting an observer via the LiveAPI calback. I set up a series of listenters for all of the properties. When the event comes through the message consistes of name [tracck name]. From there I do an tthis.id and send the message on from there.

I hope that helps give you a scetch of how I sovled the problem.

Thanks,
Brett

#185256
Aug 9, 2010 at 11:00am

isnt there a simpler way?
have a look at the puremagnetik patches..
you first choose a track, then a device of the track, then its parameter..
thats exactly how i need it too

#185257
Aug 9, 2010 at 3:26pm

Hello,

Yes, you can do that through Max For Live objects by using path object and observer objects. In both cases it sets up the listener/callback in order to update you when the name changes.

I saw a patch on maxforlive.com call Live.API.Exporere (http://www.maxforlive.com/library/device.php?id=331) This may be of some help to you. I also recommend going through the tutorials as well.

Thanks,
Bret

#185258
Aug 9, 2010 at 3:35pm

you are right, it is incredibly simple. you just use the api abstractions…

– Pasted Max Patch, click to expand. –
#185259
Aug 11, 2010 at 8:00pm

I’m attaching the method I’ve been using for this in hopes someone can tell me why live.object is not returning track ids 0 and 1. Less important, but I’m also looking for a way to refresh it automatically whenever tracks are added or moved.

– Pasted Max Patch, click to expand. –
#185260
Aug 17, 2010 at 11:08pm

Any ideas on what’s going on here? As far as I can tell, I’m using the exact same technique as Live.API.explorer.

#185261
Aug 18, 2010 at 12:00am

Hi Zach,

There are a few issues with your patch. First, you need to separate the idea of IDs and track numbers. An ID could be anything. So you need to use those IDs and request their names. Second, you will probably want to observe the tracks property using live.observer, so you can update your umenu when you add and remove tracks.

Here is your patch modified a little bit:

– Pasted Max Patch, click to expand. –
#185262
Aug 21, 2010 at 2:44am

Thanks, Ben. I think I’m starting to get the hang of the Live object model.

I have another patch that needs to determine the clip that is playing in its track. I’ve been trying to rework it using live.observer so that I don’t have to send it message to update, but am having some trouble. Here’s my attempt:

– Pasted Max Patch, click to expand. –
#185263
Aug 21, 2010 at 3:32pm

nevermind, there was a typo in the property name. it should have been “playing_slot_index” instead of “playing_slot.”

#185264

You must be logged in to reply to this topic.