Hello,
I'm implementing a test MIDI device with T3.6.
At the moment it just forwards incoming MIDI messages to both a serial MIDI output (DIN) and usb-MIDI.
So, I wrote my handlers for various type of incoming MIDI messages.
For example:
My problem: using MIDI class, we have
which takes 1 argument.
But when trying to push the same content to usbMIDI, the equivalent:
does not exist: it wants 3 arguments (and so I don't know what to pass within my handler, which only has 1 input argument)
There are similar issues with other functions, which again need more arguments in their usbMIDI implementations.
Edit: after some cleanup, the only function with different calls between usbMIDI and MIDI is sendTimeCodeQuarterFrame()
Full source code is very large ( > 800 lines) so I cannot paste here; I hope I gave enough infos..?
Edit: using Arduino IDE 1.8.19 and Teensyduino 1.59beta4 (because of all the nice MIDI improvements!
)
Thanks for any hint
I'm implementing a test MIDI device with T3.6.
At the moment it just forwards incoming MIDI messages to both a serial MIDI output (DIN) and usb-MIDI.
So, I wrote my handlers for various type of incoming MIDI messages.
For example:
C++:
void timeCodeQuarterFrameHandler(const byte data)
{
....
MIDI.sendTimeCodeQuarterFrame(data);
....
}
My problem: using MIDI class, we have
Code:
MIDI.sendTimeCodeQuarterFrame(data);
which takes 1 argument.
But when trying to push the same content to usbMIDI, the equivalent:
Code:
usbMIDI.sendTimeCodeQuarterFrame(data);
does not exist: it wants 3 arguments (and so I don't know what to pass within my handler, which only has 1 input argument)
C++:
Teensy_MIDIConverter_v2:435: error: no matching function for call to 'usb_midi_class::sendTimeCodeQuarterFrame(const byte&)'
435 | usbMIDI.sendTimeCodeQuarterFrame(data);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from D:\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:63,
from D:\Arduino\arduino-build-output\pch\Arduino.h:6:
D:\Arduino\hardware\teensy\avr\cores\teensy3/usb_midi.h:216:14: note: candidate: 'void usb_midi_class::sendTimeCodeQuarterFrame(uint8_t, uint8_t, uint8_t)'
216 | void sendTimeCodeQuarterFrame(uint8_t type, uint8_t value, uint8_t cable=0) __attribute__((always_inline)) __attribute__((always_inline)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
D:\Arduino\hardware\teensy\avr\cores\teensy3/usb_midi.h:216:14: note: candidate expects 3 arguments, 1 provided
Edit: after some cleanup, the only function with different calls between usbMIDI and MIDI is sendTimeCodeQuarterFrame()
Full source code is very large ( > 800 lines) so I cannot paste here; I hope I gave enough infos..?
Edit: using Arduino IDE 1.8.19 and Teensyduino 1.59beta4 (because of all the nice MIDI improvements!
Thanks for any hint
Last edited: