This project has moved and is read-only. For the latest updates, please go here.


Range for PitchWheelChangeEvent.Pitch should be 0-16383


I think I found a small bug in NAudio.Midi.PitchWheelChangeEvent:

The Pitch property accepts values up to (and including) 16384.
If, however, I create the event with that maximum value, the bit-shifting part in GetAsShortMessage() comes out as 0:
Console.Write( ((16384 & 0x7f) << 8) + (((16384 >> 7) & 0x7f) << 16) ); //-> 0
I believe the maximum value should actually be 16383.

(The reason I noticed this is because the Mackie Control I work with uses PitchWheel events for its faders and when I programmatically move the fader to its top position, it always goes to the bottom.)
Closed Jan 28 at 4:39 PM by markheath


markheath wrote Feb 23, 2016 at 12:59 PM

yes I think you're right. Will try to get this sorted