# Sync of two loops with inner iterations

**URL:** <https://in-thread.sonic-pi.net/t/sync-of-two-loops-with-inner-iterations/4605>\
**Category:** Support, Help & Resources\
**Created:** [November 12, 2020, 10:42am UTC](https://in-thread.sonic-pi.net/t/sync-of-two-loops-with-inner-iterations/4605 "2020-11-12T10:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekepan](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@ekepan](https://in-thread.sonic-pi.net/u/ekepan)\
**Post date:** [November 12, 2020, 10:42am UTC](https://in-thread.sonic-pi.net/t/sync-of-two-loops-with-inner-iterations/4605/1 "2020-11-12T10:42:13Z")

</div>

Hi all! My problem is: I have created two iterations inside of one live loop, after that first live loop, I created another live loop and I synced it to the first live loop. The second one is a beat loop and is not being played within the sleep value that I attributed to it:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/a/a2fe50236fb3957cd664cf627ef8a956b25312ee.png)

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [November 12, 2020, 11:07am UTC](https://in-thread.sonic-pi.net/t/sync-of-two-loops-with-inner-iterations/4605/2 "2020-11-12T11:07:21Z")

</div>

Hello @ekepan 🙂

There are in fact several ways to sync live loops together: either by syncing _once_ when a loop starts, (and having the synced loop operate independently thereafter), or syncing _every time a loop hits the_ `sync` _command_. This second case is what you are observing here.  
The various uses and behaviours of live loop syncing have been discussed at length in several prior threads - See my comment here for further details:

> [@Issues with missing the timing](https://in-thread.sonic-pi.net/t/issues-with-missing-the-timing/2370/2):
>
> Hello @hyphz! You’re in luck, there are some detailed discussions about this issue wink - One of the best ways I think of avoiding the undesired delay is to use the sync: opt of live\_loop. Ie: live\_loop :bar, sync: :a do ... That way, your loop will sync before it’s about to start, and from then on, just plays without syncing further. There is a small gotcha though: it will only sync on cues after they have happened - so while the two loops would be in time, it would effectively wait for…
