polybuffer~ readfolder
Hi.
This seems like a really stupid question, but I've found a previous thread on the exact same problem (with no answer that solves my problem, as far as I can tell).
I'm using various polybuffer~s, each with a folder full of samples. The patch will be packaged up as part of an install with a bunch of other stuff, and installed on multiple machines, PC and Mac. In many cases this install will be done by someone else.
So, I think I REALLY need to use a relative rather than an absolute path, but I simply can't get this to work. If the patch is at
/blahblahblah/mainfolder/patch.maxpat
and the files are in a folder
/blahblahblah/mainfolder/subfolder
I would expect the message 'readfolder /subfolder', or perhaps 'readfolder :subfolder' or 'readfolder subfolder' to work, but all these come up with the message 'subfolder is not a Folder' (which is the same error it comes up with a name which simply doesn't exist). Does polybuffer~ simply not accept relative paths?
The previous thread is here:
Emmanuel Jourdan's reply looked promising, but I'm not sure. Having to add a folder manually to the search paths isn't an option, since I really need to make this install as simple as possible. Ditto with a drag and drop dropfile solution. I thought using the max message might be the perfect solution, but there doesn't seem to be a command to add to the searchpath - or am I missing something?
Any help very gratefully received - I'm pulling my hair out!
Does this work for ya?
actually, iirc, there is a something to add a file to the searchpath, this something beeing [filepath]. Dunno if it would be sufficient in your case though. Are you using max6 or 5 ? cause in the former case, there is maybe some convenient new features related to the whole new "project" shenanigans ? though you probably know it better than me...
edit : ninja'ed, Luke's answer seems far more useful.
Thanks Luke and vichug - v helpful. Emmanuel Jourdan got back to me with much the same solution as Luke's (thanks Emmanuel too). I'm feeling a bit stoopid for not thinking of that myself, but I was too busy thinking 'why doesn't polybuffer~ do relative paths?' and 'how to I use max messages to modify the search path?' to think of just building up the absolute path manually. Doing a bit of panicky last minute patching here and couldn't see the wood for the trees! Sometimes this forum is a total godsend..
Probably just had one too many jabs to the eye Jo ;)