I know, playing back audio samples and syncing it with other outputs is a common theme around here, but the choice of possible solutions is overwhelming, so maybe the senior guys can shed some light.
I am building (yet another) multi-channel looper which allows for syncing between the channels as well as a master tempo, looping selections of the loop, reverse play etc.
The current design consists of a central phasor which runs at bpm "frequency" and gets rated/stretched based on the individual loop length (in 4/4, sample length 2 bar=8 beats, 120bpm=120Hz –> 120/8 = 15 Hz for phasor). The playback is done with wave~.
After reading up, I found that there are quite a few additional solution options such as using play~, groove~ as well as tempo relative phasors which are linked to the GlobalTransport as central sync source.