poke~/index~/count~ looper

Igor Blomberg's icon

I'm trying to build a looper using poke~, inspired by the "Looping the Hard Way" chapter of this great guide: http://peterelsea.com/Maxtuts_msp/loopsInMSP.pdf.
I'm using a keyboard to trigger the looper, so that it loops as long as I hold down the button. After I release, I want it to instantly start playing back the loop. However, with this patch I'm getting a few milliseconds of delay after the loop finishes before it restarts. I have no idea why it is doing this, but since I'm quite new to Max I can imagine that there are several things that I'm overlooking. Apologies if I'm not being clear, but if anyone could point me in the right direction I would be very grateful.

(The buffer has 4 channels since I'm using the first one as a "master", which also controls the length of the loop, and the other 3 for overdubs.)

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

Source Audio's icon

Don't use send~ and receive~ for Audio Sample Count.
It gets delayed by vector size.
Hard Wire all audio , not only because of timing but also as it is uses less cpu.
---------
Don't use clear message to wipe buffer, use clearlow instead
There are many things that You will need to learn to make a good looper,
Latency compensation, just to name one ...

Rodrigo's icon

That's a really handy guide as it seems to cover lots of approaches. Like @source said, don't use send~/receive~, and the groove/poke method requires other funky workarounds (going reverse for example), plus clicking is an issue etc...

For what you've described, you only need a couple of objects and the karma~ looper:

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

Igor Blomberg's icon

Thanks, I'll look into karma~!