We now use the chord's signature to choose the correct spelling of
each enharmonic note. For example, an A mjor triad has a C-sharp in
it, not a D-flat. We can determine this since a major triad should
have a note of the 3 scale degree (as recorded in the chord
signature).
Still to be done is to draw note heads without collision, draw
accidentals without collision, and to improve the heuristic for
deciding between ambiguous chord signatures.