Simultaneous sample loading
Its probably an easy question but I have a series of buffers on a project and i want to be able to load all these buffers with samples at start up of the patch. There are 16 buffers in total. How would i do this? I have seen a load from folder function before, how would i go about this?
Cheers
buffer~ accepts as 2nd argument the filename of a sound file to be loaded.
Like buffer~ myBufferName myAudioFile.wav.
cheers but is there a way to choose like a folder and each buffer laods from the folder in order?? each buffer goes up in a scale u see and I mite want to change the instrument sound so instead of having the buffer only loading tht one sound i would like to change it without going through each buffer one after another.
Then you could use Max's scripting features (using JavaScript) to create the buffers instances with the right content. There must be examples on this forum, or I can send an ugly one tomorrow.
p
if you could that would be great
cheers
I have created a small patch containing a [buffer~] to use inside [poly~], it makes loading and management of multiple samples really easy. Here's a small example using [opendialog] and the "prefix" message to [umenu] then iterating through the contents. You can then refer to the [buffer~]s from your main patch as shown on the right hand side.
lh
Depending on what you want to do, the poly~ way may be the right choice.
I couldn't make my JavaScript code working correctly, and have no time to check now what's going wrong (something with filenames including spaces, as usual...). So here is some snippet I adapted from of a much bigger, Max4, project that should work. I'm not proud of if but it may give you some ideas.
(I think I used the replace method instead of creating the buffer with the file name for the very same reason as the one that makes my Javascript code not working).
Please note the following sentence in Max5 thispatcher's help:
"Note: Use of the thispatcher object to create new objects is not supported in Max 5."
So use at your own risk.
hey 9 years later did you get the javascript to work by chance? If not, do you have any code to share for someone to try to get working?