Synchronizing a feedback loop to sync~ (with tapin~/tapout~ or another method)

alexis's icon

Hi!

I’m trying to create a highly synchronized feedback loop. Specifically, I’m trying to create accumulating polyrhythms based on the golden ratio. I frankensteined some things together but I’m not convinced that the looping mechanism is precisely synchronized to the tempo, so that the onset of the tapin~ exactly aligns with the start of the sync~ signal, and that this alignment is consistent every time I restart the audio (with a cleared tapin buffer). Is there a way to assure/verify this? I’m not clear on how to sync tapin~ with the sync~/rate~ objects if that is possible or if another route would be recommended.

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

Roman Thilenius's icon

as for the "begin", well, there is no such thing in a tappingbuffer, that is a pure construct. :)

alexis's icon

To clarify, if I have my vector size set down to 2 (0.045 ms), I should have tapin~ 3999.055 and tapout~ 3999.055 to assure synchrony within the looping mechanism?
And would its onset be synced with sync~ every time I restart the audio?
Also: would delay line memory be different than a buffer?

Roman Thilenius's icon

i think i wrote nonsense above and will edit the post.
there was a short time where tapout had a bug where this was required what i s aid and that keeps confusing me.
the only thing you have to obeye is the minimum delay time, which is one vectorsize.


about your other question, i dont think you can restart and clear a tapping buffer at all, it will keep its content even if you interrupt the processing, just like pfft or teeth do. and if you implement clearing yourself, that requires you to wait for one vector of silence to be played in, so in realtime it is a nogo.

i dont know if it helps here but: you´d usually sync the data rate to the samples, not the other way round.

your use of control rate (from edge to the oscillator) seems superfluos anyway.

tapout~ also accepts a signal for the size. you can utilize sah~ or index~ with a buffer to switch between 2 values exactly at a given sample in case that is needed.