SlideShare a Scribd company logo
Melody Harmonizer
Andrew Zatserkovny
Contents
• Collecting training data
• Pre-processing and cleaning data
• Extracting features
• Composing list of states
• Populating transition matrix
• Generating chord progressions
• Verifying the model
• Summary
• References
Collecting training data
http://abc.sourceforge.net/NMD
The Nottingham Music Database maintained by Eric Foxley
contains over 1000 folk tunes
Collecting training data
http://abcnotation.com/wiki/abc:standard:v2.1
The abc music standard 2.1 (Dec 2011)
Abc is a text-based music notation system designed to be
comprehensible by both people and computers
X: 40
T:The Castle
% Nottingham Music Database
S:Trad, arr Phil Rowe
M:6/8
K:G
D | "G" G3 GAB | "Am" A3 "D7" Abc | "G" edd gdd |
"C" edB "D7" dBA | "G" G3 GAB| "Am" A3 "D7" Abc |
"G" edd gdB | "D7" AGF "G" G2::A | "G" BAB dBd | "C"
e/2f/2ge "D" dBA | "G" BAB dBG | "D7" ABA A2A | "G"
BAB dBd | "C" e/2f/2ge "D" dBA | "G" gfg "D7" aga |
"G" bgg g2: |
Pre-processing data
• Exclude files without harmony
• Edit incorrect harmony symbols
• Convert abc to musicxml format
• Detect mode (major/minor) (Krumhansl-
Schmuckler key-finding algorithm)
• Transpose scores to C major and relative
A minor modes
http://rnhart.net/articles/key-finding
Extracting features
• Return the
metrical accent of
this object in a
measure (0 to 1)
[Ref. 1]
• Highlight strong
beats (most
audible and
prominent to a
listener)
strong beats
Composing list of states
Measure k Measure k+1
)
)
states
transition between states
Populating frequency matrix
(+1)
occurrences of
for state
( , ,
)
Populating probability matrix
probability of
harmonizing
given
Generating chord progression
Markov Decision Process is applied to the task and is
based on input vector of notes and transition matrix
Generating chord progression
Major/minor chord sets are comprised of chords encountered
throughout training data
Major chord set (40 unique chords) Minor chord set (21 unique chords)
'A', 'A-', 'A7', 'Am', 'Am7' 'A', 'A7', 'Am',
'B', 'B-', 'B-7', 'B-m', 'B7', 'Bm', 'B', 'B-', 'B7', 'Bm'
'C', 'C#dim', 'C6/F', 'C7', 'Cdim', 'Cm' 'C', 'C#m', 'C7',
'D', 'D6/C', 'D7', 'Dm', 'Dm7' 'D', 'D7', 'Dm',
'E', 'E-', 'E-7', 'E-dim', 'E7', 'Em', 'Em7' 'E', 'E7', 'Em', 'Em7'
'F', 'F#', 'F#dim', 'F7', 'Fdim', 'Fm', 'F', 'Fm',
'G', 'G+', 'G7', 'Gdim', 'Gm' 'G', 'G7'
Generating chord progression
Probability matrix has major and minor versions as well
40 chords 21 chords
5760
states
3024
states
Generating chord progression
Given these two measures of a sample to be harmonized, we only
extract first note on strong beats
Generating chord progression
Input melody is processed by semi-measure strides (on strong beats)
Step 0: Identify mode and start with tonic chord
State 0: (Measure 1, (C chord, E note, E note))
Step 1: Move window one stride to the right along the score
(1, (C, E, E))
C (1, (C, E, D))
C
Output chord progression
Result of processing all measures in the score (random progression)
(5, ('C', 'E', 1.0))
(5, ('C', 'E', 0.5))
(6, ('G7', 'D', 1.0))
(6, ('G7', 'F', 0.5))
(7, ('C', 'D', 1.0))
(7, ('F', 'F', 0.5))
(8, ('Am', 'C', 1.0))
(8, ('G7', 'G', 0.5))
(1, ('C', 'E', 1.0))
(1, ('C', 'E', 0.5))
(2, ('D7', 'D', 1.0))
(2, ('D7', 'F', 0.5))
(3, ('G7', 'D', 1.0))
(3, ('G7', 'F', 0.5))
(4, ('C', 'C', 1.0))
(4, ('G', 'B', 0.5))
chordmeasure note beat strength
Verifying the model
Musical accent may be defined as an increased prominence,
noticeability, or salience ascribed to a given sound event. Cooper and
Meyer characterized accent as “a stimulus which is marked for
consciousness” [Ref. 2].
Let us introduce the measure of dissonance based on a
notion of musical accent of each note in a score:
i-th note in a score
i-th harmonic context
Verifying the model
The most optimal solution implies that the loss function should be
minimized:
Thomassen melodic accent m adds a numeric attribute to each note
according to the method postulated in [Refs. 3, 4]
Dissonance function returns a value depending on the
intervals between a note and chord tones. Semitones, tritones
and whole tones with their respective weights ( ) contribute
to the overall value:
w
Verifying the model
The minimum of the loss function (L = 3.027) is achieved with following
limitations and assumptions:
• number of generated progressions is limited to 2000 samples
• dissonance function weights are set as below:
,
The final chord progression that yields the lowest loss function
value is presented on this score:
Summary
• The method for extracting melodic and harmonic
features with context to enable chord progression
continuity was proposed
• Markov decision process was modified and applied to
fit the case with no obviously right solution
• Measure of dissonance was introduced to calculate
harmonic proximity of a note to a chord
• Loss function was proposed to evaluate harmonic
adequacy of chord progressions generated by the
model
References
1. Fred Lerdahl and Ray Jackendoff. On the Theory of Grouping
and Meter. The Musical Quarterly, Vol. 67, No. 4 (Oct., 1981),
pp. 479-506
2. Cooper, G. & Meyer, L. B. (1960). The rhythmic structure of
music. Chicago & London: University of Chicago Press.
3. Joseph M. Thomassen, Melodic accent: Experiments and a
tentative model. Journal of the Acoustical Society of America,
Vol. 71, No. 6 (1982) pp. 1598-1605
4. David Huron and Matthew Royal, What is melodic accent?
Converging evidence from musical practice. Music Perception,
Vol. 13, No. 4 (1996) pp. 489-516

