I have noticed a buffer loads a soundfile indicated as argument if it
is located in the same folder even if that folder is not in the
search path. However if I want to load the same soundfile manually
using the "replace" command I get a "can’t open" error message.
Therefore I would like to add the patcher’s folder in Max’s search
path. I want it to be done automatically when the patcher is loaded,
not manually (an additional reason not to do it manually is the
patcher will probably be used with Max Runtime rather than Max, so no
"File Preferences" window will be available anyway).
I know the filepath object might be used to add a folder to Max’s
search path. However is there a way to know an opened patch’s path?