Forums > MaxMSP

loop cropping when recording ends

May 9, 2010 | 3:10 pm


How can you crop a buffer sample as soon as you finish recording and according to the time it finished. I.e. you have a buffer of 2500ms and you stop recording into it at 1500ms, and as soon as you stop recording the buffer is cropped to the exact time recorded – so recording dictates the buffer size.


May 9, 2010 | 4:46 pm

..because using the [resize] message causes the [buffer~] to be reinitialized, wiping the contents! I know. Although I haven’t used it a lot, look at the [waveform] object (which you ally to your buffer by using the [set myBuffer] message, where myBuffer is the name of the buffer in question); I believe you can crop it to suit, if you send [timer] a bang at the start and at end of recording you can send [waveform] the resulting lapsed time. Sorry to be vague, loaded with ‘flu at the moment

May 9, 2010 | 4:48 pm


can I just ask, why exactly do you need the buffer to be dynamically resized; you can access the recorded samples alone using the [timer] method above, and send the duration value to a [play], [wave] or [groove] object to set start and end points.

May 9, 2010 | 7:15 pm


I just wanted a patch that was worked the same was as a guitar pedal with a loop function and have it dynamically resized so that I don’t have to manually crop the samples in a waveform when using a guitar.

thanks for the suggestion, I’ll give that a go now. I thought I’d have to use a timer somehow


May 9, 2010 | 7:32 pm

It would be interesting, and helpful to many people here, to see your solution, speaking as a fellow ‘guitar-looper’. I have a patch somewhere that allows one to rewrite into several [buffer~]‘s in realtime, which might also be uselful. Keep in touch dood

May 9, 2010 | 8:26 pm

In this patch I record a buffer (stopping the recording if I need), and then I get another buffer with the same duration (and the same contents) of what I’ve recorded. Maybe it can be useful.
regards max

– Pasted Max Patch, click to expand. –

May 9, 2010 | 8:43 pm

Thanks Max


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