More Related Content

Similar to Melody harmonizer

IRJET- Chord Classification of an Audio Signal using Artificial Neural Network
IRJET- Chord Classification of an Audio Signal using Artificial Neural NetworkIRJET- Chord Classification of an Audio Signal using Artificial Neural Network
IRJET- Chord Classification of an Audio Signal using Artificial Neural Network
IRJET Journal
 
Asee gsw 2000
Asee gsw 2000Asee gsw 2000
Asee gsw 2000
Nahom Tewolde
 
Automatic Set List Identification and Song Segmentation of Full-Length Concer...
Automatic Set List Identification and Song Segmentation of Full-Length Concer...Automatic Set List Identification and Song Segmentation of Full-Length Concer...
Automatic Set List Identification and Song Segmentation of Full-Length Concer...
Ju-Chiang Wang
 
PassiveAcousticAmplifierReport.docx
PassiveAcousticAmplifierReport.docxPassiveAcousticAmplifierReport.docx
PassiveAcousticAmplifierReport.docx
Patrick Corbin
 
EDM for sounds
EDM for soundsEDM for sounds
EDM for sounds
Cecile Devarenne
 
Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...
Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...
Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...
multimediaeval
 
EDM for Europeana Sounds
EDM for Europeana SoundsEDM for Europeana Sounds
EDM for Europeana Sounds
Europeana_Sounds
 
Joint Repairs for Web Wrappers
Joint Repairs for Web WrappersJoint Repairs for Web Wrappers
Joint Repairs for Web Wrappers
Giorgio Orsi
 
You Can Print Music with LilyPond
You Can Print Music with LilyPondYou Can Print Music with LilyPond
You Can Print Music with LilyPond
John David Duncan
 
J03502050055
J03502050055J03502050055
J03502050055
theijes
 
"TiMerS: Time-Based Music Recommender System"
"TiMerS: Time-Based Music Recommender System""TiMerS: Time-Based Music Recommender System"
"TiMerS: Time-Based Music Recommender System"
Gobinda Karmakar ☁
 
Computation Assignment Help
Computation Assignment Help Computation Assignment Help
Computation Assignment Help
Programming Homework Help
 
IRJET- Music Genre Classification using SVM
IRJET- Music Genre Classification using SVMIRJET- Music Genre Classification using SVM
IRJET- Music Genre Classification using SVM
IRJET Journal
 
Many of us have large digital music collections that are not always .pdf
Many of us have large digital music collections that are not always .pdfMany of us have large digital music collections that are not always .pdf
Many of us have large digital music collections that are not always .pdf
fazanmobiles
 
