spellingOf function

String spellingOf(
  1. Pitch pitch
)

A grafia da nota como texto da cifra: Db, F#, Bb, E.

Implementation

String spellingOf(Pitch pitch) =>
    pitch.step + (pitch.alter > 0 ? '#' * pitch.alter : 'b' * -pitch.alter);