Rhythm and Timing
The basic unit of musical time is the beat. You can typically find the beat of a song by finding the time that is most comfortable for you to tap along to.
Using Beats
Many of the music blocks include timing in beats already. The and wait versions of the block waits for the specified time in beats before continuing the script:
This will let you play notes one after the other (like an arpeggio).
Whereas if you want to program multiple notes or drums at the same time (like a chord), you have to use the versions without the wait:
Because these blocks don't wait, you'll have to pair them with a rest block:
Converting Beats to Seconds
If you need to calculate a musical time for a non-music block, such as wait, animate, or glide, you'll have to convert the time in beats to a time in seconds.
You can do this by dividing 60 by the tempo (in beats ber minute) to give you how many seconds a beat takes up:
You can then modify this time by multiplying it. For example, gliding for a quarter of a beat:
or changing color over the course of 3 beats: