I’d recommend polybuffer~ because it takes care of the numbering and the loading of a bunch of different soundfiles. Sure, you can use 8 buffer~ objects, but it’s always nice to avoid hardcoding.
Here’s something that I cooked up for one of my classes. It’s using polybuffer~, and it’s randomly picking a segment of a specified duration from one of however many files. I’ve got one of the early generations of MacBook Pro and it only takes 10-14% with 32 voices and this is without optimizing envelopes, etc. and with the generating metro set to 0 ms. It doesn’t do looping (I was using play~ for the class), but you can probably add that later.
Since your process might be dealing with note-ons, here’s an abstraction that I use all the time when dealing with poly~. My approach is to feed poly~ giant lists of parameters with the assumption that usually the only thing I care about on the note-off is that it’s a noteoff (hence the effect of this which is a lot like stripnote, but for additional parameters)
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
Jul 16, 2012 at 11:33pm #114575