1

Closed

Range for PitchWheelChangeEvent.Pitch should be 0-16383

description

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 3:39 PM by markheath

comments

markheath wrote Feb 23, 2016 at 11:59 AM

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