Why there is an gap between each loop when using sync?


use_debug false
use_bpm 120

loops = “xxxxxx”
load_samples loops

live_loop :djbeat do
sample :bd_haus, beat_stretch: 1
sleep 1

live_loop :djloop do
sync :djbeat
sample loops, 1, beat_stretch: 16, amp: 3
sleep 16

Why there is an gap can be heard between each loop, but there is no gap when comment out sync :djbeat?

Hi Brandon,

please do have a look at Live_loops Sync questions. I think does adress your question in detail.

Thanks Martin.
I got a little bit confused how the sync function actually works.
So the live loop which is syncing another one actually need to run in the next beat. Am I correct?
So is it the best practice to sync the live loop on the live loop statement, says
live_loop :djloop, sync: :djbeat do
when performing live coding?

@brandon: Yes, exactly. It’s not the only way but also my preferred one.

PS.: See some examples:

Thanks Martin! :raised_hands: