Wait for duration
sleep
[seconds (number)]
Wait for a number of seconds before triggering the next command. Seconds are scaled to the current bpm setting.
Introduced in v2.0.0
|
# Without calls to sleep, all sounds would happen at once: play 50 play 55 play 62 sleep 1 play 50 sleep 0.5 play 55 sleep 0.5 play 62 |
# This is actually a chord with all notes played simultaneously # Create a gap, to allow a moment's pause for reflection... # Let's try the chord again, but this time with sleeps: # With the sleeps, we turn a chord into an arpegio |
|
# The amount of time sleep pauses for is scaled to match the current bpm. The default bpm is 60. Let's double it: use_bpm 120 play 50 sleep 1 play 55 sleep 1 play 62 # Let's go down to half speed: use_bpm 30 play 50 sleep 1 play 55 sleep 1 play 62 |
# This actually sleeps for 0.5 seconds as we're now at double speed # This now sleeps for 2 seconds as we're now at half speed. |