How to stop a buffer from recording any more audio after it's recorded the full sample size
Remi LeJeune
6月 27 2024 | 3:28 午後
I'm very new to Max and I'm trying to make a patch that records individual clips when I hit a MIDI footswitch, which turns on and off a toggle. I cannot figure out how to make it that when the recording is done, it doesn't record any more audio onto that buffer.
does that question make sense?
Source Audio
6月 27 2024 | 3:35 午後
Quesion makes sense, but you don't provide enough infos
about "inividul clips", how many, do you want to crop buffer(s) after recording and many other things.
describe in simple words what you want to do.
Remi LeJeune
6月 27 2024 | 3:43 午後
there's 4 clips that I want to record and be able to play back individually. Whatever was recorded, I want played back.
![](https://cycling74-web-uploads.s3.amazonaws.com/667500532e8d8970149a81a8/2024-06-27T15:40:36Z/image_2024-06-27_084033939.png)
this is what I have at the moment. It was just my plan to copy and paste this 4 times with different buffer names.
also, the effect I'm trying to make is found here:
Where Jonny records each verse individually to be able to play them back at 4:09
Wil
6月 28 2024 | 1:12 午前
I am also interested in SourceAudio solution.
Here is generic. Start record, auto stop.
Something more accurate using phasor to start/stop the record?
![](https://cycling74-web-uploads.s3.amazonaws.com/546312c9bdbb99652da7ad11/2024-06-28T01:10:04Z/Screenshot 2024-06-28 at 10.09.54 AM.png)
Wil
6月 28 2024 | 1:41 午前
...with phasor...
![](https://cycling74-web-uploads.s3.amazonaws.com/546312c9bdbb99652da7ad11/2024-06-28T01:57:54Z/Screenshot 2024-06-28 at 10.57.23 AM.png)
Roman Thilenius
6月 28 2024 | 3:39 午前
count~/record~ and count~/play~ (or count~/index~) seems right, but as @wil says, to reach sample accurate synchronisation one should start and stop things using signals instead of messages.
Wil
6月 28 2024 | 3:48 午前
I have been struggling with latency through the method above.
besides start/stop - there is this Rodrigo patch to decipher
Roman Thilenius
6月 28 2024 | 4:09 午前
what i forgto say say above: using 4 buffers in parallel also seems right. it does not need more CPU than writing at different positions into the same buffer, but is a better structure.
a tapping buffer would also be a solution to base a climax sequencer on it. it will kinda autoloop, but is more difficult to build and might raise new questions and has other limitations.
Source Audio
6月 28 2024 | 7:34 午前
for any live situation, this looper must have flexible length
and maybe sync enabled.
just set 4 seconds length will not serve well .
I also doubt that many are well in keeping timing over 4 seconds time
and start not heard loop in the song later after whole band shifted tempo...
But if that is what you need, just start record~ in loop 0 - append 0 mode.
It will auto stop after recording is done ...
then you start playback when you want.
.......
count~ to several index / poke objects is maybe best solution
in case one also wants to overdub into loops.
You simply open gates for audio input and recording sample count to buffer channel that one wants to record into or play back in case this looper keeps going all the time.
latency compensation - run playhead xx samples ahead of recording/feedback head.
Latency can be measured well using latency tester patch, which max usually has somewhere in examples.
here simplest example:
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-06-28T07:33:05Z/image.png)
DSP part of loopers is easy part, more work is the logic arround
controlling loops.
That is why I don't want to post any examples.
without knowing all details on how to use such looper, if overdubbing is needed,
undo, how to select looper for either recording or playback
if loop starts playback after recording is done or goes into mute state, etc etc.