Simultaneous loop recording and random playback in a buffer~

carinola's icon

Hello,
I use a buffer~ to record live loops and, at the same time, play random fragments with the groove~ object. When the playback point coincides with the recording point, it produces a clipping noise, as usual. Is there a way to avoid this?
Thank you very much for your help!

Max Gardener's icon

I think that this is one of the points where gen~ external would be worth investigating, and where the codebox operator in Gen itself would be of particular help. While using a codebox operator isn't any more efficient than operator-based patching, there are two places where it's necessary: adding procedural (while, for, do, etc.) programming to Gen patches and (here's the bit where it'd matter to you) being able to explicitly control the order of reads and writes when engaging in simultaneous recording and playback. In that regard, a little quality time with the gen~ object would be worth your while.

jg's icon

The other option that springs to mind (assuming playback is at the same speed as record) is to record into two buffers simultaneously, with record heads 180 degrees out of phase (i.e. when buffer 1's record head is at the beginning, buffer 2's is in the middle). Then you make the random-fragment algorithm choose the appropriate buffer so that record and play points don't intersect.

carinola's icon

Thank you very much for your answers. I have not yet worked on gen~, I would indeed have to spend some time on it to better understand Max Gardener's proposal.
To answer JG, in fact, if the playback is at the same speed as record, there is no problem. The problem arises precisely when the speed is varied by transposition or by reading a fragment backwards. But the idea of playing on two buffers seems interesting to explore. Thank you again for this!