Polybuffer~ and standalone

Freddud's icon

Hi everybody,
I know messages have been posted on this subject but I have found no response. So could someone help me to figure out my problem:
I have created a patch which is a kind of sampler, and I use polybuffer~ to load samples. It works fine in Max but when I try to create an application, I've an error message like "patati is not a folder". I've included all the folder in the script when I 've created the application. So what did I do wrong?
Thanks for your help

Emmanuel Jourdan's icon

how do you load the files/folder in polybuffer~?

Freddud's icon

Hi Emmanuel,
to load the files in the polybuffer~ I send a string via [prepend readfolder] to [polybuffer~ buffername @embed1]. This string is tne concatenation of the main folder path and the path resulting from the choice of the user.

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I can't reproduce the issue. Remember that @embed 1 only keeps a reference to the files, they must be in the search path.

Freddud's icon

In fact, when I load the max patcher, the filepath returned is "Sessions 3:/Footsteps/humain/flat/femme/heels/metal/" for example, but when I create an application the path is only "/humain/flat/femme/heels/metal/" and I don't know why it is troncated

Freddud's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I've found a solution to my problem (thanks to Korax_ole). this little patch check if you are running a standalone or a max patch. If standalone, we use sendapppath; if max patcher, we use [path] -> [thispatcher]

thanks for your help Emmanuel

Emmanuel Jourdan's icon

Right, it's not a patcher anymore but an application so you have to get the path from the sendapppath message.

ncdlmn's icon

Hi! I'm coming along with the same problem here, I looked in different other topics in this forum and I was able to solve it, mixing some of the solutions. It all works fine with the patch version pacth, but when I use sendapppath message, my audio files only load when the standalone is in the Applications folder (I use MAC). If I move it somewhere else, the paths load correctly, but the files don't show up.
Is there an explanation for this, or just the way the standalone works?
Thanks!

Source Audio's icon

Please post the path so that it can be analised, otherwise one could just guess.

ncdlmn's icon

I thought so, here it is

ncdlmn's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I think the problem is the timing of messages in runtime = 1 (Standalone) mode.
But also one thing to consider - getting runtime status does not guarantee that it is
Standalone that is running - in case of Max6 and earlier it could be Max Runtime.app which runs a patch...
Anyway, check if this works for You :

ncdlmn's icon

Thank you very much. That seems to work just fine! and yes, it was just a timing problem.
What I'm am not getting now is the way to add folders to the applications. When I go to the build Script window and hit "add Folder" I'm able to add the folders containing the samples, but once iI look in the Content Package folder of the app, I'm not able to locate them and at the end I just add them manually. I can see that they are actually included in the app, since it gets heavier. Also, when I open the .mxf file that its in the Content Package, it opens correctly and loads the samples. Am I missing some command in the script other than: Folder "HD:/Users/User/Desktop/Folder"?
Thanks!

Source Audio's icon

I would copy the folder with samples manually, that way it goes where You want it.
I am not using max7, but it could be that it just embeds the folder and samples INTO mxf file,
which then is not having any sense, and can't be seen in the path.

ncdlmn's icon

Thanks again! Yes, that seems to be the case in Max7...I guess that is something to report. I wonder no one else in the world have noticed, or adding the folders manually is already a standard procedure when creating standalone in Max... hm