From 7549b1f398cac5375d89aac60e4e166b55d0ab41 Mon Sep 17 00:00:00 2001 From: Curtis Hawthorne Date: Mon, 10 May 2021 16:05:03 -0700 Subject: [PATCH] Add constant for number of midi pitches. PiperOrigin-RevId: 373032243 --- note_seq/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/note_seq/constants.py b/note_seq/constants.py index 4c8fb78..97ae46c 100644 --- a/note_seq/constants.py +++ b/note_seq/constants.py @@ -36,6 +36,7 @@ MAX_MELODY_EVENT = 127 MIN_MIDI_PITCH = 0 # Inclusive. MAX_MIDI_PITCH = 127 # Inclusive. +NUM_MIDI_PITCHES = MAX_MIDI_PITCH - MIN_MIDI_PITCH + 1 NOTES_PER_OCTAVE = 12 # Velocity-related constants.