void SendPitchBend() { if (MidiChannel == null) { return; } var bend = _pitchbend; // RPN-based pitchbend range doesn't work for the MT32, // so we'll do the scaling ourselves. if (Player._se.IsNativeMT32) { bend = (short)(bend * _pitchbend_factor / 12); } MidiChannel.PitchBend((short)Clamp(bend + (_detune_eff * 64 / 12) + (_transpose_eff * 8192 / 12), -8192, 8191)); }