# Lesson 1
#
# In this lesson, you will learn to write
# simple commands to play notes in Sonic Pi.
#

# General Instructions:
#
# This lesson contains six examples and three
# exercises (A, B, C).
#
# 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.
#

# To play a note, simply type the "play"
# command + a number.

# Example 1:

comment do
  play 50
end

# Exercise A: Try using different numbers in
# example 1 and listen by clicking Run. What
# happens when you use lower numbers? Higher
# numbers?


# You can use the letter name of a note
# instead of a number. Notice that the letter
# name may be small case or capitals, but must
# have a : in front of it: :C, :D, :a, etc.
# (If you forget to put the : in front of the
# letter, you will get an error message when
# you click Run).

# Example 2:

comment do
  play :C
end

# Adding a number after the note name allows
# you to specify different octaves. For example,
# :C5 plays one octave higher than :C4, and :B3
# plays two octaves lower than :B5.

# Example 3:
comment do
  play :D4
end

# Example 4:
comment do
  play :E6
end

# Exercise B: In Example 4, change :E6 to :C,
# then :C4, and then 60. Click Run after each
# change. What do your hear?

# You can add accidentals to note names:
# "s" for sharp, and "b" for flat.

# Example 5:
comment do
  play :Ds4
end

# Example 6:
comment do
  play :Eb6
end

# Exercise C: In Example 6, change :Eb6 to
# :Ds6, and then 87. Click Run after each
# change. What do your hear?