# Lesson 10 # "Create" Lesson. In this lesson, use # what you have learned so far to create # melodies, chords, rhythms. # General Instructions: # # This lesson contains one example and # one exercise (A). # # To listen to an example, change "comment" # to "uncomment" on the "comment do" line, # then click the "Run" menu command at the # top of the Sonic Pi editor window. # When you are done with the example, turn # it off by changing "uncomment" back to # "comment," and move on to the next section # of the lesson. # # Example 1: Melody and rhythm: comment do use_bpm 50 whole = 1 half = 0.5 quarter_dot = 0.375 quarter = 0.25 eighth = 0.125 use_synth :tech_saws play :C4 play :E4 play :G4 use_synth :pretty_bell play :G5 sleep quarter 2.times do play :E5 sleep quarter end sleep quarter use_synth :tech_saws play :B3 play :F4 play :G4 use_synth :pretty_bell play :F5 sleep quarter 2.times do play :D5 sleep quarter end sleep quarter use_synth :tech_saws play :C4 play :E4 play :G4 use_synth :pretty_bell play :C5 sleep quarter play :D5 sleep quarter play :E5 sleep quarter play :F5 sleep quarter play :G5 sleep quarter play :G5 sleep quarter play :G5 sleep half use_synth :tech_saws play :C4 play :E4 play :G4 use_synth :pretty_bell play :G5 sleep quarter play :E5 sleep quarter play :E5 sleep half use_synth :tech_saws play :B3 play :F4 play :G4 use_synth :pretty_bell play :F5 sleep quarter play :D5 sleep quarter play :D5 sleep half use_synth :tech_saws play :C4 play :E4 play :G4 use_synth :pretty_bell play :C5 sleep quarter play :E5 sleep quarter use_synth :tech_saws play :B3 play :F4 play :G4 use_synth :pretty_bell play :G5 sleep quarter play :G5 sleep quarter use_synth :tech_saws play :C4 play :E4 play :G4 use_synth :pretty_bell play :C5 sleep whole end # Exercise A - create your own melodies, # rhythms, and chords.