Fixing MIDI input channel.

pull/4/head
Holger Wirtz 6 years ago
parent 187f178a19
commit 0a3511033a
  1. 6
      MicroDexed.ino
  2. 2
      config.h

@ -358,7 +358,7 @@ void handle_input(void)
#ifdef SHOW_MIDI_EVENT
void print_midi_event(uint8_t type, uint8_t data1, uint8_t data2)
{
Serial.print(F("MIDI-Channel: "));
Serial.print(F("Listen MIDI-Channel: "));
if (midi_channel == MIDI_CHANNEL_OMNI)
Serial.print(F("OMNI"));
else
@ -367,6 +367,8 @@ void print_midi_event(uint8_t type, uint8_t data1, uint8_t data2)
if (type < 16)
Serial.print(F("0"));
Serial.print(type, HEX);
Serial.print(F(", incoming MIDI channel: "));
Serial.print((type & 0x0f) + 1, DEC);
Serial.print(F(", data1: "));
Serial.print(data1, DEC);
Serial.print(F(", data2: "));
@ -461,7 +463,7 @@ bool queue_midi_event(uint8_t type, uint8_t data1, uint8_t data2)
if (midi_channel != MIDI_CHANNEL_OMNI)
{
uint8_t c = type & 0x0f;
if (c != midi_channel)
if (c != midi_channel - 1)
{
#ifdef DEBUG
Serial.print(F("Ignoring MIDI data on channel "));

@ -65,7 +65,7 @@
// Debug output
#define SERIAL_SPEED 38400
//#define DEBUG 1
#define DEBUG 1
#define SHOW_MIDI_EVENT 1
#define SHOW_XRUN 1
#define SHOW_CPU_LOAD_MSEC 5000

Loading…
Cancel
Save