diff options
author | Gabriel Young <gabeplaysdrums@live.com> | 2017-02-18 21:07:07 -0800 |
---|---|---|
committer | Gabriel Young <gabeplaysdrums@live.com> | 2017-02-19 16:43:45 -0800 |
commit | ae0752dff552a07fb52e08c7057979959959d247 (patch) | |
tree | 1f1c1dc6605e20ddf46894cef2e6b52bd2dc2b81 /quantum/process_keycode/process_midi.h | |
parent | 5e6097f0154403dccb9b5658390c84441aa509bc (diff) | |
download | qmk_firmware-ae0752dff552a07fb52e08c7057979959959d247.tar.gz qmk_firmware-ae0752dff552a07fb52e08c7057979959959d247.zip |
expose midi_config
Diffstat (limited to 'quantum/process_keycode/process_midi.h')
-rw-r--r-- | quantum/process_keycode/process_midi.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h index 66ce60b0e..ffd41579f 100644 --- a/quantum/process_keycode/process_midi.h +++ b/quantum/process_keycode/process_midi.h | |||
@@ -4,8 +4,26 @@ | |||
4 | #include "quantum.h" | 4 | #include "quantum.h" |
5 | #include "midi.h" | 5 | #include "midi.h" |
6 | 6 | ||
7 | typedef union { | ||
8 | uint32_t raw; | ||
9 | struct { | ||
10 | uint8_t octave :4; | ||
11 | int8_t transpose :4; | ||
12 | uint8_t velocity :4; | ||
13 | uint8_t channel :4; | ||
14 | uint8_t modulation_interval :4; | ||
15 | }; | ||
16 | } midi_config_t; | ||
17 | |||
18 | midi_config_t midi_config; | ||
19 | |||
7 | void midi_init(void); | 20 | void midi_init(void); |
8 | void midi_task(void); | 21 | void midi_task(void); |
9 | bool process_midi(uint16_t keycode, keyrecord_t *record); | 22 | bool process_midi(uint16_t keycode, keyrecord_t *record); |
10 | 23 | ||
24 | #define MIDI_INVALID_NOTE 0xFF | ||
25 | #define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1) | ||
26 | |||
27 | uint8_t midi_compute_note(uint16_t keycode); | ||
28 | |||
11 | #endif \ No newline at end of file | 29 | #endif \ No newline at end of file |