Loading...
DIGITAL AUDIO WORKSTATION
CODE EDITOR
1
EarSketch
Advanced
Variables
Logic
Operators
Control Flow
# python code
# script_name: MySong.py
#
# author: Nathan Lapak
# description: My entry for the eark sketch competition.
#
'''
This song is an R&B and hip-hop song.
It has an intro, verse 1, chorus, verse 2 and outro.
I created a function for each part of the song to make the code more organized and maybe reuseable
'''
# Import earsketch
from earsketch import *
# Function to make my intro
def intro():
# Add instruments to track
hiHat = YG_RNB_FUNK_HIHAT_1
fitMedia(hiHat, 1, 1, 13.3)
fitMedia(RD_RNB_KEYSRHODES_5, 2, 1, 13.3)
fitMedia(RD_RNB_SFX_LIGHTAIR_1, 3, 13.5, 15.5)
# Make track 1 and track 2 slowly loss volume then regain the volume as verse1 approaches
setEffect(1, VOLUME, GAIN, 0, 5, -30, 13.5)
setEffect(2, VOLUME, GAIN, 0, 9, -30, 13.5)
# Instruments for the beat
closedHat = OS_CLOSEDHAT04
lowTom = OS_LOWTOM04
openHat = OS_OPENHAT03
# Patterns for each instrument
IMPORT TO EDIT
CURRICULUM
Loading curriculum...