NotePlayHandle: send correct MidiNoteOff events if base note changed
When changing an InstrumentTrack's base note while NotePlayHandles are
active, they will send a wrong MidiNoteOff event due to the masterKey()
translation in InstrumentTrack::processOutEvent().
Therefore in NotePlayHandle remember the original base note value and
add the difference between original and current base note to the value
returned by NotePlayHandle::key(). Fixes hanging notes in MIDI-based
instruments such as ZynAddSubFX.
Furthermore some coding style improvements.
Closes #3146975.
(cherry picked from commit a9717c0cc3)
This commit is contained in:
@@ -613,7 +613,7 @@ void sf2Instrument::playNote( notePlayHandle * _n, sampleFrame * )
|
||||
}
|
||||
|
||||
fluid_synth_noteon( m_synth, m_channel, midiNote,
|
||||
_n->getMidiVelocity() );
|
||||
_n->midiVelocity() );
|
||||
|
||||
// get new voice and save it
|
||||
fluid_synth_get_voicelist( m_synth, voices, poly, -1 );
|
||||
|
||||
Reference in New Issue
Block a user