Download - Generating Groove: Predicting Jazz Harmonizationcs229.stanford.edu/proj2017/final-posters/5148557.pdf · Our dataset was a set of 149 “Jazz Standards” encoded in Lilypond musical

Transcript

Generating Groove: Predicting Jazz Harmonization Nicholas Bien1 ([email protected]) and Lincoln Valdez2 ([email protected]

1 Department of Computer Science, Stanford University, 2 Department of Computer Science, Stanford University

Weaimtogenerateanappropriatejazzchordprogressionforagivenmelody.Asmusicalminds,wewantedtoseeifitispossibletocreateamodelthatcanmakeanymelodysoundjazzy.Classicaltheoryisverypredictable.Priorresearchhasgeneratedchordharmoniza@onsforclassicalandpopmusicwithhighaccuracy.[1]Jazztheoryisalotlessformulaic,sopredic@ngjazzprogressionsseemedalotmorechallenging.

ß2AR

Mo#va#on

DatasetandFeatureMappingOurdatasetwasasetof149“JazzStandards”encodedinLilypondmusicaltranscrip@onformat.Eachsonginthedatasetconsistedofamelodylinewithaccompanyingchordsymbols.WetransposedeachsongtothekeyofCmajor/Aminor.Foreachchordsymbol,wecountthenumberof@meseachofthe12notesinthechroma@cscaleoccurstoobtainourfeatures.

Therewere246chordtypesinourdataset.Tofacilitateclassifica@on,weexploredmethodsforgroupingchordsintosimilarclusters.

ClusteringAlgorithms

Combiningtheresultsofthetwoalgorithms,weobservedthatchordswherenoteswerestackedontopofthe7thwereclusteredtogether,andthat7thchordshadsimilarfunc@onstotheirrespec@vetriadsand6ths.Ourclusteringeffortsbroughtthenumberofchordclassesdownfrom246to85.

Classifica#onAlgorithmsAlgorithm %AccuracyBaseline 17.6%NaïveBayes 26.2%SupportVectorClassifier 28.3%

SupportVectorClassifierw/HMM 27.4%

NaïveBayesForourfirstchordpredic@onalgorithm,weimplementedaone-offLaplace-smoothedNaïveBayesclassifier.Theposteriorlikelihoodofeachclasswascalculated:Theresultswerepromising:thoughtheaccuracywasn’tthathigh,itwasabovebaseline,andtheactualchordspredictedforagivenmelodywererealis@c.

K-meansandBrownClustering

SupportVectorClassifierOursecondmethodwasamul@-classsupportvectorclassifier.Inputvectorswere12-dimensionalnotecounts.Weusedaradialbiasfunc@onkernel:TheSVCoutperformedNaïveBayesandseemedtocapturetheharmoniccontentofthemelody,especiallywhenmanynoteswerepresentinafeaturevector.

HiddenMarkovModel

Lastly,wetriedincorpora@ngahiddenMarkovmodelwithourSVCtocapturerela@onshipsbetweenchords.[2]Forthistask,weaugmentedthedatasetwithSTARTandENDtokens.Transi@onprobabili@eswerecalculatedfrombigramsinthetrainingset.WeusedSVCoutputsasnoisyes@matorsofthegroundtruthchordtoobtainemissionprobabili@es.WethenusedtheViterbialgorithmtoobtainthemaximumlikelihoodsequenceofhiddenstates(chordsclasses)giventheobservedstates(SVCpredic@ons).

FutureDirec#onsWhatwelearnedfromthisprojectisthattheproblemweweretryingtotackleisalotmoredifficultthanweini@allythought.Welikelycouldhaveachievedmuchhigheraccuracywiththesameapproachonclassicalmusic,sincejazzmusicisfartooexpansivegiventhelimiteddatasetwehadaccessto.Possiblefutureapproachescouldbe:•  Expandingresearchintotheneuralnetworkrealm[3]•  Obtaining/crea@ngmoredata•  Tryingtheexperimentfirstonclassicaltheory,tuning,refining

andthenextrapola@ngtojazz

References[1]Simon,Ian,DanMorris,andSumitBasu."MySong:Automa@cAccompanimentGenera@onforVocalMelodies."CHIProceedings.2008.[2]Cunha,UraquitanSidneyandGeberRamalho."AnIntelligentHybridModelforChordPredic@on."OrganisedSound4(2),pp.115-119.1999.[3]Gang,Dan,DanielLehmann,andNaoaliWagner."TuningaNeuralNetworkforHarmonizingMelodiesinReal-Time."1998.[4]Paiement,Jean-François,DouglasEck,andSamyBengio."Probabilis@cMelodicHarmoniza@on."LNAI4013,pp.218-229.2006.

WefirsttriedusingK-meansclusteringwiththenormalizednotecountsasfeaturesandseeingwhichchordscenteredaroundtheini@alizedcentroids.OursecondmethodwasBrownclustering,whichisnormallyusedfortheseman@csofwordsinsentencesbasedontheircontext.Instead,weuseditonsequencesofchords.

ResultsClusteringResults

PCAofaggregatednotefeaturesaoerchordclustering

Fortes@ng,weused80/20crossvalida@on(splitbysong).Dependingontherun,thisamountedto~6200chordsinthetrainingsetand~1500chordsinthetestset.

Allalgorithmseasilyoutperformedthebaseline.Whilethenumberscouldcertainlybeimprovedbyreducingthenumberofclassesevenfurther,wewerepleasedwiththeaesthe@[email protected]@cular,incorpora@ngaHiddenMarkovModelwiththeSVMloweredoverallaccuracyslightlybutproducedmorecanonicaljazzprogressions,evenfornon-jazzmusic.