scripts.infer_pitches module

This is a script that takes the full-grown notation graph and recovers for each notehead the pitch to which it corresponds.


  • Clefs are used in a standard way: G-clef on 4th, C-clef on 3rd, F-clef on 2nd staffline.
  • Key signatures are used in a standard way, so that we can rely on counting the accidentals.
  • Accidentals are valid up until the end of the bar.

We are currently NOT processing any transpositions.


Notes are not noteheads. Pitch is associated with a note, and it is derived from the notehead’s subgraph. The current goal of this exercise is obtaining MIDI, so we discard in effect information about what is e.g. a G-sharp and A-flat.