Linear Algebra and Music Theory By Christopher Sannar The relation to music and Mathematics is quite a thick topic to discuss

advertisement
LinearAlgebraandMusicTheory
ByChristopherSannar
TherelationtomusicandMathematicsisquiteathicktopictodiscuss
because,inaverygeneralsense,musicismathematics.Itisadifferenceand
consistencyofchangesinmelodyandrhythmthatgeneratessoundinawaythatwe
enjoyandappreciateit.Manydifferentapplicationshavebeenusedtodescribe
thesechangesfromlogarithmicfluctuationinsoundwavefrequencytothe
differenceandscalerelationsoftransposedmusic.Besideswhatrelationsweknow
oflinearalgebraandmusicalready,Iwishtotakeanunconventionallookattheuse
ofLinearAlgebrainmusiccompositionbyrepresentingmusicintheformofa
matrixinsteadofonastaffandclef.
ThistopicinterestsmeinparticularbecauseIhavealwayslovedcomposing
musicandthedifferencesinmelodiesviaMusictheory.Iwasn’tsurehowto
representituntilIsawavideoonlineinwhichamusicianusedaphysical
programmablematrixtorepresenthismusic.Itturnsoutthatsuchaprogrammable
modelsuchasthatisverycommonamongmanymusicalinstrumentssuchasmusic
boxes.Throughthis,andaftermorestudyingandsomeofmyownexperiments,
derivedvariousideasonhowLinearAlgebracanbeusedtorepresentand
manipulatemusiconatheoreticallevel.
RepresentingMusicinaMatrix
Normallymusicisrepresentedbyastaffandclefasinwhatfollows:
The5horizontalbars,orstaff,representtheprogressivestepsbetween
notes.Thetrebleclefsignifieshowthestaffsrepresentthenotes(orfrequencies)
whilethetwo4’srepresentthetimesignatureorhowtherhythmisdivided(alsoa
tempoisusedtorepresenttimegiveninbeatsperminute).Thebarsbreakupthe
amountofnotesthatcanbeplayedwithineachsectionwiththetimesignaturein
mind.Fromthere,notes(♩)areplaceinsequentialordertodeterminethemusic
withachangeinstructure(♪)torepresentthedifferenceinmelodyandlength.
Withvariationsontheuseofeachoftheseelements,thisisthetraditional
wayofwritingandreadingmusic.Inasense,itisamatrixalreadyonlytransposed
fromourusualview.Todisplaythisintheformatofamatrix,Iwillberepresenting
bya1x12matrixasfollows:
[0,0,0,0,0,0,0,0,0,0,0,0]
Thematrixrowscanrepresentthenumberofbeatsper-sectionsimilartothe
4by4timesignature,thiswillbecomemoreimportantfurtheron.The12columns
representthe12notesorfrequenciesinascalethataredetectablebyhumanearsto
theoctave.Theoctave(notincluded)isanotethatisexactlyhalfthefrequencyof
thestarting,thatissignificantbecausetheyarethesamenote,yetatadifferent
pitch.Melodyandnoteswillbeusedasnumbersonthematrix.A1willrepresentas
aquarternoteperrowandcanbeincreasedinnumbertosignifyvolumeand
intensity.Justashowthestaffandsignatureschangeonthetraditional
representationofmusic,ourmatrixcanbeadjustedtofitourneedssuchas
increasingthecolumnstorepresentmorenotesandchangingtherowstomoretime
ortimingrepresentation.
Nowwithourdefinitionofamatrixset,wecanbeginexploringthe
propertiesofhowmusictheoryisrepresentedinourmatrix.
MusicalTheoryandMatrixRank
Musictheorygenerallyrevolvesaroundasetofchordsthatprogressthrough
eachnoteofthemusicscale.Withthescalehereinmatrixformbeingthereference
I’dliketodiscussthedifferentsetofchordsandhowtheyareperceivedinmatrix
notation:
MajorScale: [1,0,1,0,1,1,0,1,0,1,0,1]
I:
[1,0,0,0,1,0,0,1,0,0,0,0]
II:
[0,0,1,0,0,1,0,0,0,1,0,0]
III:
[0,0,0,0,1,0,0,1,0,0,0,1]
IV:
[1,0,0,0,0,1,0,0,0,1,0,0]
V:
[0,0,1,0,0,0,0,1,0,0,1,0]
VI:
[1,0,0,0,1,0,0,0,0,1,0,0]
VII:
[0,0,1,0,0,1,0,0,0,0,0,1]
WhenI–VIIareaddedtogether,theresultingmatrix.Isasfollows:
[3,0,3,0,3,3,0,3,0,3,0,3]
Whichinreality,istheoriginalmajormatrixmultipliedby3,simpleenough.
Whatisinterestingisthatifeachoftheseeachwererepresentedasvectors,we
wouldonlyneedthreeofthemtospanR7,thesamerankastheoriginalMajorscale.
Whatmakesthissignificant,isthatmostmodernsongs,insimplicity,are
basedoffofa3or4chordsystemwhichtogetherusuallyrepresentR7.Forsome
reasonthishasamusicalappealtousasahumanracethatweplaysongsthat,if
chordsareputtogetherright,representthesamedimensionandspanasthekeythe
songisplayedin.
Todemonstratethis,hereare4chordsthatareverycommonlyusedinmany
songs.ThemostfamiliarbeingLollipopbyChordettes:
I:
[1,0,0,0,1,0,0,1,0,0,0,0]
VI:
[1,0,0,0,1,0,0,0,0,1,0,0]
IV:
[1,0,0,0,0,1,0,0,0,1,0,0]
V:
[0,0,1,0,0,0,0,1,0,0,1,0]
Sureenoughaddedtogether,thesecreatethemajorscalewithafew
fluctuations:
[3,0,1,0,2,1,0,1,0,2,0,1]
Thisisn’ttosaythatwealwaysuniversallyenjoythisspanandcombination
ofmusic,thereareplentyofcounterexamples.Howeveritissuchareoccurring
elementinourmusicthatitisimportanttonotice.Someofthegreatestconsidered
musiconearthfollowsthiscourseinthemanycompositionsofthemathematical
MusicalGenius,JohannSebastianBach.HismanyCompositionsarestillrevered
todayascalculativemasterpiecesandinparticular,oneofmyfavorites,hisCello
PreludeinCmajorrepresentsthisprinciplebeautifully.Thesongnotonlyplayssuch
chordstorepresentthekeyscale,butalsoifthereisanirregularity(forexample,a
lackofuseofthe6thvariable)thesongmakesadjustmentstoexistingchords(a
changefromaG,toaG7)tomeetitsdemandandbalanceittobeincloserrelation
withtheotherexistingvariables.
So,tosummarizesimply,weenjoymusicprogressionswithchordsthat
sharethesamerankastheirkeyscale.
JazzComplexityandLinearIndependence
SomeofmyfavoritepiecesofmusicareofJazzimprovisation.Thenumberof
abnormalcomplexitiesinthestylemakeitpossibletocontinueplayingforaslong
astheimproviserdesires.ThisisbecauseoftherangeandscalingthatJazz
progressionscover.Insimilaritytothepreviouspoint,appealingJazzprogressions
usuallycoverallthenotesofascale,howevertheygoastepfurtherandcoverall
variablesofthematrix.Sotosay,usuallyinasetofJazzprogressions,their
correspondingmatricesusuallyresultinLinearIndependenceoftheMatrix.
Hereisafavoriteprogression(thekeyofA)toexplain:
EbM7:[0,0,1,1,0,0,0,1,0,0,1,0]
Bb7: [0,0,1,0,0,1,0,0,1,0,1,0]
AbM7:[1,0,0,1,0,0,0,1,1,0,0,0]
Ab7: [1,0,0,1,0,0,1,0,1,0,0,0]
Db7: [0,1,0,0,0,1,0,0,1,0,0,1]
C7:
[1,0,0,0,1,0,0,1,0,1,0,0]
Addedtogethertheyformasolidmatrixwithoutmissingvariables:
[3,1,2,3,1,2,1,3,4,1,2,1];
Evenmore,mostjazzprogressionsareplayedin6chordsinausual2part
successionmakeita12chordprogressiontotal.Attimesthesecondpartwillbea
differentsetofchords,buttogethertheymakea12by12matrixthatistypically
linearlyindependent.ThoughthismaynotbetrueforallJazzprogressions,the
typicalofthemfollowthistypeofpattern.
WhatWeFindBoring
Nowwithsuchanideaofknowingthatthehighertherankofapieceof
musicmakesitmoreappealingtothehumanear,whataboutadditionalproperties
ofthismusicalmatrix?Whatothercomponentsandcombinationsofmusicdowe
findappealing?Toanswersuchquestions,itwouldactuallyhelptosearchwhat
wouldbeconsideredthecontrary:boringorevenannoying.
Itisunderstandablethatmusicisanartanditappealstopeopledifferently
basedupontheirtastesandinterests.Inadditiontothis,therearemanysongsthat
‘breaktherules’andyetarestillappealing.However,thefocusofthisisonthe
aggregateofourappreciationofmusic.Iattempttoask,whataretheserulesweare
followingorbreaking?Itisimportanttoknowtherulesofyoursubjectinorderto
surpassthemandyetstillsucceed.Sowhathappenswhenyoubreaktherulesand
fail?
Averycommonoccurrenceof‘bad’musicisahighrepetitionofnotesand
chords.Wefindmusic‘repetitive’and‘predictable’makingitunpleasanttothe
humanear.Thiscanevenfromtheperspectiveofeachchordrepresentingavector.
Combinedtogether,thesechordvectorsofrepetitivemusicinaCartesian
coordinatesystemwillseem“flat”or“shallow”comparedtoit’spossiblecomplexity.
Theywillhavegreatlengthsyetrepresentverylittleofthemusicalspectrum.
Onthecontrary,musicthatistoocomplexandcontainstoomanydirections
insuchasmallamountofvectorwillbegintoconfuseandevenirritatethelistener.
Ofcourseinthismodelhereisahigherrankinthemusicalrepresentation,however
theamountofvectorsneedtodosoonlygeneratesasmall‘area’ofmusic.
Imagineforaminutethatourmusicmodelisfullyrepresentedtothethird
degreeinsteadofthetwelfth.Nowimagineasongthatconsistedofonlyonenote
andthatplayedconsistently,itwouldgenerateaverylonglinefromtheorigin.Now
iftherewasasongthatgeneratedonly3vectors,onewithmanyvaluesandpointed
completelyorthogonaltoeachother.Theywouldholdahighrank,buttheirlimits
wouldbeveryconfinedtoasmallarea.
Exampleofhowvectorsofcompositionarerepresented
Abothlongandcomplexpieceofmusicwouldgeneratealargeanddeeparea
andtheirlimitswouldbelargeandspacious.Thisisgenerallythecharacteristicof
goodmusicalcomposition,ifitcoversalargerareayetisstillcomplexinischord
progression.Wherethiscouldleadthough,wouldbethedevelopmentofavector
spacethatdefinethe“boundaries”ofgoodmusic.Muchmoreresearchand
developmentwouldbeneededtosolidifythisconcept,butitwouldbeintriguingto
seewhatwouldbedefinedinamathematicalsensewhat“goodmusic”is.
Conclusion
TherearemanyotherroutestobetakenwithMusicandit’srelationshipto
LinearAlgebra,butintermsofmusicalcomposition,itseemsthereisn’tmuch
research.Perhapsit’sduetothelackofcoordinationtothemanyrulesofLinear
Algebra,butI’msurethatthroughstudy,itcouldresultinsomesurprisingclaims.I
thinkthatmyclaimssofarhavesomevalue,butthereisalwaysmoreresearchtobe
done.
Soinsummary,ifmusicalcompositionisrepresentedinvectors,ithassome
commondistinctrelationshiptohowweappreciateit.Thefirstbeing,therankmust
remainthesameasthegiven“keysignature”,secondthehighertherankinagiven
scaleprovidesagreaterappreciationforthemusic,andthirdtherearegiven
“boundaries”andavectorspaceinwhichmusicbecomesappealingtothehuman
ear.Giventheseattributesandwithjustahintofyourowncreativity,anyonecould
composemusicthatcouldbeappealingandeveninspiring.
Download