Browse Source

Adapt messages to receive from any channel

Use higher bits of first message byte to get notes from all channels.
feature/data-structs
TheoryOfNekomata 2 years ago
parent
commit
1f7f00e39b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/packages/game/input/IZ_midi.c

+ 2
- 1
src/packages/game/input/IZ_midi.c View File

@@ -62,7 +62,8 @@ uint8_t IZ_GetMIDINoteFromName(char* name) {

void IZ_HandleMIDINoteOnOffEvents(PmEvent e, IZ_MIDIInputState* state, IZ_Action* action) {
uint32_t message = e.message;
uint8_t status = message & 0xFFu;
uint8_t status = message & 0xF0u;
// uint8_t channel = message & 0x0Fu;
uint8_t data1 = (message >> 8) & 0xFFu;
// uint8_t data2 = (message >> 16) & 0xFFu;



Loading…
Cancel
Save