Sep 2, 2010 at 6:52pm


hi i have been trying to build a patch that records a bar of music that could be a varying length of time and then this bar of music is looped for an indefinite period. I want this process to be repeated 12 times so that in the end there will be 12 different bars of music being played and constantly looping.

problem I am having is with the buffer and I cant seem to get it to be flexible in terms of the length of recording I can do.

Sep 2, 2010 at 9:06pm

Buffers represent a piece of allocated memory. It should be somewhat longer than the expected length of the bar. You can resize a buffer dynamically using the size message, see the documentation.

Sep 2, 2010 at 9:09pm

ok but i want the buffer size to be flexible not restricted to a size using a size message.basicially id want it possible for me to begin the recording and when i click stop it would then play and loop

Sep 2, 2010 at 10:10pm

If you haven’t done so already, try searching this forum using the keywords from your original post; here’s some examples of dynamically resizing buffers:

also look at the helpfiles for [poke~] and [count~]:

– Pasted Max Patch, click to expand. –


Sep 2, 2010 at 10:37pm

Do not confuse buffers with what is being played. The point of a buffer is to have a piece of pre-allocated memory that can be written to efficiently. You should, in general, always have some buffer overhead. Enlarging buffers while recording is a bad idea.

Objects that index buffers (e.g. play~ and groove~) will take arguments to determine which part of the buffer is actually played back (see links above).

Sep 7, 2010 at 11:39am

maybe it could help :

– Pasted Max Patch, click to expand. –

You must be logged in to reply to this topic.