DIGITAL AUDIO WORKSTATION

CODE EDITOR

# BreakBeatCode example Day 3 lesson
# script_name: 03.fitMedia-insertMedia-makeBeat.py
# version/date: 20220426
#
# author: Fernando Sanchez
#
# description:
# - fitMedia on one track
# - fitMedia on multiple tracks
# - makeBeat
#

# Anything after a hashtag is a Comment
# It's helpful as documentation to inform the reader/coder
# Makes the code more readable but it's not executed

# It's also used to execute code "in parts" for debugging
# In these examples, you are expected to gradually uncomment some parts
# 120 BPM

from earsketch import *

init() #in latest version this is not required

mytempo = readInput("What tempo would you like to use?") #set Tempo to 120 Beats Per Minute (BPM)
a_number = int(mytempo)
setTempo(a_number)

##### Part 1:
##### A few fitMedia() examples:

start = 1
end = 9

# - A beat / drum pattern extending through track 1 (use fitMedia() for this)
beat_number = readInput("Beat 1 or Beat 2 (1 or 2)")
IMPORT TO EDIT