Hardware Reference
In-Depth Information
FIGURE 7-5 A syntax error in Sonic Pi
4. Add delays to your code by typing sleep 0.5 in between each of the play
instructions like this:
play 60
sleep 0.5
play 67
sleep 0.5
play 69
Click the Play button. You will hear the notes play with half a second delay
between them.
The numbers used after play in Sonic Pi represent notes. Each note is a key on a
piano ( http://computermusicresource.com/midikeys.html ). The play 60
is actually a C, and play 69 is a G. These numbers are MIDI keyboard note numbers.
The numbers used after sleep represent timings: 1 is a second, and 0.5 is half a
second.
Search WWH ::




Custom Search