Export the key signature to MusicXML
ringw opened this issue · comments
We currently detect the key signature and use it to determine the note pitches, but then throw it out. It needs to be stored in the Score
proto (IR), so it can be exported to MusicXML. We can use the KeySignature
proto from Magenta in the IR. We should add it to the Glyphs in the Page as we process them--maybe SHARP or FLAT Glyphs can have a KeySignature added if they make up a key signature, like we do with NoteSequence.Note for noteheads. This might require repeating the same KeySignature on multiple accidentals, or only storing it in the first accidental in the key signature.
Then, MusicXML export should just look for any KeySignature on any glyph in each measure, and set the key signature on the measure if present.