loop cropping when recording ends

Nano59's icon

Hi,

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.

cheers

brendan mccloskey's icon

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

brendan mccloskey's icon

ps

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.

Nano59's icon

Hi,

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

cheers

brendan mccloskey's icon

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

maaaxit's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

brendan mccloskey's icon

Thanks Max

Brendan