Forums > MaxMSP

Folder relative paths

October 9, 2007 | 9:56 am

Hello,

For some reason I would like to load a file into a buffer~ using a relative path AND using the folder name.

Normally, loading a sound is done sending the following message to the buffer:

[replace "Macintosh HD:/Users/........./myfolder/myfile.wav"(

or

[replace "C:.....myfoldermyfile.wav"(

Sending [replace myfile.wav( also works.

But this can be problematic when the patch has to run on different computers.

Normally one would copy "myfolder" to the folder where the patch is saved and try to send this message:

[replace ./myfolder/myfile.wav( OR [replace "./myfolder/myfile.wav" (

but it works only on Pure Data … What did I miss ?


October 9, 2007 | 10:41 am

Quote: julien breval wrote on Tue, 09 October 2007 11:56
—————————————————-
> Hello,
>
> For some reason I would like to load a file into a buffer~ using a relative path AND using the folder name.
>
> Normally, loading a sound is done sending the following message to the buffer:
>
> [replace "Macintosh HD:/Users/........./myfolder/myfile.wav"(
>
> or
>
> [replace "C:.....myfoldermyfile.wav"(
>
>
> Sending [replace myfile.wav( also works.
>
>
> But this can be problematic when the patch has to run on different computers.
>
> Normally one would copy "myfolder" to the folder where the patch is saved and try to send this message:
>
> [replace ./myfolder/myfile.wav( OR [replace "./myfolder/myfile.wav" (
>
> but it works only on Pure Data ... What did I miss ?
----------------------------------------------------

I don't think you missed anything. Check the help file of [relativepath]. Make sure you don’t miss the following comment: "Eventually relativepath will take an argument to set the path instead of the application path."

Mattijs


Viewing 2 posts - 1 through 2 (of 2 total)