]> git.cworth.org Git - scherzo/blobdiff - pitch.h
Fix high octave numbers (8+) to not be interpreted as 0.
[scherzo] / pitch.h
diff --git a/pitch.h b/pitch.h
index d376a2217f3bb0cd225fc42ac92ad9a7c7e8870b..683d72772650138fa224e7b209af35e19c1f71e0 100644 (file)
--- a/pitch.h
+++ b/pitch.h
@@ -32,7 +32,7 @@ typedef uint32_t pitch_t;
 #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)