Forums > MaxMSP


Sep 02 2010 | 6:52 pm

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 02 2010 | 9:06 pm

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 02 2010 | 9:09 pm

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 02 2010 | 10:10 pm

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 02 2010 | 10:37 pm

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 07 2010 | 11:39 am

maybe it could help :

-- Pasted Max Patch, click to expand. --

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP