pub fn fix_enharmonics(
changes: &[Change],
midi: &Stream,
omr: &mut Stream,
) -> Result<()>Expand description
Respells each note of the reading the performance plays enharmonically
to it: music21’s EnharmonicFixer.
Every element the changes name in the reading is coloured black. Of two notes changed into each other no more than a fifth apart, by interval class:
- a reading’s natural is dropped where the notes sound alike, and where the reading is a semitone off it becomes the flat above or the sharp below the note played;
- a reading’s sharp or flat on the letter played takes the played note’s accidental;
- a sharp read a whole tone above the note played becomes a flat, and a flat read a whole tone below a sharp;
- a note played sharp or flat on the letter read, but read otherwise, takes the played pitch.
§Errors
A change with no references, or one naming nothing in its stream.