|
|
@ -122,7 +122,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi |
|
|
|
strlcpy(text, "Mono AT", sizeof(text)); |
|
|
|
strlcpy(text, "Mono AT", sizeof(text)); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::PitchBend: |
|
|
|
case midi::PitchBend: |
|
|
|
handlePitchBend(inChannel, inData1); |
|
|
|
handlePitchBend(inChannel, (inData2 << 7) | inData1); |
|
|
|
strlcpy(text, "PB", sizeof(text)); |
|
|
|
strlcpy(text, "PB", sizeof(text)); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::ProgramChange: |
|
|
|
case midi::ProgramChange: |
|
|
@ -158,7 +158,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi |
|
|
|
usbMIDI.sendAfterTouch(inData1, inChannel); |
|
|
|
usbMIDI.sendAfterTouch(inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::PitchBend: |
|
|
|
case midi::PitchBend: |
|
|
|
usbMIDI.sendPitchBend(inData1, inChannel); |
|
|
|
usbMIDI.sendPitchBend((inData2 << 7) | inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::ProgramChange: |
|
|
|
case midi::ProgramChange: |
|
|
|
usbMIDI.sendProgramChange(inData1, inChannel); |
|
|
|
usbMIDI.sendProgramChange(inData1, inChannel); |
|
|
@ -191,7 +191,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi |
|
|
|
midi_serial.sendAfterTouch(inData1, inChannel); |
|
|
|
midi_serial.sendAfterTouch(inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::PitchBend: |
|
|
|
case midi::PitchBend: |
|
|
|
midi_serial.sendPitchBend(inData1, inChannel); |
|
|
|
midi_serial.sendPitchBend((inData2 << 7) | inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::ProgramChange: |
|
|
|
case midi::ProgramChange: |
|
|
|
midi_serial.sendProgramChange(inData1, inChannel); |
|
|
|
midi_serial.sendProgramChange(inData1, inChannel); |
|
|
@ -224,7 +224,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi |
|
|
|
midi_usb.sendAfterTouch(inData1, inChannel); |
|
|
|
midi_usb.sendAfterTouch(inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::PitchBend: |
|
|
|
case midi::PitchBend: |
|
|
|
midi_usb.sendPitchBend(inData1, inChannel); |
|
|
|
midi_usb.sendPitchBend((inData2 << 7) | inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::ProgramChange: |
|
|
|
case midi::ProgramChange: |
|
|
|
midi_usb.sendProgramChange(inData1, inChannel); |
|
|
|
midi_usb.sendProgramChange(inData1, inChannel); |
|
|
@ -257,7 +257,7 @@ void handle_generic(byte inChannel, byte inData1, byte inData2, const char *midi |
|
|
|
usbhost_midi_serial.sendAfterTouch(inData1, inChannel); |
|
|
|
usbhost_midi_serial.sendAfterTouch(inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::PitchBend: |
|
|
|
case midi::PitchBend: |
|
|
|
usbhost_midi_serial.sendPitchBend(inData1, inChannel); |
|
|
|
usbhost_midi_serial.sendPitchBend((inData2 << 7) | inData1, inChannel); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case midi::ProgramChange: |
|
|
|
case midi::ProgramChange: |
|
|
|
usbhost_midi_serial.sendProgramChange(inData1, inChannel); |
|
|
|
usbhost_midi_serial.sendProgramChange(inData1, inChannel); |
|
|
@ -599,7 +599,8 @@ void handleAfterTouch_MIDI_DEVICE_DIN(byte inChannel, byte inPressure) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handlePitchBend_MIDI_DEVICE_DIN(byte inChannel, int inPitch) { |
|
|
|
void handlePitchBend_MIDI_DEVICE_DIN(byte inChannel, int inPitch) { |
|
|
|
handle_generic(inChannel, inPitch, '\0', MIDI_BY_DIN, midi::PitchBend); |
|
|
|
inPitch += 0x2000; |
|
|
|
|
|
|
|
handle_generic(inChannel, (inPitch & 0x07), (inPitch >> 0x07), MIDI_BY_DIN, midi::PitchBend); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handleProgramChange_MIDI_DEVICE_DIN(byte inChannel, byte inProgram) { |
|
|
|
void handleProgramChange_MIDI_DEVICE_DIN(byte inChannel, byte inProgram) { |
|
|
@ -703,7 +704,8 @@ void handleAfterTouch_MIDI_DEVICE_USB_HOST(byte inChannel, byte inPressure) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handlePitchBend_MIDI_DEVICE_USB_HOST(byte inChannel, int inPitch) { |
|
|
|
void handlePitchBend_MIDI_DEVICE_USB_HOST(byte inChannel, int inPitch) { |
|
|
|
handle_generic(inChannel, inPitch, '\0', MIDI_BY_USB_HOST, midi::PitchBend); |
|
|
|
inPitch += 0x2000; |
|
|
|
|
|
|
|
handle_generic(inChannel, (inPitch & 0x07), (inPitch >> 0x07), MIDI_BY_USB_HOST, midi::PitchBend); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handleProgramChange_MIDI_DEVICE_USB_HOST(byte inChannel, byte inProgram) { |
|
|
|
void handleProgramChange_MIDI_DEVICE_USB_HOST(byte inChannel, byte inProgram) { |
|
|
@ -805,7 +807,8 @@ void handleAfterTouch_MIDI_DEVICE_USB_HOST_SERIAL(byte inChannel, byte inPressur |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handlePitchBend_MIDI_DEVICE_USB_HOST_SERIAL(byte inChannel, int inPitch) { |
|
|
|
void handlePitchBend_MIDI_DEVICE_USB_HOST_SERIAL(byte inChannel, int inPitch) { |
|
|
|
handle_generic(inChannel, inPitch, '\0', MIDI_BY_USB_HOST_SERIAL, midi::PitchBend); |
|
|
|
inPitch += 0x2000; |
|
|
|
|
|
|
|
handle_generic(inChannel, (inPitch & 0x07), (inPitch >> 0x07), MIDI_BY_USB_HOST_SERIAL, midi::PitchBend); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handleProgramChange_MIDI_DEVICE_USB_HOST_SERIAL(byte inChannel, byte inProgram) { |
|
|
|
void handleProgramChange_MIDI_DEVICE_USB_HOST_SERIAL(byte inChannel, byte inProgram) { |
|
|
@ -909,7 +912,8 @@ void handleAfterTouch_MIDI_DEVICE_USB(byte inChannel, byte inPressure) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handlePitchBend_MIDI_DEVICE_USB(byte inChannel, int inPitch) { |
|
|
|
void handlePitchBend_MIDI_DEVICE_USB(byte inChannel, int inPitch) { |
|
|
|
handle_generic(inChannel, inPitch, '\0', MIDI_BY_USB, midi::PitchBend); |
|
|
|
inPitch += 0x2000; |
|
|
|
|
|
|
|
handle_generic(inChannel, (inPitch & 0x07), (inPitch >> 0x07), MIDI_BY_USB, midi::PitchBend); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void handleProgramChange_MIDI_DEVICE_USB(byte inChannel, byte inProgram) { |
|
|
|
void handleProgramChange_MIDI_DEVICE_USB(byte inChannel, byte inProgram) { |
|
|
|