pico-example-midi icon indicating copy to clipboard operation
pico-example-midi copied to clipboard

"tudi_midi_write24" not defined

Open emaschas opened this issue 3 years ago • 3 comments

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...

emaschas avatar Jan 29 '22 19:01 emaschas

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

alexmlucas avatar Mar 04 '22 10:03 alexmlucas

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.

infovore avatar Mar 21 '22 21:03 infovore

I propose my contribution...

emaschas avatar Mar 24 '22 18:03 emaschas