Timbral modeling for music artist recognition using i-vectors
Timbral modeling for music artist recognition using i-vectorsTimbral modeling for music artist recognition using i-vectors
Timbral modeling for music artist recognition using i-vectors
Hamid Eghbal-zadeh
 

Similar to Melody harmonizer (15)

IRJET- Chord Classification of an Audio Signal using Artificial Neural Network
IRJET- Chord Classification of an Audio Signal using Artificial Neural NetworkIRJET- Chord Classification of an Audio Signal using Artificial Neural Network
IRJET- Chord Classification of an Audio Signal using Artificial Neural Network
 
Asee gsw 2000
Asee gsw 2000Asee gsw 2000
Asee gsw 2000
 
Automatic Set List Identification and Song Segmentation of Full-Length Concer...
Automatic Set List Identification and Song Segmentation of Full-Length Concer...Automatic Set List Identification and Song Segmentation of Full-Length Concer...
Automatic Set List Identification and Song Segmentation of Full-Length Concer...
 
PassiveAcousticAmplifierReport.docx
PassiveAcousticAmplifierReport.docxPassiveAcousticAmplifierReport.docx
PassiveAcousticAmplifierReport.docx
 
EDM for sounds
EDM for soundsEDM for sounds
EDM for sounds
 
Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...
Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...
Camerata at MediaEval 2014 - Extracting Answer Passages from Classical Music ...
 
EDM for Europeana Sounds
EDM for Europeana SoundsEDM for Europeana Sounds
EDM for Europeana Sounds
 
Joint Repairs for Web Wrappers
Joint Repairs for Web WrappersJoint Repairs for Web Wrappers
Joint Repairs for Web Wrappers
 
You Can Print Music with LilyPond
You Can Print Music with LilyPondYou Can Print Music with LilyPond
You Can Print Music with LilyPond
 
J03502050055
J03502050055J03502050055
J03502050055
 
"TiMerS: Time-Based Music Recommender System"
"TiMerS: Time-Based Music Recommender System""TiMerS: Time-Based Music Recommender System"
"TiMerS: Time-Based Music Recommender System"
 
Computation Assignment Help
Computation Assignment Help Computation Assignment Help
Computation Assignment Help
 
IRJET- Music Genre Classification using SVM
IRJET- Music Genre Classification using SVMIRJET- Music Genre Classification using SVM
IRJET- Music Genre Classification using SVM
 
Many of us have large digital music collections that are not always .pdf
Many of us have large digital music collections that are not always .pdfMany of us have large digital music collections that are not always .pdf
Many of us have large digital music collections that are not always .pdf
 
Timbral modeling for music artist recognition using i-vectors
Timbral modeling for music artist recognition using i-vectorsTimbral modeling for music artist recognition using i-vectors
Timbral modeling for music artist recognition using i-vectors
 

Recently uploaded

みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Melody harmonizer

  • 2. Contents • Collecting training data • Pre-processing and cleaning data • Extracting features • Composing list of states • Populating transition matrix • Generating chord progressions • Verifying the model • Summary • References
  • 3. Collecting training data http://abc.sourceforge.net/NMD The Nottingham Music Database maintained by Eric Foxley contains over 1000 folk tunes
  • 4. Collecting training data http://abcnotation.com/wiki/abc:standard:v2.1 The abc music standard 2.1 (Dec 2011) Abc is a text-based music notation system designed to be comprehensible by both people and computers X: 40 T:The Castle % Nottingham Music Database S:Trad, arr Phil Rowe M:6/8 K:G D | "G" G3 GAB | "Am" A3 "D7" Abc | "G" edd gdd | "C" edB "D7" dBA | "G" G3 GAB| "Am" A3 "D7" Abc | "G" edd gdB | "D7" AGF "G" G2::A | "G" BAB dBd | "C" e/2f/2ge "D" dBA | "G" BAB dBG | "D7" ABA A2A | "G" BAB dBd | "C" e/2f/2ge "D" dBA | "G" gfg "D7" aga | "G" bgg g2: |
  • 5. Pre-processing data • Exclude files without harmony • Edit incorrect harmony symbols • Convert abc to musicxml format • Detect mode (major/minor) (Krumhansl- Schmuckler key-finding algorithm) • Transpose scores to C major and relative A minor modes http://rnhart.net/articles/key-finding
  • 6. Extracting features • Return the metrical accent of this object in a measure (0 to 1) [Ref. 1] • Highlight strong beats (most audible and prominent to a listener) strong beats
  • 7. Composing list of states Measure k Measure k+1 ) ) states transition between states
  • 10. Generating chord progression Markov Decision Process is applied to the task and is based on input vector of notes and transition matrix
  • 11. Generating chord progression Major/minor chord sets are comprised of chords encountered throughout training data Major chord set (40 unique chords) Minor chord set (21 unique chords) 'A', 'A-', 'A7', 'Am', 'Am7' 'A', 'A7', 'Am', 'B', 'B-', 'B-7', 'B-m', 'B7', 'Bm', 'B', 'B-', 'B7', 'Bm' 'C', 'C#dim', 'C6/F', 'C7', 'Cdim', 'Cm' 'C', 'C#m', 'C7', 'D', 'D6/C', 'D7', 'Dm', 'Dm7' 'D', 'D7', 'Dm', 'E', 'E-', 'E-7', 'E-dim', 'E7', 'Em', 'Em7' 'E', 'E7', 'Em', 'Em7' 'F', 'F#', 'F#dim', 'F7', 'Fdim', 'Fm', 'F', 'Fm', 'G', 'G+', 'G7', 'Gdim', 'Gm' 'G', 'G7'
  • 12. Generating chord progression Probability matrix has major and minor versions as well 40 chords 21 chords 5760 states 3024 states
  • 13. Generating chord progression Given these two measures of a sample to be harmonized, we only extract first note on strong beats
  • 14. Generating chord progression Input melody is processed by semi-measure strides (on strong beats) Step 0: Identify mode and start with tonic chord State 0: (Measure 1, (C chord, E note, E note)) Step 1: Move window one stride to the right along the score (1, (C, E, E)) C (1, (C, E, D)) C
  • 15. Output chord progression Result of processing all measures in the score (random progression) (5, ('C', 'E', 1.0)) (5, ('C', 'E', 0.5)) (6, ('G7', 'D', 1.0)) (6, ('G7', 'F', 0.5)) (7, ('C', 'D', 1.0)) (7, ('F', 'F', 0.5)) (8, ('Am', 'C', 1.0)) (8, ('G7', 'G', 0.5)) (1, ('C', 'E', 1.0)) (1, ('C', 'E', 0.5)) (2, ('D7', 'D', 1.0)) (2, ('D7', 'F', 0.5)) (3, ('G7', 'D', 1.0)) (3, ('G7', 'F', 0.5)) (4, ('C', 'C', 1.0)) (4, ('G', 'B', 0.5)) chordmeasure note beat strength
  • 16. Verifying the model Musical accent may be defined as an increased prominence, noticeability, or salience ascribed to a given sound event. Cooper and Meyer characterized accent as “a stimulus which is marked for consciousness” [Ref. 2]. Let us introduce the measure of dissonance based on a notion of musical accent of each note in a score: i-th note in a score i-th harmonic context
  • 17. Verifying the model The most optimal solution implies that the loss function should be minimized: Thomassen melodic accent m adds a numeric attribute to each note according to the method postulated in [Refs. 3, 4] Dissonance function returns a value depending on the intervals between a note and chord tones. Semitones, tritones and whole tones with their respective weights ( ) contribute to the overall value: w
  • 18. Verifying the model The minimum of the loss function (L = 3.027) is achieved with following limitations and assumptions: • number of generated progressions is limited to 2000 samples • dissonance function weights are set as below: , The final chord progression that yields the lowest loss function value is presented on this score:
  • 19. Summary • The method for extracting melodic and harmonic features with context to enable chord progression continuity was proposed • Markov decision process was modified and applied to fit the case with no obviously right solution • Measure of dissonance was introduced to calculate harmonic proximity of a note to a chord • Loss function was proposed to evaluate harmonic adequacy of chord progressions generated by the model
  • 20. References 1. Fred Lerdahl and Ray Jackendoff. On the Theory of Grouping and Meter. The Musical Quarterly, Vol. 67, No. 4 (Oct., 1981), pp. 479-506 2. Cooper, G. & Meyer, L. B. (1960). The rhythmic structure of music. Chicago & London: University of Chicago Press. 3. Joseph M. Thomassen, Melodic accent: Experiments and a tentative model. Journal of the Acoustical Society of America, Vol. 71, No. 6 (1982) pp. 1598-1605 4. David Huron and Matthew Royal, What is melodic accent? Converging evidence from musical practice. Music Perception, Vol. 13, No. 4 (1996) pp. 489-516