Closed
Description
MIDI SysEx messages are sent out the USB MIDI port are garbled.
Example:
import usb_midi
usb_out_port = usb_midi.ports[1]
sys_ex_test_msg = bytes([0xF0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xF0])
usb_out_port.write(sys_ex_test_msg)
The host system should receive an 11 byte MIDI SysEx message.... however it receives:
10:43:23.628 From CircuitPython usb_midi.ports[1] SysEx
F0 01 02 01 01 02 02 01 02 03 01 02 04 01 02 05 01 02 06 01 02 07 01 02 08 01 02 09 01 02 F7
10:43:23.628 From CircuitPython usb_midi.ports[1] SysEx
F0 01 02 F7
Code path:
usb_midi.ports[1].write()
in python callsusb_midi_portout_write
inshared-bindings/usb_midi/PortOut.c
, which callscommon_hal_usb_midi_portout_write
inshared-module/usb_midi/PortOut.c
, which callstud_midi_write
inlib/shared/tinyusb/src/class/midi/midi_device.h
, which callstud_midi_n_write
inlib/shared/tinyusb/src/class/midi/midi_device.c
, which is where the bug is!
The bug in tinyusb was recently fixed and committed: hathach/tinyusb#512
This bug will be fixed when a version of tinyusb is pulled into this project that is past that fix. This bug is here to make sure it doesn't get missed.
Metadata
Metadata
Assignees
Labels
No labels