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

Jul 28, 2013 at 9:46am

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

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

#257365
Jul 29, 2013 at 7:36am

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…

#257454
Jul 29, 2013 at 8:03am

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

#257467
Jul 29, 2013 at 8:11am

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.

#257471
Jul 29, 2013 at 10:15am

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..

#257495
Jul 29, 2013 at 10:46am

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!

#257498
Jul 29, 2013 at 10:52am

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.

#257500
Jul 29, 2013 at 11:00am

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

#257502
Jul 29, 2013 at 1:09pm

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 ;)

#257516
Aug 4, 2013 at 7:02am

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.

#257967
Aug 28, 2013 at 7:53am

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

#260119
Aug 28, 2013 at 8:31am

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.

#260122

You must be logged in to reply to this topic.