A Sonic Pi live_loop with no sleep and no sync throws a 'did not sleep' error and stops
Sonic Pi enforces that every live_loop must advance musical time each iteration, via either sleep or a sync call (sync blocks, waiting for a cue, which also advances time). If neither is present the runtime detects an infinite loop risk and raises a ‘did not sleep’ error, halting that live_loop. This is a deliberate safety guard. The fix is either to add a sleep at the bottom of the loop body, or to add a sync at the top to block until a named cue fires. A plain loop do…end block is different: it is not live-updatable and blocks the thread permanently.
Examples
live_loop :bad do\n play 60\nend — error: did not sleep. Fix: live_loop :good do\n play 60\n sleep 1\nend
Assessment
Explain why live_loop :x do; play chord(:c, :major); end raises an error, and show the minimal fix that plays the chord once per beat.