Readfolder in Polybuffer~

Apr 27, 2013 at 5:26pm

Readfolder in Polybuffer~

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 !

Attachments:
  1. polybuffer.zip
#67971
Apr 27, 2013 at 7:45pm

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. –
#244273
Apr 28, 2013 at 6:26pm

That’s great! Thanks Luke!

#244274
Nov 3, 2013 at 5:47pm

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!

#270058
Nov 4, 2013 at 12:51am

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’.

#270071

You must be logged in to reply to this topic.