RECORD AND LOOP

Sep 2, 2010 at 6:52pm

RECORD AND LOOP

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.

#52129
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.

#187300
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

#187301
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:

http://cycling74.com/forums/topic.php?id=26951

http://cycling74.com/forums/topic.php?id=25497

http://cycling74.com/forums/topic.php?id=24053

http://cycling74.com/forums/topic.php?id=10535

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

– Pasted Max Patch, click to expand. –

Brendan

#187302
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).

#187303
Sep 7, 2010 at 11:39am

maybe it could help :

– Pasted Max Patch, click to expand. –
#187304

You must be logged in to reply to this topic.