-
Notifications
You must be signed in to change notification settings - Fork 105
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
Missing Midi Events #61
Comments
This is also an issue with my app (I am developing on nexus 9). The issue does not occur on version 0.1.2, so for anyone experiencing this problem you can revert to that version (have not tested 0.1.3) in your repositories:
in your dependencies: |
Should fix MIDI events being dropped occasionally. (issue kshoji#61)
By increasing timeout in bulkTransfer fix the problem for me. Thanks @amitayd. @trcolgrove said that 0.1.2 version works nice, and in this version, the timeout is 0 (infinite). Make sense! |
I've been having dropped messages still, but I've also been having the same trouble with the official Android API. Of course, in Google's example app, they wrap the MidiReceiver class with a custom MidiFramer class. My guess is that Android will group messages together and the callback only sees the one. Here's the MidiFramer code:
|
* overhaul MIDIOutConnection (no protocol) * add LightController API
@jrl290 I am also having issues with missing midi events and cannot find the cause... I am using standard android impl and tried also this lib but cannot get it to work. Notes get missing just when I send a lot of them from sequencer . When I play just one track everything is fine I play two almost no missing just sometimes, I play 3 they get lost regularly.. Is it possible that android just cannot send it in time so it just discards them ? Maybe this is not even possible to play midi by USB to some daw on computer ? Its hard to believe it has to be some my issue for sure but when I play locally in app these some midi events in synth are perfect. Little lost sorry if I am off topic here... |
When I tailored the MidiFramer code above to the app I was working on, I didn't have any further trouble dropping messages. That was using Android's standard implementation however. I did not end up using this library |
What library did you end up using, is there a library that does the same thing as mido in python on the android? Thanks! |
The library does not seem to register every singe midi event. I was using this library to write a visualisation app and I noticed some notes either did not appear at all or got stuck "on" after some time. Upon not being able to find the bug in my own code, I simply added a small counter to the original source code provided here on Github. This counter keeps track of the number of total midi events sent per note. Obviously the counter values should always be even numbers when no key is being pressed, as an "on" event is always followed by an "off" event. However, after playing a few bars of music, the counter values on some notes became odd numbers, indicating that some events were missed.
I have tested this with three different Android devices (Android 5.0, 5.1 and 7.1) and with two different Yamaha instruments (both having a VendorId of 1177). Other market apps do not have this problem which leads me to the conclusion that the problem lies in this library
The text was updated successfully, but these errors were encountered: