InstrumentTrack: send RPN update in updatePitchRange()

When changing the pitch range all we can do for MIDI is to update the
MIDI pitch bend sensitivity RPN even though this is only supported by
some MIDI instruments.

Closes #129.
This commit is contained in:
Tobias Doerffel
2014-01-26 14:07:15 +01:00
parent 52d2274e19
commit 0a5665ae16

View File

@@ -543,7 +543,13 @@ void InstrumentTrack::updatePitch()
void InstrumentTrack::updatePitchRange()
{
const int r = m_pitchRangeModel.value();
m_pitchModel.setRange( -100 * r, 100 * r );
m_pitchModel.setRange( -MinPitchDefault * r, MaxPitchDefault * r );
processOutEvent( MidiEvent( MidiControlChange, midiPort()->realOutputChannel(),
MidiControllerRegisteredParameterNumberLSB, MidiPitchBendSensitivityRPN & 0x7F ) );
processOutEvent( MidiEvent( MidiControlChange, midiPort()->realOutputChannel(),
MidiControllerRegisteredParameterNumberMSB, ( MidiPitchBendSensitivityRPN >> 8 ) & 0x7F ) );
processOutEvent( MidiEvent( MidiControlChange, midiPort()->realOutputChannel(), MidiControllerDataEntry, midiPitchRange() ) );
}