Auto sampler/rhythm builder problem
Hello there, I’m trying to build a patch that auto samples little sound-bites from a mic input when the signal volume goes over a certain threshold. This sample gets stored in a buffer then is assigned a randomly generated rhythm. My problem is: I want it to be able to store about 40 sounds, but having 40 buffer objects seems to be a little ridiculous and not to mention messy. My question is: is there a ‘multibuffer’ object or something similar, which is a collection of a number of buffers, by which you can access each one through use of an index? Maybe an argument of it would dictate how many buffers are initialised.
The other way I tried was to have a single long buffer where each sound was stored with a corresponding position index, however I couldn’t work out how to have several sounds from the buffer to play at the same time.
Any suggestions would be hugely appreciated.
I don’t believe there is a "multibuffer" object (however you should always double check on maxobjects.com).
For this kind of situation, a poly~ object can be very helpful. Poly~ is not just for polyphony, it is very handy whenever you have a large set of identical things you need to manage, like buffers, additive synthesizer abstractions, etc.
In this case you could make a 40-voice poly. To manage a certain buffer you start by sending the "target X" message (where X is 1-40) to poly~.
Pattr could also be helpful here, especially if you want to save the state of all 40 of those buffers. But I would start with poly~ first and worry about pattr later.
> but having 40 buffer objects seems to be a little ridiculous and not
> to mention messy. My question is: is there a ‘multibuffer’ object or
> something similar, which is a collection of a number of buffers, by
> which you can access each one through use of an index?
Its not that messy if you use a poly~ or scripting.
I have something like that in my St.ools collection…
Its called simply [buffers~] and actually uses scripting to create the
(as inside a poly~ you would have to script as well to get the correct
Cheers, i’ll check out using poly~ and your buffers~ object.
Forums > MaxMSP