Forums > Max For Live

Can I get the file path of the current live set using max for live?

July 28, 2013 | 9:46 am

Hey everyone, I would like to create a max for live patch that makes it easy to create built-in live lessons. The first thing I need is a way to get the file path of the current live set. Is there a way? I can’t seem to find anything in the Live API that can do this.

Thanks!

Loudon



Lee
July 29, 2013 | 7:36 am

I don’t think so, explicitly…

the only hacky thing i can think of is having a an audio clip in the set, getting the path to the clip and then getting the set path name from that…


July 29, 2013 | 8:03 am

Use this.patcher.filepath. In Max 6.1.3, this returns the path of the Live set. In Max 6.1.2, this used to return the path of your Max device. Note however that this implementation is buggy, see:

http://cycling74.com/forums/topic/this-patcher-filepath-returns-different-paths-in-max4live/#new-topic-0


July 29, 2013 | 8:11 am

Lee and Thomas, thank you for the quick replies. Thomas, I will play around with your method and see if I have the same issues. I am sorry to hear that you are having trouble with this. Honestly it seems like a pretty normal thing to want, I wonder why we need to resort to JS in the first place. Seems like the filepath should be a property of the Live set, but hey what do I know.


July 29, 2013 | 10:15 am

So, I tried a couple things including the JS solution posted here. I can get the path of the max patch itself(using the thisdevice object or the JS method posted above). The Max patch is not saved within my live set. I need the filepath of the live set itself. Still on the hunt..


July 29, 2013 | 10:46 am

Thomas, weird, I thought I was on the latest version of Max, but after re-reading your previous post I went in and checked and it turns out I am using an older version. I’ll update to 6.1.3 and try again(hopefully it’ll work!), thanks for your help!


July 29, 2013 | 10:52 am

Thomas, I am getting the buggy response in the patch that you described, sometimes sending a path and sometimes sending the patcher’s filename without the path. But, for me when it sends the path it is the path of the amxd file, and not the path of the live set. Strange that it would work two different ways. I am on Max 6.1.3 32 bit on a Mac.


July 29, 2013 | 11:00 am

Lee, how do you go about getting the filepath to an audio file contained in a live set?



Lee
July 29, 2013 | 1:09 pm

you can grab the filepath of an audio clip (e.g. live_set clip_slots x y clip ) – i think the property is filepath or something like that – not at my laptop currently… the clip will have to have been created by live tho (i.e. recorded) in order for it to be in your folder structure, or you’ll have had to do a collect and save first

very hacky! not really a usable solution, but can’t think of anything better

as for why this isn’t available… send a request to C74 – they maintain a list of requests for new attribs… i don’t know how this is actioned, but at least it’s recorded…

we’re still trying to figure out why we can’t even get the name of a set ;)


August 4, 2013 | 7:02 am

Loudon, that’s interesting that you get the path of your Max Patch. I will look into it again. I am glad though that you experience the same regression regarding that it only works sometimes, therefore confirming my bug report.

Lee, I like the idea of getting the filepath of an audio clip. It’s extremely hacky, yes, but it may just work well enough if used with caution, or maybe if combined in a workaround hackish solution with this.patcher.filepath.


August 28, 2013 | 7:53 am

There should be a way to get the current live set file path :(


August 28, 2013 | 8:31 am

The reason why it might be difficult is because the liveset initially is given a temporary path, until you save it under a name e.g. "untitled1", so a new live set has a temporary path. It would be great if live forced you to give a name for your set, or if it could/would change the name of the temporary set (and all the files inside the temporary folder) to the name you have chosen.


Viewing 12 posts - 1 through 12 (of 12 total)