Design Journal: "Whose Swamp Is It Anyway?"
Design Journal: "Whose Swamp Is It Anyway?"
Design Journal: "Whose Swamp Is It Anyway?"
6310Project#1DesignJournal
WhoseSwampIsItAnyway?
8/21/2015
ShrekandDonkeysamplesduelingbackandforth
Thisismyswamp...orisit?
WhatifIsonifyimagesofShrekandDonkey?
NottoomanysynthsIwantthemoviesamplestodrivethesongskineticismandnuance
MyShrekandDonkeysamplesweretakenfromthefilm
Shrek
.Ifoundthemviathese
YouTubeclipsofscenesfromthefilm:
https://www.youtube.com/watch?v=MzLEjzvygYE
https://www.youtube.com/watch?v=YA24UBgWCAw
WHYSHREK?
ShrekisLove,ShrekisLife
Shrekisastrange,mildlynostalgicculturalartifact.
IfindShrekspresenceontheInternettobefascinating.
Ilikefindingnewmeaning(ornomeaning)inpostmodernremixingofculturalartifactsand
texts.ThinkYouTubePooporNegativland.
PRELIMINARYFORM
Intro
Shrek/DonkeyHook
ThisisMySwamp
Shrek/DonkeyHook
TheWeirdPart(withsonification?detailsTBA)
TheWeirderPart(Shrekchanting)
Shrek/DonkeyHook/Outro
FUNWITHCODING
Arrayswillkeepmeorganizedandmakethecodemorereadable.ThinkaboutChrisDeLeons
Processingtutorials.
Commentingliberallyisgood
BiggestWinToday
:Ifiguredouthowtomakemymusicalformfunctionscleanerandeasily
repeatablebymakingmythemtakeflexiblefirstMeasureandlastMeasurearguments.
ToFix/Improve
:Sofarsogood.Ineedtoreaduponsonificationandrandomizationin
EarSketch.
8/22
Imhavingfun,soImgoingtotryandgetaheadonthisproject.TheCsection/shrektionis
goingtobethemostdifficulttoprogram,though.
Shrekisaclassicmovie.IwillobeyShrekseverycommand.
Mystrategyfornow:trackallofthesamplesfirstsothatmymaincodeiscleanandworking.
Onceeachsectionofthesongiscompletelytracked,Illaddineffectsandweirditup.
Phrase(2measures)x2
Phrasex2
Phraserandomized(shuffleString)x2
Phraserandomized(makeBeatSlice?x2
Shrekchantingx4
Shrekchantingx4
Hook
FUNWITHCODING
Idliketofindaconditionalorfunctionwithinafunctionthatcouldcondensemyletteredand
primesectioncode(A/Aprime,forexample).Imdrawingblanksforthemoment,sinceitseems
likethesectionshavetoomuchvariationfrommeasuretomeasure.
OnethingICANdotoaddressthis:AnytimeamakeBeatorfitMediaisusedineverymeasure
ofasection,Icanremoveitfromtheconditionalsanduseitonceinsideaforloop.
Also,ifameasurelengthsequenceisidenticalandappearseveryothermeasure,Icanusean
even/oddmoduloconditional.
Imfindingsonificationtobedifficulttocode,buttheshuffleStringfunctionisworkingnicely.
makeBeatSliceisgivingmetrouble,andImnotsurewhy.TheexampleIcopiedfromtheAPI
pagedidntevenwork...
8/24
FUNWITHCODING
Thefoundationoftheprogramisfinished!Nowitstimetoaddsomeeffects
NowthatImaddingeffectsEarSketchistakingalongtimetoloadmyscripts.Iwonderif
theresanythingIcandoaboutthat.
TurnsoutitsmainlyPITCHSHIFTthatsactingup.Everythingelseloadingprettyquickly,andI
wasabletoaddsomeflangerandchorus,aswellasgainandcompressiontoevenoutthemix.
Onechallengewitheffects:figuringouthowtousethemtemporarilyandthenbypassor
silencethem.IcouldntgetBYPASStoworkasintended,somyverboseworkaroundforthe
timebeinginvolvesafunctionthatbringstheeffectmixdownto0.0,whichseemstobe
working.
8/27
FUNWITHCODING
Effectsareprettymuchfinished,too!Asidefrompossibleminortweaks,Ithinkthisthingis
goodtogo!
PITCHSHIFTisstillgivingmetrouble.Ispecificallywantedpitchshiftingenvelopestocreatea
randomizedsoundcollagefrommeasures56to59,butIcanachieveasimilarsenseofchaos
(andgetEarSketchtorunmyprogramsuccessfully!)bygivingtwoofthetracksinvolveda
randomizedflangereffectinstead.
8/28
TodayIllwriteanoutlineofmycodetoincludeinthecomments.
PITCHSHIFTismakingmyloadtimeincrediblyslowandcausinglatencyonpitchshifted
tracks,soImightforgousingitaltogetherinthefinalversionofmyprogram.
ItalsoseemsliketheEarSketchaudioengineishavingdifficultyrunningmycode,andthe
audiooccasionallystuttersorcutsoutentirely,forcingmetoreloadtheprogram.WhenIrana
testMP3throughAudacitythecasesofclippingwerentsevere,soIdontthinkthatsthe
problem.
9/7
Pitchshiftingisserversidenow!WOOOOOOOOOOO!!!
MyprogramstilltakesafewsecondstoloadintheDAW,butitworksnow.
9/15
Inresponsetothefirstdayofcritiques,IwanttoaddvariationtoShrektionDthatwillmakeit
lessrepetitive.Ididthiswitharandomizedpitchshiftingfunctionthatcreatesanenvelopeto
altermystutteringvoicesampleduringeachmeasure.
However(sadface),EarSketchisntfullycooperating.Thefunctionworks,butitscausingthe
relevanttrack(Track11)toexperienceasignificantdipinaudioquality,creatingastrangely
filteredsound.Icantrytoworkwiththis,butitsnotidealand,intheory,EarSketchisnot
behavinghowIexpectitto.IemailedAlbithtogethisandBriansthoughts.
9/18
BrianandJasonFreemanhavebeenunabletofigureoutwhatmyissuewithpitchshiftingis,
soIemailedhimwithamorespecificdescriptionofthetinnyunderwatersoundImgetting
whenmyfunPitchfunctioniscalled,unrelatedtohowthecodeexecutes.Imadeanewpitch
shiftingfunctioncalledfunPitchRhythmthatusesrhythmEffectsonTrack11(Imightlikeitbetter
thanfunPitch),butImstillgettingthesametinnysoundonthetrack.ImhopingBrianwillget
backtomeonMondaywithsomeadditionalinsightssoIhaveanideaofhowIshouldproceed.
IdontlikethetinnyeffectImhearing,butinthemeantimeIlladjustmygainandcompression
levelsonTrack11tocompensate.Thepitchshiftingisultimatelymoreimportanttomy
compositionthanthepresenceorlackthereofofthisstrangefilteredeffect.
ROUGHCODEOUTLINE
I.
SETUPInitializesEarSketchandsetsthetempo.
II.
SAMPLESANDINSTRUMENTSEachsubsectionincludesvariablesforsamples,beat
strings,andarrays(whichcontainasetofsamplesorbeatstrings).
A. ShrekandDonkeyAudiosamplesfromthefilm
Shrek
:Donkeysays,Shrek,Shrek
says,Donkey,Shreksays,Thisismyswamp,andDonkeysays,Smellyogre.
B. MyVoiceAudiosamplesofmyvoice:Shrekisaclassicmovie,IwillobeyShreks
everycommand,andShrek.
C. DrumKitAsetofsamplesrepresentingpiecesofadrumkit:Kick,Snare,HiHat,Clap,
Tom,andOpenHiHat.
1. Variable/TrackLegend:kick=3,snare=4,hiHat=5,clap=6,tom=7,openHat=8
D. OtherInstrumentsAsetofsamplesrepresentingadditionalmelodicorspecialeffects
stylesynthesizedsounds.
III.MUSICThesubsectionsandsubsubsectionsdefinefunctionsthatcomprisetheprograms
musicalform.
A. IntroProgramstartswithabackandforthbetweenShrekandDonkey.
B. ShrektionAShrektionisaplayonsection.Hahaveryclever,Dan.Sec.Aand
APrimecomprisewhatisessentiallytheprogramsmainrefrainorchorus.
1. ShrektionAPrimeInthisoutlinePrimereferstoathesubsectionofaparent
sectionthatcontainsthefoundationalelementsoftheparent(musicalform)
sectionaswellasseveraladditionsandvariations.ShrektionAPrime,for
examplecontainstheelementsofShrektionAplusanewsynthpattern.
C.ShrektionBSec.BandBPrimecomprisetheprogramsfirstverse.Theshiftfrom
chorustoverseisexemplifiedbythenewlyminimalisticpercussionandtheintroduction
oftheThisismyswampandSmellyogreaudiosamples.
1. ShrektionBPrimeBPrimemaintainstheorganizationofBandaddsa
twomeasurefillleadinguptonewcallsforAandAPrime.
D.ParfaitDrumBreakThisisafourbeattransitionaldrumbreaknamedafterasweettreat
that,accordingtoDonkey,everybodyloves.
E.ShrektionCThisfunctionbeginstheprogramssecondverse.Thedrumbeatshiftstoa
halftimegroove,andmyvoicerecordingspraisethecinematicimportanceofShrekand
pledgedevotiontothefilmstitularcharacter.
1.ShrektionCPrimeContinuingtheShrektionCgroove,asynthchoirpadisadded
andmyvoiceisalteredbyaflangereffect.
F.ShrektionDWhilethegroovefromShrektionCremains,IvenowusedthebeatShuffle
functiontorandomizethebeatstringscontainingchoir,hihat,andvoicesamples.This
createsanerraticstutteringeffectthatrhythmicallychangeseachtimeIruntheprogram.
Thisfunctiongetscalledtwiceinarow,andduringthesecondcallthevoicetrackis
equippedwitharandomizedpanningfunction.
G.ShrektionEThissection,abridgeofsorts,introducestheominousShrekchant,which
isdoubledinthefinaltwomeasuresbyanothervoicesamplewithaflangereffect.
1.ShrektionEPrimeHereweaddtoShrektionEgroovewithakickdrumsampleon
everybeat,apercussiverepetitionofthebeginningoftheDonkeysample,andthe
inclusionoftheIwillobeyvoicesample.WearedivingdeeperintotheCultof
Shrek.
2.ShrektionEPrime2FullyimmersedinallthingsShrek,thelistenerissurroundedby
astereophonicswirlofShreksamplestreatedwithchorusandflangereffects.As
thedrumkitengagesinasuccessivequartertoeighthtosixteenthrhythmicEDM
buildup,thelistenerisimmersedinShreksamples.Duringthelastmeasureofthe
function,theprogramsuddenlygoessilentexceptforasingleDonkeysample,
escapingfromShreksenchantingallureandreturningustotherefrain.
H.OutroFollowingafinalcallofShrektionAandShrektionAPrime,theprogramconcludes
withasingleShreksample,endingasitbegan.
IV.EFFECTSEachsubsectionincludesfunctioncallsfordifferenteffectsusedinthe
program.
A.GainThisismainlyusedtobalancetracklevelsinthemix.
B.FilterThefilterisappliedtoeliminatethehigherfrequenciesonaharshsoundingtom
sample.
C.CompressorThecompressorhelpsemphasizequietersamplesinthemix,suchas
Shrekisaclassicmovie.
D.Iusepanningtoaddvariationandasenseofchaostorepetitivesections.ThefunPan
functioncauseserraticleftrightpanningthatchangeseachtimetheprogramruns.
E.ChorusThechoruseffect(implementedwithaddChorus)givessamplesawide,
multivoiceintensitywhenIneedthemtobemorepresentduringmusicallydenseportions
oftheprogram.IhadtroublesuccessfullyimplementingthechorusBYPASSeffect,so
insteadIachievedthesameresultbyusingtheMIXeffectwithavalueof0(thenoChorus
function).
F.FlangerTheflangereffect(implementedwithaddFlanger)givesmyvoicesamplesan
alienqualitythatcontributestotheominousmoodofpartsoftheprogramandattachesa
senseoftransportiveotherworldlinesstothelistenersdescentintoShrekdom.Similarlyto
IV.E.,Iencounteredissuesbypassingtheflangereffect,soIusedthenoFlangerfunction
toreducetheflangerMIXto0.
V.MUSICALFORMThissectioncallsthefunctionsthatcomprisetheprogramsmusicalform.
Thearguments,firstMeasureandlastMeasure,dictatethemeasuresinwhichagiven
functionwillrun.
BACKUPCODE
ProTipforDan:EarSketchisbeingalittlefunkyloadingmycode/samplesandoccasionally
givingmetheunhelpfulchunksizeerror.Ishouldkeeparecentversionofmycode(that
works!)hereintheeventofanemergency.
IntheeventEarSketchbugsout,heresworkingcodeasof
9/21
:
//
//JavaScript
//
//Title:WhoseSwampIsItAnyway?
//
//Author:DanSinger
//
//
//Theprogramisoutlinedinthecomments.Mysyntaxforoutlining
//ismainSection.subSection.subSubSection(suchasI.A.1.).
//I.SETUPInitializesEarSketchandsetsthetempo.
init()
setTempo(110)
//II.SAMPLESANDINSTRUMENTSEachsubsectionincludesvariablesforsamples,
//beatstrings,andarrays(whichcontainasetofsamplesorbeatstrings).
//II.A.ShrekandDonkeyShrekandDonkeyAudiosamplesfromthefilmShrek:
//Donkeysays,Shrek,Shreksays,Donkey,Shreksays,Thisismyswamp,
//andDonkeysays,Smellyogre.
varshrek=DSINGER1_DONKEY_SAYS_SHREK
vardonkey=DSINGER1_SHREK_SAYS_DONKEY
varmySwamp=DSINGER1_SHREK_MY_SWAMP
varsmellyOgre=DSINGER1_DONKEY_OGRE
varshrek0="0+++++++"
varshrek1="0+++00000+++"
vardonkey0="0+++++++"
vardonkey1="0+++"
vardonkey2="0+++0+++00000+++"
vardonkey3="0000"
vardonkey4="0+++++++00000000"
varmySwamp0="0+++++++++++++++"
varmySwamp1="000000000000"
varmySwamp2="0++++++"
varsmellyOgre0="0+0++++++++"
varsmellyOgre1="0+0+0++++++++"
varsmellyOgre2="0++++++++"
varshrekBeat=[shrek0,shrek1]
vardonkeyBeat=[donkey0,donkey1,donkey2,donkey3,donkey4]
varmySwampBeat=[mySwamp0,mySwamp1,mySwamp2]
varsmellyOgreBeat=[smellyOgre0,smellyOgre1,smellyOgre2]
//II.B.MyVoiceAudiosamplesofmyvoice:Shrekisaclassicmovie,
//IwillobeyShrekseverycommand,andShrek.
varclassic=DSINGER1_CLASSIC_MOVIE1
varobey=DSINGER1_OBEY_COMMAND
varchant=DSINGER1_SHREK_CHANT
varfullClip0="0+++++++++++++++"
varclassicBeat1="0000000++++"
varobeyBeat1="000000++++"
chantBeat0="0+++++++0+++++++"
chantBeat1="0+++0+++0+++0+++"
chantBeat2="0+0+0+0+0+0+0+0+"
varvoiceRecord=[classic,obey,chant]
varclassicBeat=[fullClip0,classicBeat1]
varobeyBeat=[fullClip0,obeyBeat1]
varchantBeat=[chantBeat0,chantBeat1,chantBeat2]
//II.C.DrumKitAsetofsamplesrepresentingpiecesofadrumkit:
//Kick,Snare,HiHat,Clap,Tom,andOpenHiHat.
//II.C.1.Variable/TrackLegend:kick=3,snare=4,hiHat=5,clap=6,tom=7,openHat=8
varkick=Y07_KICK
varsnare=OS_SNARE02
varhiHat=Y07_HI_HAT
varclap=OS_CLAP01
vartom=OS_LOWTOM01
varopenHat=OS_OPENHAT02
vardrumKit=[kick,snare,hiHat,openHat,clap,tom]
varkickBeat0="000000"
varkickBeat1="000+"
varkickBeat2="0000++"
varkickBeat3="00"
varkickBeat4="0+0+0+0+"
varkickBeat5="0+0+0+0+0+0+0+0+"
varkickBeat6="0000000000000000"
varsnareBeat0="0000"
varsnareBeat1="000000"
varsnareBeat2="000000000000"
varsnareBeat3="0+++"
varsnareBeat4="00000"
varsnareBeat5="0000++"
varhiHatBeat0="0000000000000000"
varhiHatBeat1="00"
varhiHatBeat2="0000"
varhiHatBeat3="0+0+0+0+"
varhiHatBeat4="0+0+0+0+0+0+0+0+"
varhiHatBeat5="000000000"
varhiHatBeat6="00000000"
varopenHatBeat0="0+++++++0+++++++"
varclapBeat0="0+"
varclapBeat1="0000"
vartomBeat0="0+++0+00"
vartomBeat1="0+++000+"
vartomBeat2="0+++"
varkickBeat=[kickBeat0,kickBeat1,kickBeat2,kickBeat3,kickBeat4,kickBeat5,kickBeat6]
varsnareBeat=[snareBeat0,snareBeat1,snareBeat2,snareBeat3,snareBeat4,snareBeat5]
varhiHatBeat=
[hiHatBeat0,hiHatBeat1,hiHatBeat2,hiHatBeat3,hiHatBeat4,hiHatBeat5,hiHatBeat6]
varopenHatBeat=[openHatBeat0]
varclapBeat=[clapBeat0,clapBeat1]
vartomBeat=[tomBeat0,tomBeat1,tomBeat2]
//I.D.OtherInstrumentsAsetofsamplesrepresentingadditional
//melodicorspecialeffectsstylesynthesizedsounds.
varsynth1=RD_EDM_RAVELEAD_2
varsfx1=EIGHT_BIT_ATARI_SFX_006
varpluck=RD_CINEMATIC_SCORE_STRINGS_7
varchoir=YG_NEW_HIP_HOP_CHOIR_1
varelectroPad=Y26_ELECTRO_3
varreverser=YG_EDM_REVERSE_FX_1
varchoirBeat="0+++++++++++++++"
varchoirBeat1="0+0+0+0+0000"
//III.MUSICThesubsectionsandsubsubsectionsdefinefunctions
//thatcomprisetheprogramsmusicalform.
//III.A.IntroProgramstartswithabackandforthbetweenShrek
//andDonkey.
varintro=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
makeBeat(shrek,1,firstMeasure,shrekBeat[0])
makeBeat(donkey,2,firstMeasure,donkeyBeat[0])
}
}
//III.B.ShrektionAShrektionisaplayonsection.
//Hahaveryclever,Dan.ShrektionAandAPrimecomprisewhatis
//essentiallytheprogramsmainrefrainorchorus.
varshrektionA=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
if(firstMeasurelastMeasure===1){
makeBeat(donkey,2,firstMeasure,donkeyBeat[2])
makeBeat(drumKit[1],4,firstMeasure,snareBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[1])
makeBeat(drumKit[4],6,firstMeasure,clapBeat[0])
}
else{
makeBeat(shrek,1,firstMeasure,shrekBeat[1])
makeBeat(donkey,1,firstMeasure,donkeyBeat[1])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[0])
makeBeat(drumKit[1],4,firstMeasure,snareBeat[0])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[0])
}
}
}
//III.B.1.ShrektionAPrimeInthisoutlinePrimerefers
//toathesubsectionofaparent(musicalform)sectionthatcontainsthe
//foundationalelementsoftheparentsectionaswellasseveral
//additionsandvariations.ShrektionAPrime,forexamplecontains
//theelementsofShrektionAplusanewsynthpattern.
varshrektionA_prime=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
if(firstMeasurelastMeasure===1){
makeBeat(donkey,2,firstMeasure,donkeyBeat[2])
makeBeat(drumKit[1],4,firstMeasure,snareBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[1])
makeBeat(drumKit[4],6,firstMeasure,clapBeat[0])
}
else{
makeBeat(shrek,1,firstMeasure,shrekBeat[1])
makeBeat(donkey,1,firstMeasure,donkeyBeat[1])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[0])
makeBeat(drumKit[1],4,firstMeasure,snareBeat[0])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[0])
fitMedia(synth1,9,firstMeasure,firstMeasure+1)
}
}
}
//III.C.ShrektionBSec.BandBPrimecomprisetheprogramsfirstverse.
//Theshiftfromchorustoverseisexemplifiedbythenewlyminimalistic
//percussionandtheintroductionoftheThisismyswampandSmellyogre
//audiosamples.
varshrektionB=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
makeBeat(drumKit[3],8,firstMeasure,openHatBeat[0])
if(firstMeasure%2===1){
makeBeat(mySwamp,1,firstMeasure,mySwampBeat[0])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[0])
}
elseif(firstMeasure+3===lastMeasure){
makeBeat(smellyOgre,2,firstMeasure,smellyOgreBeat[0])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[1])
makeBeat(smellyOgre,2,firstMeasure,smellyOgreBeat[1])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[2])
}
else{
}
}
}
//III.C.1.ShrektionBPrimeShrektionBPrimeBPrimemaintainsthe
//organizationofBandaddsatwomeasurefillleadinguptonewcalls
//forAandAPrime.
varshrektionB_prime=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
if(firstMeasure+4===lastMeasure){
makeBeat(mySwamp,1,firstMeasure,mySwampBeat[0])
makeBeat(drumKit[3],8,firstMeasure,openHatBeat[0])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[0])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[3])
}
elseif(firstMeasure+3===lastMeasure){
makeBeat(smellyOgre,2,firstMeasure,smellyOgreBeat[0])
makeBeat(drumKit[3],8,firstMeasure,openHatBeat[0])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[1])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[4])
}
elseif(firstMeasure+2===lastMeasure){
makeBeat(mySwamp,1,firstMeasure,mySwampBeat[1])
makeBeat(drumKit[3],8,firstMeasure,openHatBeat[0])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[0])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[0])
}
else{
makeBeat(mySwamp,1,firstMeasure,mySwampBeat[2])
makeBeat(donkey,4,firstMeasure,donkeyBeat[3])
makeBeat(smellyOgre,2,firstMeasure,smellyOgreBeat[2])
fitMedia(sfx1,10,firstMeasure,firstMeasure+.5)
}
}
}
//III.D.ParfaitDrumBreakThisisafourbeattransitionaldrumbreak
//namedafterasweettreatthat,accordingtoDonkey,everybodyloves.
varparfaitDrumBreak=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
makeBeat(drumKit[1],4,firstMeasure,snareBeat[2])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[2])
makeBeat(drumKit[5],7,firstMeasure,tomBeat[2])
makeBeat(drumKit[4],6,firstMeasure,clapBeat[1])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[0])
makeBeat(donkey,2,firstMeasure,donkeyBeat[3])
}
}
//III.E.ShrektionCThisfunctionbeginstheprogramssecondverse.
//Thedrumbeatshiftstoahalftimegroove,andmyvoicerecordings
//praisethecinematicimportanceof"Shrek"andpledgedevotiontothe
//filmstitularcharacter.
varshrektionC=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
makeBeat(drumKit[0],3,firstMeasure,kickBeat[3])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[6])
if(firstMeasure%2===0){
makeBeat(drumKit[1],4,firstMeasure,snareBeat[3])
makeBeat(voiceRecord[0],11,firstMeasure,classicBeat[0])
}
else{
makeBeat(drumKit[1],4,firstMeasure,snareBeat[4])
makeBeat(voiceRecord[1],11,firstMeasure,obeyBeat[0])
fitMedia(pluck,12,firstMeasure,firstMeasure+1)
}
}
}
//III.E.1.ShrektionCPrimeShrektionCPrimeContinuingthe
//ShrektionCgroove,asynthchoirpadisaddedandmyvoiceis
//alteredbyaflangereffect.
varshrektionC_prime=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
makeBeat(choir,13,firstMeasure,choirBeat)
makeBeat(drumKit[0],3,firstMeasure,kickBeat[3])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[6])
if(firstMeasure%2===0){
makeBeat(drumKit[1],4,firstMeasure,snareBeat[3])
makeBeat(voiceRecord[0],11,firstMeasure,classicBeat[0])
}
else{
makeBeat(drumKit[1],4,firstMeasure,snareBeat[4])
makeBeat(voiceRecord[1],11,firstMeasure,obeyBeat[0])
fitMedia(pluck,12,firstMeasure,firstMeasure+1)
}
}
}
//III.F.ShrektionDShrektionDWhilethegroovefrom
//ShrektionCremains,IvenowusedthebeatShufflefunction
//torandomizethebeatstringscontainingchoir,hihat,andvoice
//samples.Thiscreatesanerraticstutteringeffectthat
//rhythmicallychangeseachtimeIruntheprogram.Thisfunction
//getscalledtwiceinarow,andduringthesecondcallthevoice
//trackisequippedwitharandomizedpanningfunction.
varshrektionD=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
if(firstMeasure%2===0){
varrandClassic=shuffleString(classicBeat[1])
makeBeat(voiceRecord[0],11,firstMeasure,randClassic)
makeBeat(choir,13,firstMeasure,choirBeat)
makeBeat(drumKit[0],3,firstMeasure,kickBeat[3])
makeBeat(drumKit[1],4,firstMeasure,snareBeat[3])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[6])
}
else{
varrandChoir=shuffleString(choirBeat1)
makeBeat(choir,13,firstMeasure,randChoir)
varrandObey=shuffleString(obeyBeat[1])
makeBeat(voiceRecord[1],11,firstMeasure,randObey)
varrandHiHat=shuffleString(hiHatBeat[6])
makeBeat(drumKit[2],5,firstMeasure,randHiHat)
makeBeat(drumKit[0],3,firstMeasure,kickBeat[3])
makeBeat(drumKit[1],4,firstMeasure,snareBeat[4])
fitMedia(pluck,12,firstMeasure,firstMeasure+1)
}
}
}
//III.G.ShrektionEThissection,abridgeofsorts,introduces
//theominousShrekchant,whichisdoubledinthefinaltwomeasures
//byanothervoicesamplewithaflangereffect.
varshrektionE=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
fitMedia(electroPad,14,firstMeasure,firstMeasure+1)
makeBeat(chant,15,firstMeasure,chantBeat[0])
if(lastMeasure2<=firstMeasure){
makeBeat(drumKit[0],3,firstMeasure,kickBeat[1])
makeBeat(chant,16,firstMeasure,chantBeat[0])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[6])
}
//III.G.1.ShrektionEPrimeHereweaddtoShrektionEgroovewith
//akickdrumsampleoneverybeat,apercussiverepetitionofthe
//beginningoftheDonkeysample,andtheinclusionoftheIwill
//obeyvoicesample.WearedivingdeeperintotheCultofShrek.
varshrektionE_prime=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
fitMedia(electroPad,14,firstMeasure,firstMeasure+1)
makeBeat(chant,15,firstMeasure,chantBeat[0])
makeBeat(chant,16,firstMeasure,chantBeat[0])
makeBeat(drumKit[0],3,firstMeasure,kickBeat[4])
makeBeat(drumKit[2],5,firstMeasure,hiHatBeat[6])
if(firstMeasure===lastMeasure5||firstMeasure===lastMeasure1){
makeBeat(voiceRecord[1],11,firstMeasure,obeyBeat[0])
}
elseif(firstMeasure%2!=0){
fitMedia(pluck,12,firstMeasure,firstMeasure+1)
makeBeat(donkey,2,firstMeasure,donkeyBeat[3])
}
}
}
//III.G.2.ShrektionEPrime2FullyimmersedinallthingsShrek,
//thelistenerissurroundedbyastereophonicswirlofShreksamples
//treatedwithchorusandflangereffects.Asthedrumkitengagesina
//successivequartertoeighthtosixteenthrhythmicEDMbuildup,the
//listenerisimmersedinShreksamples.Duringthelastmeasureof
//thefunction,theprogramsuddenlygoessilentexceptforasingle
//Donkeysample,escapingfromShreksenchantingallureandreturning
//ustotherefrain.
varshrektionE_prime2=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
if(firstMeasure+1<lastMeasure){
varchantShuffle=shuffleString(chantBeat[1])
varchantShuffle1=shuffleString(chantBeat[1])
varrandChoir=shuffleString(choirBeat1)
varrandObey=shuffleString(obeyBeat[1])
varrandHiHat=shuffleString(hiHatBeat[6])
makeBeat(chant,17,firstMeasure,chantShuffle)
makeBeat(chant,18,firstMeasure,chantShuffle1)
makeBeat(choir,13,firstMeasure,randChoir)
makeBeat(voiceRecord[1],11,firstMeasure,randObey)
fitMedia(electroPad,14,firstMeasure,firstMeasure+1)
}
if(firstMeasure+4===lastMeasure){
makeBeat(drumKit[0],3,firstMeasure,kickBeat[4])
}
if(firstMeasure+3===lastMeasure){
makeBeat(drumKit[0],3,firstMeasure,kickBeat[5])
}
if(firstMeasure+2===lastMeasure){
varchantShuffle2=shuffleString(chantBeat[1])
makeBeat(chant,19,firstMeasure,chantShuffle2)
makeBeat(drumKit[0],3,firstMeasure,kickBeat[6])
fitMedia(reverser,20,firstMeasure,firstMeasure+1)
}
if(firstMeasure===lastMeasure1){
makeBeat(donkey,2,firstMeasure,donkeyBeat[4])
}
}
}
//III.H.OutroFollowingafinalcallofShrektionAand
//ShrektionAPrime,theprogramconcludeswithasingle
//Shreksample,endingasitbegan.
varoutro=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
makeBeat(shrek,1,firstMeasure,shrekBeat[0])
}
}
//IV.EFFECTSEachsubsectionincludesfunctioncallsfor
//differenteffectsusedintheprogram.SeetheTrackLegend
//belowforanoverviewofhowthesamplesusedcorrespondto
//trackswhereeffectsareapplied.
//
//TrackLegend:
//1="Shrek/Thisismyswamp,"2="Donkey/Smellyogre,"3=kick,4=snare,
//5=hiHat,6=clap,7=tom,8=openHat,9=synth,10=sfx1,
//11="Shrekisaclassicmovie/IwillobeyShrek'severycommand,"
//12=pluck,13=choir,14=pad,15="Shrek"chant#1,16="Shrekchant#2,
//17=chantShuffle#1,18=chantShuffle#2,19=chantShuffle#3,20=reverser
//IV.A.GainThisismainlyusedtobalancetracklevelsinthemix.
setEffect(1,VOLUME,GAIN,2.0)
setEffect(2,VOLUME,GAIN,1.0)
setEffect(3,VOLUME,GAIN,3.5)
setEffect(4,VOLUME,GAIN,3.0)
setEffect(7,VOLUME,GAIN,4.5)
setEffect(8,VOLUME,GAIN,6.0)
setEffect(10,VOLUME,GAIN,3.5)
setEffect(11,VOLUME,GAIN,4.5)
setEffect(13,VOLUME,GAIN,1.0)
setEffect(15,VOLUME,GAIN,0.5)
setEffect(16,VOLUME,GAIN,0.5)
//IV.B.FilterThefilterisappliedtoeliminatethehigher
//frequenciesonaharshsoundingtomsample.
setEffect(7,FILTER,FILTER_FREQ,175.0)
//IV.C.CompressorThecompressorhelpsemphasizequieter
//samplesinthemix,suchasShrekisaclassicmovie.
//onTrack11.
setEffect(1,COMPRESSOR,COMPRESSOR_THRESHOLD,10.0)
setEffect(2,COMPRESSOR,COMPRESSOR_THRESHOLD,11.0)
setEffect(11,COMPRESSOR,COMPRESSOR_THRESHOLD,6.0)
setEffect(12,COMPRESSOR,COMPRESSOR_THRESHOLD,10.5)
setEffect(13,COMPRESSOR,COMPRESSOR_THRESHOLD,9.0)
setEffect(17,COMPRESSOR,COMPRESSOR_THRESHOLD,9.0)
setEffect(18,COMPRESSOR,COMPRESSOR_THRESHOLD,8.0)
setEffect(19,COMPRESSOR,COMPRESSOR_THRESHOLD,7.0)
//IV.D.PanningIusepanningtoaddvariationandasense
//ofchaostorepetitivesections.ThefunPanfunctioncauses
//erraticleftrightpanningthatchangeseachtimetheprogramruns.
setEffect(15,PAN,LEFT_RIGHT,65.0)
setEffect(16,PAN,LEFT_RIGHT,65.0)
//funPanfunction
varfunPan=function(track,firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
if(track%2===1&&track>=17){
setEffect(track,PAN,LEFT_RIGHT,(Math.random()*50)+1,firstMeasure,(Math.random()*50)+1,fi
rstMeasure+1)
}
else{
setEffect(track,PAN,LEFT_RIGHT,(Math.random()*50)+1,firstMeasure,(Math.random()*50)+1,fi
rstMeasure+1)
}
}
}
funPan(11,40,44)
funPan(11,51,59)
funPan(17,56,59)
funPan(18,56,59)
funPan(19,58,59)
//IV.E.ChorusThechoruseffect(implementedwithaddChorus)gives
//samplesawide,multivoiceintensitywhenIneedthemtobemorepresent
//duringmusicallydenseportionsoftheprogram.Ihadtroublesuccessfully
//implementingthechorusBYPASSeffect,soinsteadIachievedthesame
//resultbyusingtheMIXeffectwithavalueof0(thenoChorusfunction).
varaddChorus=function(track,firstMeasure,lastMeasure,numVoices,rate,mod){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
setEffect(track,CHORUS,CHORUS_NUMVOICES,numVoices,firstMeasure)
setEffect(track,CHORUS,CHORUS_RATE,rate,firstMeasure)
setEffect(track,CHORUS,CHORUS_MOD,mod,firstMeasure)
}
}
varnoChorus=function(track,firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
setEffect(track,CHORUS,MIX,0,firstMeasure,0,lastMeasure)
}
}
addChorus(11,40,44,2,4.0,Math.random()*1)
noChorus(11,44,69)
addChorus(17,56,59,1.5,3.0,Math.random()*1)
addChorus(18,56,59,1.5,3.0,Math.random()*1)
addChorus(19,56,59,1.5,3.0,Math.random()*1)
//IV.F.FlangerTheflangereffect(implementedwithaddFlanger)gives
//myvoicesamplesanalienqualitythatcontributestotheominous
//moodofpartsoftheprogramandattachesasenseoftransportive
//otherworldlinesstothelistener'sdescentintoShrekdom.
//SimilarlytoIV.E.,Iencounteredissuesbypassingtheflanger
//effect,soIusedthenoFlangerfunctiontoreducetheflangerMIX
//to0.
varaddFlanger=function(track,firstMeasure,lastMeasure,feedback,rate){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
setEffect(track,FLANGER,FLANGER_FEEDBACK,feedback,firstMeasure)
setEffect(track,FLANGER,FLANGER_RATE,rate,firstMeasure)
}
}
varnoFlanger=function(track,firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
setEffect(track,FLANGER,MIX,0.0,firstMeasure,0.0,lastMeasure)
}
}
addFlanger(11,32,36,60.0,(Math.random()*5)+8)
noFlanger(11,36,50)
addFlanger(11,50,55,60.0,Math.random()*15+1)
addFlanger(17,56,59,40.0,Math.random()*10+1)
addFlanger(18,56,59,40.0,Math.random()*15+1)
//IV.G.PitchShiftThiseffectshiftsthepitchof
//atracktoachieveademonicorchipmunkesquequality.
//ThefunctionfunPitchRhythmrandomlyandrapidly
//pitchshiftsthemangledspokenwordaudioofTrack11.
setEffect(16,PITCHSHIFT,PITCHSHIFT_SHIFT,6.0)
setEffect(11,PITCHSHIFT,PITCHSHIFT_SHIFT,0.0,44)
setEffect(18,PITCHSHIFT,PITCHSHIFT_SHIFT,1,58,Math.random()*6+1,59)
setEffect(19,PITCHSHIFT,PITCHSHIFT_SHIFT,1,58,Math.random()*6+1,59)
varfunPitchArray=[Math.floor(Math.random()*11),Math.floor(Math.random()*11),
Math.floor(Math.random()*6)]
varfunPitchString=shuffleString("012012012012")
varfunPitchRhythm=function(firstMeasure,lastMeasure){
for(firstMeasurefirstMeasure<lastMeasurefirstMeasure++){
rhythmEffects(11,PITCHSHIFT,PITCHSHIFT_SHIFT,funPitchArray,
firstMeasure,funPitchString)
}
}
funPitchRhythm(40,44)
//V.MUSICALFORMThissectioncallsthefunctionsthat
//comprisetheprogramsmusicalform.Thearguments,
//firstMeasureandlastMeasure,dictatethemeasuresin
//whichagivenfunctionwillrun.
intro(1,3)
shrektionA(3,7)
shrektionA_prime(7,11)
shrektionB(11,15)
shrektionB_prime(15,19)
shrektionA(19,23)
shrektionA_prime(23,27)
parfaitDrumBreak(27,28)
shrektionC(28,32)
shrektionC_prime(32,36)
shrektionD(36,40)
shrektionD(40,44)
shrektionE(44,48)
shrektionE_prime(48,56)
shrektionE_prime2(56,60)
shrektionA(60,64)
shrektionA_prime(64,68)
parfaitDrumBreak(68,69)
outro(69,70)
finish()