MIDI SYSEX buffer too small (USB-MIDI)
Hi!
I am writing some MIDI SYSEX code for https://www.parasitstudio.de/projects/microdexed/ and tried to implement a MIDI bank upload. Such a DX7 bank consists of 32 voices and together a SYSEX dump is 4104 bytes.
I found that there are two places where the current USB-MIDI implementations have hard coded limits at 290 bytes:
So I decided to make the buffer larger (from 290 bytes to 4104 bytes):
I think I found the right place, but there must be another limitation:
If sending a complete bank (with https://github.com/gbevin/SendMIDI, e.g. 'sendmidi dev "MicroDexed MIDI" syx syf addon/SD/90/RitCh1.syx') the registered function for 'usbMIDI.setHandleSystemExclusive();' does only report 4097 bytes as received length - and not 4104 bytes.
Has anyone an idea where the problem may be located?
BTW: single voice updates with about 150 bytes are working!
Thanks, Holger
Hi!
I am writing some MIDI SYSEX code for https://www.parasitstudio.de/projects/microdexed/ and tried to implement a MIDI bank upload. Such a DX7 bank consists of 32 voices and together a SYSEX dump is 4104 bytes.
I found that there are two places where the current USB-MIDI implementations have hard coded limits at 290 bytes:
Code:
.../arduino-teensy-1.8.12/hardware/teensy/avr/libraries/USBHost_t36/USBHost_t36.h
.../arduino-teensy-1.8.12/hardware/teensy/avr/cores/teensy3/usb_midi.h
So I decided to make the buffer larger (from 290 bytes to 4104 bytes):
Code:
sed -i.orig 's/SYSEX_MAX_LEN = 290/SYSEX_MAX_LEN = 4104/' /usr/local/arduino-teensy-1.8.12/hardware/teensy/avr/libraries/USBHost_t36/USBHost_t36.h
sed -i.orig 's/^#define USB_MIDI_SYSEX_MAX 290/#define USB_MIDI_SYSEX_MAX 4104/' /usr/local/arduino-teensy-1.8.12/hardware/teensy/avr/cores/teensy3/usb_midi.h
I think I found the right place, but there must be another limitation:
If sending a complete bank (with https://github.com/gbevin/SendMIDI, e.g. 'sendmidi dev "MicroDexed MIDI" syx syf addon/SD/90/RitCh1.syx') the registered function for 'usbMIDI.setHandleSystemExclusive();' does only report 4097 bytes as received length - and not 4104 bytes.
Has anyone an idea where the problem may be located?
BTW: single voice updates with about 150 bytes are working!
Thanks, Holger
Last edited: