WebAudio / web-midi-api

The Web MIDI API, developed by the W3C Audio WG
http://webaudio.github.io/web-midi-api/
Other
323 stars 49 forks source link

SysEx transfer speed and buffer size control #169

Closed 2xAA closed 7 years ago

2xAA commented 7 years ago

I believe the WebMIDI spec should have the ability to modify SysEx buffer size and the delay between the buffers being sent.

This is important for "legacy" devices such as the Casio CZ-101 which requires smaller packets of data and increased delay time for SysEx patch interchange to complete successfully.

This may also prove to be useful on other, older, MIDI devices which should not be left behind, even if they don't conform 100% to the MIDI specification.

(if this was not the correct place to file this issue, please point me in the right direction - thank you)

toyoshim commented 7 years ago

Could be merged to #158. Does CZ-101 can not accept transferring wire-speed sysex messages over traditional DIN cable? I don't think we want to have a special scheme to workaround such problem, but once #158 is solved, you can manage transferring speed somehow in JavaScript.

If you connect your CZ-101 via USB-MIDI converter, that could be a problem of the converter. As you know USB transfers faster than MIDI does, but USB devices can ask retry if MIDI wire is still busy. I'm afraid that some cheaper devices won't handle it correctly, and just using another bridge solves your issue.

If you are sending very large messages, it may hit Chrome's limit, and could be solved by #158.

2xAA commented 7 years ago

I have connected it via two MIDI interfaces, one is the MIDI Mate-II and the other is Native Instruments Audio 8 DJ. Both devices are high quality and do not distort the messages, I have checked in a loop between the two devices and have used them both on older MIDI systems.

I'm able to write to the CZ-101 with both devices when making the SysEx buffer sizes smaller (8 bytes) in other software (MIDI-Ox) and adding a 70ms delay time between buffers. I haven't tested larger buffers or smaller delay times yet as this seems to work nicely.

The messages are around 255-263 bytes in length.

But yes, I think #158 might fix the problem. We can close this or merge into #158 until that's fixed and I'll have another go - thanks for the reply.

cwilso commented 7 years ago

Yep, will be fixed by #158.