Making Music with Sonic Pi
In This Chapter
Playing notes and melodies using Sonic Pi
Creating random computer-generated music
Adding samples to your compositions
Synchronizing your tunes with drumbeats and samples
For much of the music we hear today, computers are at least as important in the studio as microphones are, and they have been for many years. Using Sonic Pi, you can start composing your own computer music by programming your Raspberry Pi. It enables you to put together simple programs that play synthesizer melodies and sampled sounds, generating your own distinctive instrumental music.
Sonic Pi is based on the Ruby programming language, so it works differently than the Python code you’ve become familiar with in the last couple of chapters. It uses some of the same ideas you saw there and in Scratch, however, including loops and lists (here in the form of arrays). We don’t have space in this book to teach you the Ruby programming language, but we can give you some examples that you can experiment with and modify to make your own musical programs. If you’ve completed ...