DIGITAL AUDIO WORKSTATION

CODE EDITOR

# python code
# script_name:Jukebox
#
# author:Luke Brandt
# description:Musically, Project 4 functions the same as Project 3. f Project 3 solution did not utilize a list in 1a, Project 4 must use a list or a class. If Project 3 did utilize a list, Project 4 must use a class.
#

from earsketch import *
from random import *

init()
class Song:
def __init__(self, sound, track, start, end):
self.sound = sound
self.track = track
self.start = start
self.end = end
def writeToDAW(self):
fitMedia(self.sound, self.track, self.start, self.end)
# creates a pop song
def popSong():
setTempo(120)
softLead = Song(RD_POP_SOFTINELEAD_1, 1, 1, 17)

padChord = Song(RD_POP_PADCHORD_1, 2, 1, 17)
keyPluck = Song(RD_POP_KEYPLUCK_3, 3, 9, 17)

mainBeat = Song(RD_POP_MAINBEAT_1, 4, 5, 17)

# writes to DAW using the objects stored in a list
InstrumentList = [softLead, padChord, keyPluck, mainBeat]
IMPORT TO EDIT