Lesson 3: MakeBeat and Loop Exercise
1. Watch video "17a EarSketch makeBeat Function Description" for an outline of the purpose and parameters of makeBeat. The presentation slides for makeBeat are located at: http://nebomusic.net/earsketchlessons/EarSketch_Python_Presentation_2020.pdf starting at slide 26.
2. Watch video "17b EarSketch makeBeat Exercise Work Through". Use the directions and video to complete the "makeBeat Exercise". Directions are located at: http://nebomusic.net/earsketchlessons/makeBeat_practice_EarSketch_2.pdf
# python code
# script_name: makeBeat Demo 2020
#
# author: Mr. Michaud
# description: Starter Code for experimenting with makeBeat
#
from earsketch import *
init()
setTempo(86)
# Build Drum Set
bassDrum = OS_KICK04
snare = OS_SNARE02
hat = OS_CLOSEDHAT02
bell = OS_COWBELL01
# Define Beat Patterns
bassBeat = "0------00-00----"
snareBeat = "----0+-0-0--0---"
hatBeat = "0+0+0+0+0+0+-0-0"
bellBeat = "0+0+0--00+000-00"
# Start and End Variables
start = 1
end = 2
# Loop the Beats!
for measure in range(start, end):
makeBeat(bassDrum, 1, measure, bassBeat)
makeBeat(snare, 2, measure, snareBeat)
makeBeat(hat, 3, measure, hatBeat)
makeBeat(bell, 4, measure, bellBeat)
finish()