From dd152f500f510bb59d261936466d5143f9592b05 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 2 Mar 2018 10:01:32 +0100 Subject: Add automatic configuration and hardware bugfix (via sw) --- src/midi.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/midi.h') 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 -- cgit v1.2.1