2 ms·
> Unfortunately it's subjective, fuzzy, and often rooted in convention rather than following algorithmic rules. > An algorithm is probably impossible in the ge
by 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.