micdah / RtMidi.Core

RtMidi for .Net Standard
https://rtmidicore.micdah.dk/
Other
36 stars 12 forks source link

NRPN issues on macOS #36

Open GuruGurra opened 8 months ago

GuruGurra commented 8 months ago

There is a problem with sending NRPN messages on macOS.

On Windows, every NRPN message is correctly sent. With the sequence:

On macOS, the following sequence is sent if the value > 0:

...and the following sequence if the value = 0:

So, on macOS, CC6 is always sent twice; if the value is 0, CC38 is excluded.

GuruGurra commented 1 month ago

Any comment on this?

GuruGurra commented 1 month ago

I updated it to the latest version (1.0.53; I don't remember which version I had when writing the first report), which seems even more buggy.

It is still sending CC6 twice. It still excludes CC38 if the value is 0, which is a disaster. But now it sometimes sends CC99+CC98, sometimes only CC99, and sometimes none of them!

The handling of CC99 and CC98 may be according to the Midi spec if you stretch it a bit, even though it is clearly against the recommendations in the spec (which says that you should always send both commands). The double CC6 does not match the Midi spec, but it might not cause any trouble. The omission of CC38 when the value is 0 is a mystery and breaks the use of NRPN on Mac.

On Windows, it still sends all four commands every time.