How to simultaneously play multiple Audio Files from one Folder?
Howdy folks, I had some questions on this ambiance patch I’m making. I’d like to be able to feed a folder with two subfolders into my Max patch, play them, and have Max automatically update the folders if anything new comes. Ideally, it can differentiate between the two subfolders since they’ll have different functions. Subfolder 1 (my “Loops” folder) will have a bunch of audio files that’re meant to be layered on top of one another. I’d like Max to randomly pick 4 files at a time from this folder to play, and when it’s done, go through the next available audio files until none are remaining. The second subfolder will be one shots and will just play the given files in a random order at random intervals. It’d be great to automate this patch. Also, if it’s possible how would I go about making the patch recognize when there’s new audio files and automatically update it? So far I’ve made a function that does this but I have to manually click the button. I’ve posted my patch here and the functions are all present, I just have to manually insert the folders/wav files and it’s kind of a hassle. Thank you for any help!
detecing changes in a folder is not difficult.
depends what you want to use to list and load them,
folder, umenu, chooser playlist, something else ?
and what do you want to perform if items in folders change ?
I would use main folder with 2 subfolders with short descriptive names,
get absolute path of main folder and combine with subfolder names to create absoute paths for file listing.
that will give you file count, if you need that for randomizing.
dealing wih click-free playback change and so on is another topic.
to exhaust file list by playing 4 randoms at a time, try urn, which
does not output duplicates.
Thank you! Having absolute paths rather than a hard coded folder worked wonderfully.