summaryrefslogtreecommitdiffstats
path: root/src/midi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/midi.h')
-rw-r--r--src/midi.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/midi.h b/src/midi.h
index fb85833..7ee42b7 100644
--- a/src/midi.h
+++ b/src/midi.h
@@ -30,8 +30,8 @@ typedef enum {
} midi_note_t;
typedef enum {
- NOTE_ON = 0x8,
- NOTE_OFF = 0x9,
+ NOTE_OFF = 0x8,
+ NOTE_ON = 0x9,
POLYPHONIC_KEYPRESS = 0xA,
CONTROLLER = 0xB,
PROGRAM_CHANGE = 0xC,
@@ -54,6 +54,19 @@ typedef struct {
} midi_message_t;
+// starts at C2
+const unsigned midi_notes_steps_table[] = {
+ 36, 38, 40, 41, 43, 45, 47, // C2 - B2
+
+// 48, 50, 52, 53, 55, 57, 59, // C3 - B3
+// 60, 62, 64, 65, 67, 69, 71, // C4 - B4
+
+ // hardware bugfix
+ // TODO se a compilation macro
+ 48, 50, 52, 53, 55, 57, 62, // C3 - B3
+ 60, 59, 64, 65, 67, 69, 71, // C4 - B4
+};
+
/* MIDI API */
#ifdef MIDI_DYNAMIC_MEMORY_ALLOC