3 ms·
Ah. Just now reading your other replies. Unfortunately it's subjective, fuzzy, and often rooted in convention rather than following algorithmic rules. An algori
by matheist 6y ago
Ah. Just now reading your other replies. Unfortunately it's subjective, fuzzy, and often rooted in convention rather than following algorithmic rules. An algorithm is probably impossible in the general case.
In the case of jazz standards (and assorted other genres like Western popular music), melodies are often published alongside the author's intended accompanying chords, so when those are present they could maybe be used as a training set for an automated solution.
But for other genres, a ground truth label might exist only in the author's mind, or in the minds of sophisticated listeners familiar with that genre. Reasonable people might disagree about the fact of the matter in some cases (or shrug and say there is no fact of the matter and either option is okay). Sometimes when there's more emphasis on melody than harmony, the choice of C#/Db might come down to ease of reading (ascending notes B-C-Db might be easier to read than B-C-C#) rather than harmonic considerations. Or maybe as another commenter points out, the reverse convention might be used.
- jacquesm 6y ago> Unfortunately it's subjective, fuzzy, and often rooted in convention rather than following algorithmic rules. > An algorithm is probably impossible in the general case. Ok, that's a clear answer. So, what I've settled on then is to take an educated guess and to allow the user to correct the software by annotating the midi file with extra hints about what the preferred spelling for a particular note is in case the software gets it wrong. That way; assuming that I can get it 'right' algorithmically > 50% of the time it should still serve as a speedup and it will be flexible enough to fix things if required. These could then be saved back somehow into the midi file as a json encoded text field along the lines of [{track, tick, pitch, preferred notation}] to persist the edits. Thank you for all the thoughtful answers.