How to stop a buffer from recording any more audio after it's recorded the full sample size
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?
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.
there's 4 clips that I want to record and be able to play back individually. Whatever was recorded, I want played back.
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
I am also interested in SourceAudio solution.
Here is generic. Start record, auto stop.
Something more accurate using phasor to start/stop the record?
...with phasor...
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.
I have been struggling with latency through the method above.
besides start/stop - there is this Rodrigo patch to decipher
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.
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:
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.