Replies: 1 comment
-
Thanks @caysira. Please test your patched version thoroughly and please do open a pull request if it works properly for you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After initially being everything fine with serial din-midi-input from my technics sx-px-222 piano, I suddenly get almost only stuck notes. I am not sure why suddenly it doesn't work any more, because it worked before, but I investigated the problem further.
I found out before that my piano uses both, running status and active sensing - both should be handled properly and initially was. I couldn't reproduce the setup in which it was working fine. I also tried older MiniDexed Releases and checked the code history for changes, but was not able to find something that helped me.
That's what I found out so far and I wanted to share it, in case someone else got a similar issue:
"Active Sense" (Message byte 0xFE) is (like the MIDI Clock) a realtime event. The MIDI spec allows to send this byte also within an common event. And that's exactly what seems to happen in my case. The 0xFE is seemingly sent out by my PX-222 about every 300ms, regardless if there's just another midi message happening.
For example, I got the following trace of the MIDI-Input on the raw serial communication byte level (in hex):
...FE FE FE ... // active sensing
90 3c 15 // keypress detected, note is playing
FE // active sensing
90 3c 00 // released key, my piano sends "note on" with 00 velocity, wich is allowed by MIDI spec an equivalent to "80 3c"
// sound stops playing; no running status used
...FE FE FE ... // active sensing
90 3c 3b // keypress detected, note is playing
3c 00 // released key, this time running status (not repeating the same status byte) is used;
// sound stops, running status is handled correctly by serialmididevice.cpp
...FE FE FE ... // active sensing
90 3c 38 // keypress detected, note is playing
90 FE 3c 00 // algorithm in serialmididevice.cpp fails because of the mixed in "FE" (MIDIRESTART is triggered and 3c 00 as data
// bytes are lost/ignored --> stuck note
This happens every few notes played. It may be an exotic case with older MIDI devices - maybe only my PX-222, but as it is allowed by the MIDI specification it should probably be dealt with.
I was able to get local building on my pc running and will try the following work-around:
Of course, you then lose the "active sensing" feature of MIDI, but I am not sure, if it is implemented at all yet. At a quick glimpse in mididevice.cpp I couldn't see it used other than ignoring it in the midi dump section.
For USB Midi-Devices "Active Sensing" to my knowledge is not used at all.
I will keep you updated.
Beta Was this translation helpful? Give feedback.
All reactions