Automatic load of a patch that's not in max search path ?

Alexandre's icon

Hi,
As my project is getting bigger, more complex and modular, its central and bigger part is now going to be made in Java instead of max (I still need max for audio, UI and also some opengl in jitter)
I'm even dreaming sometimes about having Maxmsp INSIDE JAVA, instead of having JAVA INSIDE Maxmsp thru mxj... but well, java in mxj really have many avantages.. (changing the java code on the fly)

So i was wondering about sending some msg to [pcontrol] from mxj to automate the load of some max patches...
But the message (load ) sended to [pcontrol] only seams to work if the file is in the max search path.

Is there a way to automate the load of a max patch that doesn't live in the max search path ?

Hans Höglund's icon

You can modify the search path dynamically, using filepath.

Or define a loader function that makes temporary copies of the patches to be loaded (or symlinks if you are on OS X) inside the search path.

Alexandre's icon

Thanks Hans!