pico-example-midi
pico-example-midi copied to clipboard
"tudi_midi_write24" not defined
On my installation (from Raspberry site), the function "tudi_midi_write24" is not defined. I had to do so as follows :
static inline uint32_t tudi_midi_write24(uint8_t jack_id, uint8_t b1, uint8_t b2, uint8_t b3) {
uint8_t msg[3] = { b1, b2, b3 };
return tud_midi_n_stream_write(0, jack_id, msg, 3); // itf = 0
}
It seems to me that the function is defined only in the Adafruit distribution...
I had the same issue but managed to build successfully by changing the midi_task function to match that in the current example provided in the tinyusb repository below. In this example tudi_midi_write24 is replaced by tud_midi_stream_write.
https://github.com/hathach/tinyusb/blob/master/examples/device/midi_test/src/main.c
I believe that this changed when the version of TinyUSB shipped with the Pico SDK was bumped, shortly after I first released this demo. I should tweak it.
I propose my contribution...