patch relative filepath

May 1, 2012 at 9:05pm

patch relative filepath

Hi,

I’ve googled around and here too, but couldn’t find a solution to make a patch loading samples to play in some sfplay~ objects with a PATCH relative filepath…

I used to make it pretty easily in PD, I can’t believe it’s so complicated in max/msp…

I have to put it into another computer.

#63345
May 1, 2012 at 10:53pm

Send the word
path
to [thispatcher] and get the relative path from the right outlet. The patch must be saved as a file to get a path.

Note:
The example below works only for regular Max patches, for applications you need a different method.
 

– Pasted Max Patch, click to expand. –

`

#228482
May 2, 2012 at 6:54am

will this work if the patch is opened on another computer with the max runtime ?

thank you anyway !

#228483
May 2, 2012 at 7:54am

I saved the patch, put it in another folder, opened with Max runtime, worked. So yes, must be the same on another computer as long as there is Max installed.

#228484
May 2, 2012 at 8:38pm

I took a slightly different approach to this problem. I create an abstraction with pretty much the same code (path to thispatcher) but I give it an inlet and outlet and then throw it in the root folder of a particular environment. E.g, the code below is stored in a file called CurrentRigRoot in a folder that contains all the patchers and related files used for a particular live rig.

– Pasted Max Patch, click to expand. –

I can then work with a new patcher, before even saving it, and have access to stuff I need, relative to the location where CurrentRigRoot is saved.

E.g

– Pasted Max Patch, click to expand. –

I have a few of these abstractions, suitably named, deployed in important places – for example, there’s one called CurrentPatchRoot that is stored in a folder where all my .fxp files are to be saved and then I can easily access that from anywhere as well.

#228485

You must be logged in to reply to this topic.