|
|
@ -78,6 +78,8 @@ void handleNoteOn_MIDI_DEVICE_DIN(byte inChannel, byte inNumber, byte inVelocity |
|
|
|
Serial.print(F("[MIDI_DIN] NoteOn")); |
|
|
|
Serial.print(F("[MIDI_DIN] NoteOn")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendNoteOn(inNumber, inVelocity, inChannel); |
|
|
|
midi_usb.sendNoteOn(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -90,6 +92,7 @@ void handleNoteOn_MIDI_DEVICE_DIN(byte inChannel, byte inNumber, byte inVelocity |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -103,6 +106,8 @@ void handleNoteOff_MIDI_DEVICE_DIN(byte inChannel, byte inNumber, byte inVelocit |
|
|
|
Serial.print(F("[MIDI_DIN] NoteOff")); |
|
|
|
Serial.print(F("[MIDI_DIN] NoteOff")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendNoteOff(inNumber, inVelocity, inChannel); |
|
|
|
midi_usb.sendNoteOff(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -115,6 +120,7 @@ void handleNoteOff_MIDI_DEVICE_DIN(byte inChannel, byte inNumber, byte inVelocit |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -128,6 +134,8 @@ void handleControlChange_MIDI_DEVICE_DIN(byte inChannel, byte inData1, byte inDa |
|
|
|
Serial.print(F("[MIDI_DIN] CC")); |
|
|
|
Serial.print(F("[MIDI_DIN] CC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendControlChange(inData1, inData2, inChannel); |
|
|
|
midi_usb.sendControlChange(inData1, inData2, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -140,6 +148,7 @@ void handleControlChange_MIDI_DEVICE_DIN(byte inChannel, byte inData1, byte inDa |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -153,6 +162,8 @@ void handleAfterTouch_MIDI_DEVICE_DIN(byte inChannel, byte inPressure) |
|
|
|
Serial.print(F("[MIDI_DIN] AT")); |
|
|
|
Serial.print(F("[MIDI_DIN] AT")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendAfterTouch(inPressure, inChannel); |
|
|
|
midi_usb.sendAfterTouch(inPressure, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -165,6 +176,7 @@ void handleAfterTouch_MIDI_DEVICE_DIN(byte inChannel, byte inPressure) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -178,6 +190,8 @@ void handlePitchBend_MIDI_DEVICE_DIN(byte inChannel, int inPitch) |
|
|
|
Serial.print(F("[MIDI_DIN] PB")); |
|
|
|
Serial.print(F("[MIDI_DIN] PB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendPitchBend(inPitch, inChannel); |
|
|
|
midi_usb.sendPitchBend(inPitch, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -190,6 +204,7 @@ void handlePitchBend_MIDI_DEVICE_DIN(byte inChannel, int inPitch) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -203,6 +218,8 @@ void handleProgramChange_MIDI_DEVICE_DIN(byte inChannel, byte inProgram) |
|
|
|
Serial.print(F("[MIDI_DIN] PC")); |
|
|
|
Serial.print(F("[MIDI_DIN] PC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendProgramChange(inProgram, inChannel); |
|
|
|
midi_usb.sendProgramChange(inProgram, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -215,6 +232,7 @@ void handleProgramChange_MIDI_DEVICE_DIN(byte inChannel, byte inProgram) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -228,6 +246,8 @@ void handleSystemExclusive_MIDI_DEVICE_DIN(byte *data, uint len) |
|
|
|
Serial.print(F("[MIDI_DIN] SysEx")); |
|
|
|
Serial.print(F("[MIDI_DIN] SysEx")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendSysEx(len, data); |
|
|
|
midi_usb.sendSysEx(len, data); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -240,6 +260,7 @@ void handleSystemExclusive_MIDI_DEVICE_DIN(byte *data, uint len) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -253,6 +274,8 @@ void handleSystemExclusive_MIDI_DEVICE_DIN(byte *data, uint len) |
|
|
|
Serial.print(F("[MIDI_DIN] SysExChunk")); |
|
|
|
Serial.print(F("[MIDI_DIN] SysExChunk")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendSysEx(len, data, last); |
|
|
|
midi_usb.sendSysEx(len, data, last); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -265,6 +288,7 @@ void handleSystemExclusive_MIDI_DEVICE_DIN(byte *data, uint len) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -278,6 +302,8 @@ void handleTimeCodeQuarterFrame_MIDI_DEVICE_DIN(byte data) |
|
|
|
Serial.print(F("[MIDI_DIN] TimeCodeQuarterFrame")); |
|
|
|
Serial.print(F("[MIDI_DIN] TimeCodeQuarterFrame")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendTimeCodeQuarterFrame(0xF1, data); |
|
|
|
midi_usb.sendTimeCodeQuarterFrame(0xF1, data); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -290,6 +316,7 @@ void handleTimeCodeQuarterFrame_MIDI_DEVICE_DIN(byte data) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -304,6 +331,8 @@ void handleAfterTouchPoly_MIDI_DEVICE_DIN(byte inChannel, byte inNumber, byte in |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
midi_usb.sendAfterTouch(inNumber, inVelocity, inChannel); |
|
|
|
midi_usb.sendAfterTouch(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
@ -315,6 +344,7 @@ void handleAfterTouchPoly_MIDI_DEVICE_DIN(byte inChannel, byte inNumber, byte in |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -328,6 +358,8 @@ void handleSongSelect_MIDI_DEVICE_DIN(byte inSong) |
|
|
|
Serial.print(F("[MIDI_DIN] SongSelect")); |
|
|
|
Serial.print(F("[MIDI_DIN] SongSelect")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendSongSelect(inSong); |
|
|
|
midi_usb.sendSongSelect(inSong); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -340,6 +372,7 @@ void handleSongSelect_MIDI_DEVICE_DIN(byte inSong) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -353,6 +386,8 @@ void handleTuneRequest_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] TuneRequest")); |
|
|
|
Serial.print(F("[MIDI_DIN] TuneRequest")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendTuneRequest(); |
|
|
|
midi_usb.sendTuneRequest(); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -365,6 +400,7 @@ void handleTuneRequest_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -378,6 +414,8 @@ void handleClock_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] Clock")); |
|
|
|
Serial.print(F("[MIDI_DIN] Clock")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(midi::Clock); |
|
|
|
midi_usb.sendRealTime(midi::Clock); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -390,6 +428,7 @@ void handleClock_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -403,6 +442,8 @@ void handleStart_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] Start")); |
|
|
|
Serial.print(F("[MIDI_DIN] Start")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(midi::Start); |
|
|
|
midi_usb.sendRealTime(midi::Start); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -415,6 +456,7 @@ void handleStart_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -428,6 +470,8 @@ void handleContinue_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] Continue")); |
|
|
|
Serial.print(F("[MIDI_DIN] Continue")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(midi::Continue); |
|
|
|
midi_usb.sendRealTime(midi::Continue); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -440,6 +484,7 @@ void handleContinue_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -453,6 +498,8 @@ void handleStop_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] Stop")); |
|
|
|
Serial.print(F("[MIDI_DIN] Stop")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(midi::Stop); |
|
|
|
midi_usb.sendRealTime(midi::Stop); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -465,6 +512,7 @@ void handleStop_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -478,6 +526,8 @@ void handleActiveSensing_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] ActiveSensing")); |
|
|
|
Serial.print(F("[MIDI_DIN] ActiveSensing")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(midi::ActiveSensing); |
|
|
|
midi_usb.sendRealTime(midi::ActiveSensing); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -490,6 +540,7 @@ void handleActiveSensing_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -503,6 +554,8 @@ void handleSystemReset_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] SystemReset")); |
|
|
|
Serial.print(F("[MIDI_DIN] SystemReset")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(midi::SystemReset); |
|
|
|
midi_usb.sendRealTime(midi::SystemReset); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -515,6 +568,7 @@ void handleSystemReset_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -528,6 +582,8 @@ void handleSystemReset_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F("[MIDI_DIN] RealTimeSystem")); |
|
|
|
Serial.print(F("[MIDI_DIN] RealTimeSystem")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
#ifdef MIDI_DEVICE_USB_HOST |
|
|
|
midi_usb.sendRealTime(inRealTime); |
|
|
|
midi_usb.sendRealTime(inRealTime); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -540,6 +596,7 @@ void handleSystemReset_MIDI_DEVICE_DIN(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB[NOTSUPPORTED]")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB[NOTSUPPORTED]")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -558,6 +615,8 @@ void handleNoteOn_MIDI_DEVICE_USB_HOST(byte inChannel, byte inNumber, byte inVel |
|
|
|
Serial.print(F("[MIDI_USB_HOST] NoteOn")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] NoteOn")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendNoteOn(inNumber, inVelocity, inChannel); |
|
|
|
midi_serial.sendNoteOn(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -570,6 +629,7 @@ void handleNoteOn_MIDI_DEVICE_USB_HOST(byte inChannel, byte inNumber, byte inVel |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -583,6 +643,8 @@ void handleNoteOff_MIDI_DEVICE_USB_HOST(byte inChannel, byte inNumber, byte inVe |
|
|
|
Serial.print(F("[MIDI_USB_HOST] NoteOff")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] NoteOff")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendNoteOff(inNumber, inVelocity, inChannel); |
|
|
|
midi_serial.sendNoteOff(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -595,6 +657,7 @@ void handleNoteOff_MIDI_DEVICE_USB_HOST(byte inChannel, byte inNumber, byte inVe |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -608,6 +671,8 @@ void handleControlChange_MIDI_DEVICE_USB_HOST(byte inChannel, byte inData1, byte |
|
|
|
Serial.print(F("[MIDI_USB_HOST] CC")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] CC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendControlChange(inData1, inData2, inChannel); |
|
|
|
midi_serial.sendControlChange(inData1, inData2, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -620,6 +685,7 @@ void handleControlChange_MIDI_DEVICE_USB_HOST(byte inChannel, byte inData1, byte |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -633,6 +699,8 @@ void handleAfterTouch_MIDI_DEVICE_USB_HOST(byte inChannel, byte inPressure) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] AT")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] AT")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendAfterTouch(inPressure, inChannel); |
|
|
|
midi_serial.sendAfterTouch(inPressure, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -645,6 +713,7 @@ void handleAfterTouch_MIDI_DEVICE_USB_HOST(byte inChannel, byte inPressure) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -658,6 +727,8 @@ void handlePitchBend_MIDI_DEVICE_USB_HOST(byte inChannel, int inPitch) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] PB")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] PB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendPitchBend(inPitch, inChannel); |
|
|
|
midi_serial.sendPitchBend(inPitch, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -670,6 +741,7 @@ void handlePitchBend_MIDI_DEVICE_USB_HOST(byte inChannel, int inPitch) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -683,6 +755,8 @@ void handleProgramChange_MIDI_DEVICE_USB_HOST(byte inChannel, byte inProgram) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] PC")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] PC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendProgramChange(inProgram, inChannel); |
|
|
|
midi_serial.sendProgramChange(inProgram, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -695,6 +769,7 @@ void handleProgramChange_MIDI_DEVICE_USB_HOST(byte inChannel, byte inProgram) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -708,6 +783,8 @@ void handleSystemExclusive_MIDI_DEVICE_USB_HOST(byte *data, uint len) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SysEx")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SysEx")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendSysEx(len, data); |
|
|
|
midi_serial.sendSysEx(len, data); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -720,6 +797,7 @@ void handleSystemExclusive_MIDI_DEVICE_USB_HOST(byte *data, uint len) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -733,6 +811,8 @@ void handleSystemExclusive_MIDI_DEVICE_USB_HOST(byte *data, uint len) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SysExChunk")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SysExChunk")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendSysEx(len, data, last); |
|
|
|
midi_serial.sendSysEx(len, data, last); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -745,6 +825,7 @@ void handleSystemExclusive_MIDI_DEVICE_USB_HOST(byte *data, uint len) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -758,6 +839,8 @@ void handleTimeCodeQuarterFrame_MIDI_DEVICE_USB_HOST(midi::DataByte data) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] TimeCodeQuarterFrame")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] TimeCodeQuarterFrame")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendTimeCodeQuarterFrame(data); |
|
|
|
midi_serial.sendTimeCodeQuarterFrame(data); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -770,6 +853,7 @@ void handleTimeCodeQuarterFrame_MIDI_DEVICE_USB_HOST(midi::DataByte data) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -783,6 +867,8 @@ void handleAfterTouchPoly_MIDI_DEVICE_USB_HOST(byte inChannel, byte inNumber, by |
|
|
|
Serial.print(F("[MIDI_USB_HOST] AT-Poly")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] AT-Poly")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendAfterTouch(inNumber, inVelocity, inChannel); |
|
|
|
midi_serial.sendAfterTouch(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -795,6 +881,7 @@ void handleAfterTouchPoly_MIDI_DEVICE_USB_HOST(byte inChannel, byte inNumber, by |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -808,6 +895,8 @@ void handleSongSelect_MIDI_DEVICE_USB_HOST(byte inSong) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SongSelect")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SongSelect")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendSongSelect(inSong); |
|
|
|
midi_serial.sendSongSelect(inSong); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -820,6 +909,7 @@ void handleSongSelect_MIDI_DEVICE_USB_HOST(byte inSong) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -833,6 +923,8 @@ void handleTuneRequest_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] TuneRequest")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] TuneRequest")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendTuneRequest(); |
|
|
|
midi_serial.sendTuneRequest(); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -845,6 +937,7 @@ void handleTuneRequest_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -858,6 +951,8 @@ void handleClock_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Clock")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Clock")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Clock); |
|
|
|
midi_serial.sendRealTime(midi::Clock); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -870,6 +965,7 @@ void handleClock_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -883,6 +979,8 @@ void handleStart_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Start")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Start")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Start); |
|
|
|
midi_serial.sendRealTime(midi::Start); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -895,6 +993,7 @@ void handleStart_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -908,6 +1007,8 @@ void handleContinue_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Continue")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Continue")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Continue); |
|
|
|
midi_serial.sendRealTime(midi::Continue); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -920,6 +1021,7 @@ void handleContinue_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -933,6 +1035,8 @@ void handleStop_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Stop")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] Stop")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Stop); |
|
|
|
midi_serial.sendRealTime(midi::Stop); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -945,6 +1049,7 @@ void handleStop_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -958,6 +1063,8 @@ void handleActiveSensing_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] ActiveSensing")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] ActiveSensing")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::ActiveSensing); |
|
|
|
midi_serial.sendRealTime(midi::ActiveSensing); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -970,6 +1077,7 @@ void handleActiveSensing_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -983,6 +1091,8 @@ void handleSystemReset_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SystemReset")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] SystemReset")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::SystemReset); |
|
|
|
midi_serial.sendRealTime(midi::SystemReset); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -995,6 +1105,7 @@ void handleSystemReset_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1008,6 +1119,8 @@ void handleSystemReset_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F("[MIDI_USB_HOST] RealTimeSystem")); |
|
|
|
Serial.print(F("[MIDI_USB_HOST] RealTimeSystem")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(inRealTime); |
|
|
|
midi_serial.sendRealTime(inRealTime); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1020,6 +1133,7 @@ void handleSystemReset_MIDI_DEVICE_USB_HOST(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1038,6 +1152,8 @@ void handleNoteOn_MIDI_DEVICE_USB(byte inChannel, byte inNumber, byte inVelocity |
|
|
|
Serial.print(F("[MIDI_USB] NoteOn")); |
|
|
|
Serial.print(F("[MIDI_USB] NoteOn")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendNoteOn(inNumber, inVelocity, inChannel); |
|
|
|
midi_serial.sendNoteOn(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1050,6 +1166,7 @@ void handleNoteOn_MIDI_DEVICE_USB(byte inChannel, byte inNumber, byte inVelocity |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1063,6 +1180,8 @@ void handleNoteOff_MIDI_DEVICE_USB(byte inChannel, byte inNumber, byte inVelocit |
|
|
|
Serial.print(F("[MIDI_USB] NoteOff")); |
|
|
|
Serial.print(F("[MIDI_USB] NoteOff")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendNoteOff(inNumber, inVelocity, inChannel); |
|
|
|
midi_serial.sendNoteOff(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1075,6 +1194,7 @@ void handleNoteOff_MIDI_DEVICE_USB(byte inChannel, byte inNumber, byte inVelocit |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1088,6 +1208,8 @@ void handleControlChange_MIDI_DEVICE_USB(byte inChannel, byte inData1, byte inDa |
|
|
|
Serial.print(F("[MIDI_USB] CC")); |
|
|
|
Serial.print(F("[MIDI_USB] CC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendControlChange(inData1, inData2, inChannel); |
|
|
|
midi_serial.sendControlChange(inData1, inData2, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1100,6 +1222,7 @@ void handleControlChange_MIDI_DEVICE_USB(byte inChannel, byte inData1, byte inDa |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1113,6 +1236,8 @@ void handleAfterTouch_MIDI_DEVICE_USB(byte inChannel, byte inPressure) |
|
|
|
Serial.print(F("[MIDI_USB] AT")); |
|
|
|
Serial.print(F("[MIDI_USB] AT")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendAfterTouch(inPressure, inChannel); |
|
|
|
midi_serial.sendAfterTouch(inPressure, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1125,6 +1250,7 @@ void handleAfterTouch_MIDI_DEVICE_USB(byte inChannel, byte inPressure) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1138,6 +1264,8 @@ void handlePitchBend_MIDI_DEVICE_USB(byte inChannel, int inPitch) |
|
|
|
Serial.print(F("[MIDI_USB] PB")); |
|
|
|
Serial.print(F("[MIDI_USB] PB")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendPitchBend(inPitch, inChannel); |
|
|
|
midi_serial.sendPitchBend(inPitch, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1150,6 +1278,7 @@ void handlePitchBend_MIDI_DEVICE_USB(byte inChannel, int inPitch) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1163,6 +1292,8 @@ void handleProgramChange_MIDI_DEVICE_USB(byte inChannel, byte inProgram) |
|
|
|
Serial.print(F("[MIDI_USB] PC")); |
|
|
|
Serial.print(F("[MIDI_USB] PC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendProgramChange(inProgram, inChannel); |
|
|
|
midi_serial.sendProgramChange(inProgram, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1175,6 +1306,7 @@ void handleProgramChange_MIDI_DEVICE_USB(byte inChannel, byte inProgram) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1188,6 +1320,8 @@ void handleSystemExclusive_MIDI_DEVICE_USB(byte *data, uint len) |
|
|
|
Serial.print(F("[MIDI_USB] SysEx")); |
|
|
|
Serial.print(F("[MIDI_USB] SysEx")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendSysEx(len, data); |
|
|
|
midi_serial.sendSysEx(len, data); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1200,6 +1334,7 @@ void handleSystemExclusive_MIDI_DEVICE_USB(byte *data, uint len) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1213,6 +1348,8 @@ void handleSystemExclusive_MIDI_DEVICE_USB(byte *data, uint len) |
|
|
|
Serial.print(F("[MIDI_USB] SysExChunk")); |
|
|
|
Serial.print(F("[MIDI_USB] SysExChunk")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendSysEx(len, data, last); |
|
|
|
midi_serial.sendSysEx(len, data, last); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1225,6 +1362,7 @@ void handleSystemExclusive_MIDI_DEVICE_USB(byte *data, uint len) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1238,6 +1376,8 @@ void handleTimeCodeQuarterFrame_MIDI_DEVICE_USB(midi::DataByte data) |
|
|
|
Serial.print(F("[MIDI_USB] TimeCodeQuarterFrame")); |
|
|
|
Serial.print(F("[MIDI_USB] TimeCodeQuarterFrame")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendTimeCodeQuarterFrame(data); |
|
|
|
midi_serial.sendTimeCodeQuarterFrame(data); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1250,6 +1390,7 @@ void handleTimeCodeQuarterFrame_MIDI_DEVICE_USB(midi::DataByte data) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1263,6 +1404,8 @@ void handleAfterTouchPoly_MIDI_DEVICE_USB(byte inChannel, byte inNumber, byte in |
|
|
|
Serial.print(F("[MIDI_USB] AT-Poly")); |
|
|
|
Serial.print(F("[MIDI_USB] AT-Poly")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendAfterTouch(inNumber, inVelocity, inChannel); |
|
|
|
midi_serial.sendAfterTouch(inNumber, inVelocity, inChannel); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1275,6 +1418,7 @@ void handleAfterTouchPoly_MIDI_DEVICE_USB(byte inChannel, byte inNumber, byte in |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1288,6 +1432,8 @@ void handleSongSelect_MIDI_DEVICE_USB(byte inSong) |
|
|
|
Serial.print(F("[MIDI_USB] SongSelect")); |
|
|
|
Serial.print(F("[MIDI_USB] SongSelect")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendSongSelect(inSong); |
|
|
|
midi_serial.sendSongSelect(inSong); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1300,6 +1446,7 @@ void handleSongSelect_MIDI_DEVICE_USB(byte inSong) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1313,6 +1460,8 @@ void handleTuneRequest_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] TuneRequest")); |
|
|
|
Serial.print(F("[MIDI_USB] TuneRequest")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendTuneRequest(); |
|
|
|
midi_serial.sendTuneRequest(); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1325,6 +1474,7 @@ void handleTuneRequest_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1338,6 +1488,8 @@ void handleClock_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] Clock")); |
|
|
|
Serial.print(F("[MIDI_USB] Clock")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Clock); |
|
|
|
midi_serial.sendRealTime(midi::Clock); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1350,6 +1502,7 @@ void handleClock_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1363,6 +1516,8 @@ void handleStart_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] Start")); |
|
|
|
Serial.print(F("[MIDI_USB] Start")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Start); |
|
|
|
midi_serial.sendRealTime(midi::Start); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1375,6 +1530,7 @@ void handleStart_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1388,6 +1544,8 @@ void handleContinue_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] Continue")); |
|
|
|
Serial.print(F("[MIDI_USB] Continue")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Continue); |
|
|
|
midi_serial.sendRealTime(midi::Continue); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1400,6 +1558,7 @@ void handleContinue_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1413,6 +1572,8 @@ void handleStop_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] Stop")); |
|
|
|
Serial.print(F("[MIDI_USB] Stop")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::Stop); |
|
|
|
midi_serial.sendRealTime(midi::Stop); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1425,6 +1586,7 @@ void handleStop_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1438,6 +1600,8 @@ void handleActiveSensing_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] ActiveSensing")); |
|
|
|
Serial.print(F("[MIDI_USB] ActiveSensing")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::ActiveSensing); |
|
|
|
midi_serial.sendRealTime(midi::ActiveSensing); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1450,6 +1614,7 @@ void handleActiveSensing_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1463,6 +1628,8 @@ void handleSystemReset_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] SystemReset")); |
|
|
|
Serial.print(F("[MIDI_USB] SystemReset")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime(midi::SystemReset); |
|
|
|
midi_serial.sendRealTime(midi::SystemReset); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1475,6 +1642,7 @@ void handleSystemReset_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1488,6 +1656,8 @@ void handleSystemReset_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F("[MIDI_USB] RealTimeSystem")); |
|
|
|
Serial.print(F("[MIDI_USB] RealTimeSystem")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
#ifdef MIDI_MERGE_THRU |
|
|
|
|
|
|
|
if (configuration.midi_soft_thru == true) |
|
|
|
|
|
|
|
{ |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
#ifdef MIDI_DEVICE_DIN |
|
|
|
midi_serial.sendRealTime((midi::MidiType)inRealTime); |
|
|
|
midi_serial.sendRealTime((midi::MidiType)inRealTime); |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -1500,6 +1670,7 @@ void handleSystemReset_MIDI_DEVICE_USB(void) |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
Serial.print(F(" THRU->MIDI_USB_HOST")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(); |
|
|
|
Serial.println(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|