Exercise: Create a Simple Melody

Transcript


Exercise instructions

Suggested time limit: 10 minutes

  • Use at least 8 notes
  • Use play command to play the notes
  • Use sleep command to time the melody
  • You can use either numbers (70) or note names (:D5) with play command
  • Bigger values (sleep 4) = longer sleep time, smaller values (sleep 0.25) = shorter sleep time
  • Remember you can repeat parts (2.times do - end)
  • Save your melody code. 
  • Make sure you know which folder the code was saved in!

An online keyboard like this one is a great help when composing!


Educator notes


Record Your Sounds


Exercise instructions
  1. Click the Rec button
  2. Start your song by clicking Run
  3. Once your song is finished (or you’ve played enough of your live_loops) click Stop
  4. Click Rec again to stop the recording
  5. A Save dialog window opens
 - choose the same folder where you saved your Sonic Pi code files
  6. Name your audio file in the dialog window (for example, MyFirstMelody) and click Save

Note: Sonic Pi records audio files in .wav format.


Educator notes