recording to a buffer that resizes to the recording

randy b's icon

I can't figure out how to resize a buffer after recording onto it. I want to be able load different live recordings onto a buffer that resizes to the length of the recording. I've created a patch that shows the workflow I'm trying to get:

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

Any help is much appreciated.

julien breval's icon

Hello,

Here is one possible crappy but working solution, using the [waveform~] interface object

1. You know that you won't record more than one minute (for example, please adapt to your own limit), so before recording send a [size 60000( message to the buffer

2. Start recording, then stop; calculate the time between start and stop with [timer] or such

3. In the [waveform~], select the portion from 0 ms to the time you calculated with the timer (there are inlets for selecting in [waveform~])

4. Send a [crop( message to the [waveform~]