api to get track names inside a umenu?

coffeencigs's icon

i know where the api's are... but i cant seem to find the right one...

thanks

directgumby's icon

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

coffeencigs's icon

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

directgumby's icon

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

pid's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

Sophia's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

Sophia's icon

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.

Ben Bracken's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

Here is your patch modified a little bit:

Sophia's icon

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:

Max Patch
Copy patch and select New From Clipboard in Max.

Sophia's icon

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