# Lesson 8 # Interval Lesson. In this lesson, we will use # variables to create melodic and harmonic # intervals. # 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: Melodic Intervals: comment do unison = 0 major_second = 2 major_third = 4 perfect_fourth = 5 perfect_fifth = 7 octave = 12 play :C sleep 1 play :C + major_second sleep 1 play :C sleep 1 play :C + major_third sleep 1 play :C sleep 1 play :C + perfect_fourth sleep 1 play :C sleep 1 play :C + perfect_fifth sleep 1 play :C sleep 1 play :C + octave end # Exercise A: # 1) Change Example 1 by adding a major 6th # and a major 7th. Place the code to play # these intervals (up from :C) between # the code to play the perfect 5th and # the code to play the octave. # 2) Change Example 1 so that the intervals are # played as harmonic intervals instead of melodic # intervals (but keep the sleep command # between each interval).