Forums > MaxMSP

Readfolder in Polybuffer~

Apr 27 2013 | 5:26 pm

Hi all,
I’m trying to do something very simple, but I always get confused with that kind of things. I want to load automatically an aif files folder in a polybuffer at startup. Eventually, my patch should be usable as a standalone.
I have seen in the help file of polybuffer~ that the folder can be loaded directly , with the message "loadfile ./examples/sounds" or that the folder can be chosen from a dialogue window with "loadfile".
I have copied my sound files folder in the same folder as the patch I’m using, but I get a message of the type "soundfolder is not a folder".
Can anyone tell me where the folder should be located and how I should formulate the path to the folder? I also have added the folder to my searchpaths via the file preferences. Thanks !

Apr 27 2013 | 7:45 pm

I’ve had this issue before and ended up doing something that’s probably far more complicated than it needs to be, but here it is and it works:

NB – the [thispatcher] needs to be in the main patcher window, not in a subpatch

-- Pasted Max Patch, click to expand. --

Apr 28 2013 | 6:26 pm

That’s great! Thanks Luke!

Nov 03 2013 | 5:47 pm

sorry if this is a completely stupid question but how do you get the data you pasted from your patch back into a .maxpat format that I can read?
I tried copying your code into text edit, saving it as blah.txt, then changing the file extension to .maxpat in finder but max gives me some funny errors when I double-click on the file:

error parsing patcher file Polybuffer.maxpat;
parsing object: line=1, char=3, text=’…{\’

Any help greatly appreciated!

Nov 04 2013 | 12:51 am

There are no stupid questions… just ones that are covered in the forum guidelines :)

You just need to copy it and then either open a new patcher window in Max and paste it straight in, or in the ‘File’ menu choose ‘New from clipboard’.

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

Forums > MaxMSP