-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need delay to send messages reliably #44
Comments
I also looked at the messages in MIDI-OX and it confirmed what I saw in FL Studio. |
Hi @chriswatrous, it is probably related to the USB controller that drops (or, better, doesn't accept) data packets if they are too fast. Due is not our main dev target and its clock almost doubles the Zero family so probably the behaviour was unnoticed until now. |
Same issue here, also with a Due and Win 10. Putting a 50 microseconds delay in between each message is better, but it's still not 100% reliable. such a shame |
A workaround for this issue is sending multiple event packets at the same time with Working code:
|
I've tried everything: flush after each sendMIDI, flush after several sendMIDI, delay 500 microseconds, delay 1 millisecond, delay 10 milliseconds. But there was always more or less missing note-off events, though the debug messages stated that sendMIDI method have been invoked. It seems to be the library is not useable for Due at all for some reason. Update: Even with simple Serial.write and Hairless midi<->serial bridge it works without any glitches, no need any delays... Why would a library won't do that? |
Board: Arduino Due
OS: Windows 10
I'm learning how to use this library and I'm having trouble getting messages sent in quick succession to send reliably. It seems I need to add a delay in between each message.
Is this expected behavior? Or is this a bug?
This is what I would expect to work:
But only the first message of each group sends reliably. (recorded in FL Studio):
I tried adding a flush after each event:
Same result:
If I add a 50 microsecond delay it works.
25 microseconds is not quite enough:
Thanks for your help.
The text was updated successfully, but these errors were encountered: