Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Commit 7549b1f

Browse files
cghawthorneMagenta Team
authored andcommitted
Add constant for number of midi pitches.
PiperOrigin-RevId: 373032243
1 parent fba5e86 commit 7549b1f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

note_seq/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
MAX_MELODY_EVENT = 127
3737
MIN_MIDI_PITCH = 0 # Inclusive.
3838
MAX_MIDI_PITCH = 127 # Inclusive.
39+
NUM_MIDI_PITCHES = MAX_MIDI_PITCH - MIN_MIDI_PITCH + 1
3940
NOTES_PER_OCTAVE = 12
4041

4142
# Velocity-related constants.

0 commit comments

Comments
 (0)