DIGITAL AUDIO WORKSTATION

CODE EDITOR

from earsketch import *
init()
setTempo(120)

# variables for the main beat and the piano
piano1 = RD_POP_SYNTHBASS_6
piano2 = HOUSE_DEEP_DREAMPAD_001
house2 = RD_EDM_ANALOGPLUCK_2
fitMedia(house2, 1, 1, 17) #inserting main track
fitMedia(RD_POP_SYNTHBASS_6,5, 2, 19 )
sound1 = LUNAX_HIP_HOP_BEAT_LOOP7_WAV
beat = "0++00-00-0+++0+0++++++"

# using for loops to iterate rather than repeating similar code
for measure in range(11, 16, 2):
makeBeat(sound1, 3, measure, beat)

# seconnd beat pattern w/ while loops
beatA = "0++++++-0-0-00--000+++-"

# use a while loop for repeating the beats
counter = 0
start = 1 # this is the measure
track = 2
while counter <4:
makeBeat (piano1, 2, start, beatA)
start+= 2
counter+=1
makeBeat (piano2, 3, start, beatA)
start+= 3
counter+=2
start = 9
end = 20
fitMedia (piano1,track, start, end) #end loop
# effects
track = 1
IMPORT TO EDIT

Welcome Students and Teachers!

Welcome to EarSketch!

Teachers: View our new curriculum guide, and visit our EarSketch Teacher Site for additional resources.

Students: Continue below to learn more about EarSketch

Here you will learn computer science and music technology side by side. You will use either Python or JavaScript to create your own music.

Musicians and programmers write computer code to create new sounds, effects, and songs.

Learning to write computer code is a skill that will be useful to you in a variety of career paths.

Maybe you’ll become a legendary music producer or the industry’s most sought-after recording engineer! We wish you good luck on your EarSketch journey.

Click on the right arrow at the top of this text to get started.

Teachers, get access to free teacher materials and community here!