Looper & Buffer Size Issue
Hello! Lately I used a stacking looper patch (from Andrew Robinson's video) to add an extension to it. Techically I want the loop's buffer size to be calculated via note values and tempo and I've pretty much created an algorithm that works pretty well. The only problem remaining is that the buffer size will reset every time the counter sends an output, therefore the recording that follows after the latest output will be the only thing saved as the buffer's content. Is there a way to send the counter's final message result after the recording? Or should I use a different object than counter? My thoughts so far would be that I need to stop the counter from sending a message while the recording is on, and then when the recording goes off then the counter's final message will then be sent and calculated for the final buffer size. It'd be very helpful to open the patch since everything is pretty complicated! Thank you!
remove that clocker in first place.
if you use counter to calculate multiplication of the length - that note value,
then you have length update every counter output.
record off should execute quantised to beat / counter output.
then use message like
duplicate loop, crop $1.
by the way why crop at all or change buffers ?
all that can be done using single buffer ...
unless you want to listen to previous loop while recording new one.
Thanks, although I experimented with it a bit on my patch and it doesn't seem two work. Two problems that I inspected are 1. the gswitch object goes back to toggle value of 1 even though i set it to 0, and 2. no data comes out of t 0 b object. I understand the mechanism on your patch i just can't figure out why it doesn't work on mine. Also why should i remove clocker? Is it because metro does the job for it? Then maybe this means I should connect it a bit differently, but that's ok.
Also i use crop message because for example if i record for 4 whole notes then buffer length will be 8 seconds. If i stop recording at let's say 7.2 seconds then the remaining 0.8 will be cropped out. This creates a perfect loop. And lastly, yes, i want to listen to multiple loops while recording a new one, therefore i need the duplicate message.
as I mentioned,
using clocker in parallel to metro-counter-multiply
is not necessary.
Same as that complicated tempo - notelength etc construct.
if you want to use translate, transport & Co then all it needs is this

or then make your own calc without transport.
if you want precise time, then use multiplied length.
here one simplest example.
play buffer gets croped, not record buffer.
And now to that "perfect" loop.
as first you should at least use fade in/out when recording
otherwise pops and clicks could happen.
In really good looper one would crossfade
10- 50 ms when loop ends recording for smooth loop.
if you listen and record ( sort of overdub) - you need a bit of
latency compensation, I mean in case you play precisely.
and so on and so on.
Well the notelentgth - tempo construct is pretty complicated because I'm on begginer level and it obviously takes practice to learn more efficient ways to create/do stuff. I've fried my mind today trying to understand some stuff, but your answers are pretty helpful and insightful nontheless, so thank you! I'll post more questions around the topic if I happen to stumble upon more difficulties, but for now I'll take a break and let the new information settle in!
Thank you for your time!!
Feel free to post questions.
Best approach is to post some infos about the concept,
then it is easier to look at it.
Like " I want 4 loop tracks to be recorded in the length of initial recording,
(or set time, like your 4 1n notes in tempo 130 ...)
mute or re-record into them individually etc"
cropping buffers might be memory saver,
but it is not really needed, because one can perfectly
set recording and playback time for longer buffers.
Only exporting loops to disk needs cropping.
To make the concept a bit more clear, I want to create a looper which functions are based on Tc Electronic's Ditto Looper. Technically this looper can record for as many times as you want with each loop being on top of each other. There is no length limit for the first loop though and this patch is meant for musicians, therefore I had to make an algorithm which would help a musician set the buffer size via musical terms (such as notevalues and tempo) and this would also lead to the first loop lasting for as long as the musician wants. Then from the second loop and so on all of their lentgths should be limited to the first loop's length.
So yeah, setting note values and tempo to your own preference is the way to calculate the buffer's size, the only problem is the whole buffer refresh issue. I think a gate connected to the metro output and recording/stop recording toggle would solve the issue since it will let the total metro output be multiplied at once, once the toggle is off.
Also there should be a pause/resume palyback function and another one that resets the contents of the buffer, but I'm just mentioning these just so you can have a clearer view of the objective here.
I am sure the logic with control assignment to individual
loop instances, monitoring of their states, etc will be the most challenging
part for you.
You can also consider using only 1 recorder instance
and set it to buffers that need to get recorded.
So after init recording to buffer~ rec
you send message set buffer~ play-1 to record~ object
Much morer interesting then just same length for all loops
is bar or beat synced recording.
you record one loop, the others can record any number of init lengths.
I see, I'll work on it to see if I get some efficient results and get back here for any possible updates, thank you!
Hello again,
I haven't really had the time to work on new stuff, but I have a question about the latest patch that you've sent.
But first of all I want to make clear what my objective is through my patch:
I want to record a loop and save it in a buffer
The buffer's size will be set via note values and tempo (the gswitch object is very important apparently)
The loop will be able to be duplicated in result of creating a stack of loops
It should be possible for all these loop recordings to be played back simultaneously
whenever the user wants, therefore the playback of the loops starts and stops
The user should be able to reset all of the recordings and start all over again, in case they want to
My question(s) about your patch is: Is it possible for this patch to make the loops be played back at the user's will? Also how to stack loops and reset them through this patch?
Because as far as I can understand the loop gets played back just once and there's no way of listening to the recording again.
That is all, I'll try to get back to this patch as soon as possible, thank you for your time!
Why should loop be heard only once ?
You put your playback object into loop mode, that's all.
Or let it receive sample count~ if you use poke~ /index~ .
it all depends on what exactly you want to do.
record- playback without overdub needs just few objects.
you have option to then set length of all slave buffers.
now the question is how do you want to address that loopers ?
is master one allways running and the others follow the clock ?
and so on and so on.
It is only a matter of creating logic which controls what each looper does.
if they all need to run in sync, you can simply mute or unmute output of each of them,
also master one.
But for me it makes no sense to talk here about all possible
options one multilooper can have.
even a question about visual or audible click for users to keep timing
while recording at set tempo....
You're right I looked into it a bit better and the loop and playback works just fine! Sorry for the inconvenience.
I don't want to have a master looper and then a bunch of slave loopers. I want to have one buffer that will save the audio, which will later on be looped, and then another buffer which will get the duplicated audio via the duplicate message. Therefore I will be able to stack up some loops. I will look forward into it in a week I guess because right now I still have some priorities to be done first:(
But yes, just like my patch, I want it to be able to playback as many loops as the user wants and reset them at his will, and not when the next loop recording starts (which then will delete the buffer's previous contents).
Update: I tested the patch and yes, only the loop stacking is missing, how could I add it just like in my patch?
Did some changes to your patch if you wanna see it yourself!
Please upload patches in compressed form,
select stuff in the unlocked patch,
then use "Copy Compressed" from edit menu..
I don't wan t to download patches to hd.
You ask me how to add stacking ?
I have no idea , because you repeat allways the same thing,
but don't provide details.
I mean detail about how you want to control that stacking loops,
what is going to sync them and many other things .
for example how to re-record loop 4 , or mute it, or simply kill it ?
You said that you don't want a master loop,
so I don't understand exactly what you want.
.................................
I have overseen one thing in quantized recording,
if one only wants one single time measure, it does not work.
here is the fix :
But you are far away from a functioning looper,
this is bare bones record - play,
no fades on recording, no fades at play stop etc etc.
Ok, got it
About the stacking loops, I completely misunderstood the master buffer part etc.
Here's what I want:
Press record once, and once the recording stops then the first loop will be saved in the first buffer.
You press playback and you can listen to it just fine etc.
Press record for a second time, then once this recording stops as well and press playback, you'll be able to hear both loops simutaneously (or else stacked). Press rec for a third time and so on.
What syncs them is the playback toggle button. What resets them is the clear message. I don't want to mute any loops, I either record new ones and control them through playback or reset them all at once.
I think this can be achieved by connecting groove's outlet to record's inlet and give the slave's buffer name to groove, therefore you'll be able to listen to the stacking effect.
I hope I make sense this time. Sorry about the confusion.
About the fade in/out I'll work on it, I just want to build some basic functions first.
Important update!!!
The original patch seems to work perfectly now, I just have to add fade in/out to avoid clicks, thanks for the help!
Apparently the buffer reset issue is gone. If anything happens out of the blue I'll keep you updated, but it seems to be working just fine. Again, thank you for your time and effort, I very much appreciate it!
again what when loop-1 is running and you press record anywhere
in the loop ?
should it just start recording from punch point
in a loop and overwrite the buffer till you stop recording ?
assuming recorder gets sync signal from groove~ ,
for example using mstosamps~ and one feeds poke~ with it ?
would be simplest form of adding loops.
Otherwise you need to press record, wait for start bang
from something that bangs on loop start,
then keep recording till buffer end.
each record press targets new loop.
but what to do if you want to undo recording before it starts at
all, or cancel it in case one played bullshit and does not want to record / hear it ?
You're right, I experimented on my patch a little and thankfully it doesn't overwite it if you have a second buffer, instead it writes new data from the point you start the recording plus saving the previous one.
Unfortunately you cannot undo any recording which is now another issue, though I will consider looking forward into it.
Ah, you know I spent more then 30 years writting looper software, from simplest
to monsters having whatever you imagine features,
and most time consuming is dealing with states of objects,
controls that trigger actions and so on.
Audio part is the easiest one.
If I dare offer an advice,
don't loose time with little parts, think it globaly from beginning.
I mean the whole control stuff around the functions that you wish to have.
Then it is easier to deal with audio.
I asked allready what you plan to do to give some sort of orientation when recording quantized loops, without click ?
Wow that's a ton of experience, meanwhile this is the first time i try to make a looper in max ahaha
Well what I want to do is to create a looper that records, puts loop on playback and is able to stack many loops on top of each other without overwriting each other.
I think a way to avoid clicks is adding a Hann bell technique to the buffer.
It should pretty much work like Tc Electronic's Ditto Looper if you want to look it up!
The main goal is that it's supposed to be for musicians therefore it should have a clean interface, that's why I created the whole note values/tempo algorithm, since it's inconvinient for them to wotk with ms. So this algorithm is a more of a "musician friendly" way to set the buffer size.
but to record something in predefined tempo/length without
having a click is impossible.
I guess I'll have to consider this issue as something inevitable so I won't stress much about it, thanks for the insight!