Hi everyone. I just wrote an external for MaxMSP for OSX (Mach-0)
using flext in C++. The external reads data from a text file on disc
and then creates appropriate inlets, outlets, etc. The argument to my
external is the filename path.
Here is my question. If I type a path relative to where my Patch is,
it doesn't work. Let's say I have a patch called MyPatch.mxb that
contains my external called MyExternal. If the text file is in the
same folder as my external this doesn't work:
It works with an absolute path though, like
I've discovered it works from a path relative to the Max/MSP folder.
So, something like
works ok because the MaxMSP program is in /Applications/MaxMSP4.5
So, it seems that for MaxMSP the current path is where the application
resides and not where the opened patches are. That's weird to me, but
not really a problem.
BUT, there are plenty of externals and max objects that do work with a
path relative to the patch and not the application, like buffer~
You can do buffer~ mysoundfile.wav and this works if the soundfile is
in the same folder where your patch is. How is this achieved? Is the
path "reset" or converted to a path relative to the application inside
the object's code?
Evidently I am missing something here.
Thanks for your help.