live_app function : get_document

ke10's icon

In MaxForLive api, I expected the function "call get_document" to the live_app object to return the title or file location of the live set. But the call only returns an id (id 3 in my case). The other functions of this object seem to work as described in the LOM, but I'm not sure how to use the return I get from the get_document call. (the LOM is very vague in its description of this function, it just says: "Returns: the current live set.")

Is there a way to get the currently loaded live set's file location ?

I am trying to dynamically save a jitter matrix with a name that matches the live set's name, and in the same folder.

thanks for your help...

elburz_s's icon

wanted to bring this back from the dead as I'm having the same question and couldn't find an answer between max help and searching the forum.

Mine on the other hand returns a string of number (id 2147418112), but that number stays consistent no matter what set I open...

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

This is how I have them patched together to get the same id from every set:

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

The number (id 2147418112) denotes the application, but not the actual set.
Here is a patch demonstrating the difference.

elburz_s's icon

Thanks again for the reply broc. I tried getting your patch to work but I think I might be getting the problem the OP had. I just get id 1 for every set.

The same id i mentioned before comes out of the right outlet of the trigger, and at the end of the chain i just get id 1. Any thoughts?

broc's icon

Note that you can get the set id also directly with [live.path live_set].
So you could try this to see if It's the same for every set.

Venetian's icon

The get_document and get_major_version need to be "call get_major_version" into a live.object once you've set thelong id (via the path live_app example above)