#define PITCH_NAME_MASK (0x07 << PITCH_NAME_SHIFT)
#define PITCH_OCTAVE_SHIFT (6)
-#define PITCH_OCTAVE_MASK (0x07 << PITCH_OCTAVE_SHIFT)
+#define PITCH_OCTAVE_MASK (0x0F << PITCH_OCTAVE_SHIFT)
#define PITCH_ACCIDENTAL(pitch) \
(((pitch) & PITCH_ACCIDENTAL_MASK) >> PITCH_ACCIDENTAL_SHIFT)