ALSA hardware input of SysEx is being separated into 256 byte chunks

Just bought your first old school MIDI synthesizer and can't get it to work right? Having trouble getting DOSBox or SCUMMVM to work the way you want? Perhaps we can help. Do you have some neat tips you just want to share with the world? Or maybe you just need help convincing your computer to work. Either way, use this forum for all tech support related needs that somehow relate to MIDI and/or PC Gaming.

Moderator: Quest Studios Archive moderators

Post Reply
jaffa225man
Quest Studios Veteran
Quest Studios Veteran
Posts: 147
Joined: Mon Jul 13, 2015 6:26 pm
Location: Chippewa Falls, Wisconsin

ALSA hardware input of SysEx is being separated into 256 byte chunks

Post by jaffa225man » Wed Nov 11, 2020 3:09 am

I've noticed an issue with my Edirol USB MIDI interfaces, or their Linux kernel modules: SysEx messages longer than 256 bytes read from MIDI input (and perhaps output, but that seems impossible to tell) are split into 256 byte chunks. /sys/module/snd_seq_midi/parameters/input_buffer_size & output_buffer_size show that 4096 bytes should work, but I've even tried a megabyte for each parameter.

I suppose I should check the kernel source or ask that list, but if anyone knows a solution, it would be nice to get it straight before I have done that.

This makes certain initial SysEx files I'd created not work when qmidiroute SysEx delays are on. I'm waiting for another USB MIDI interface to see if it really is a hardware limitation, though I think it's the kernel.

Upon further reflection, it occurs to me that I could recreate my initial SysEx files virtually using qmidiroute to perform the delaying, because virtual port connections don't seem to have the issue.

The way I had been converting .syx files to SMF, is through unix's cat terminal command to pipe it out the MIDI interface. In which case, I'd need to input the output (as loopback), and that causes the splitting.

Well, I was able to create a delayed .mid file from SILPHEED.SYX, using the method I explained about converting SysEx banks with cakewalk: viewtopic.php?f=11&t=17796&sid=e96c04c2 ... 309#p18328. I then played that non-delayed resultant .mid, through qmidiroute with delays set at 140ms while re-recording it to get a nice file, with complete messages, that the MT-32 (old) can cope with, which won't get improperly split up if re-delayed in qmidiroute. I don't like using non-free programs, though, so I hope to find or create another way, preferably without modifying qmidiroute to cope with and concatenate these partial messages whole again.

jaffa225man
Quest Studios Veteran
Quest Studios Veteran
Posts: 147
Joined: Mon Jul 13, 2015 6:26 pm
Location: Chippewa Falls, Wisconsin

Re: ALSA hardware input of SysEx is being separated into 256 byte chunks

Post by jaffa225man » Sun Nov 15, 2020 3:20 pm

After not finding anything quickly about solving the issue via the linux kernel (although that's probably the best course to take), I just decided to fix split SysEx messages by concatenation within qmidiroute: viewtopic.php?f=4&t=17790&p=18491#p18491

Post Reply