mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix issue where sustain value would be reset after note off in legacy mode
This commit is contained in:
parent
8f069624d7
commit
9d9d26c85a
1 changed files with 3 additions and 3 deletions
|
|
@ -336,8 +336,8 @@ void MPEInstrument::noteOff (int midiChannel,
|
|||
note->keyState = (note->keyState == MPENote::keyDownAndSustained) ? MPENote::sustained : MPENote::off;
|
||||
note->noteOffVelocity = midiNoteOffVelocity;
|
||||
|
||||
// If no more notes are playing on this channel, reset the dimension values
|
||||
if (getLastNotePlayedPtr (midiChannel) == nullptr)
|
||||
// If no more notes are playing on this channel in mpe mode, reset the dimension values
|
||||
if (! legacyMode.isEnabled && getLastNotePlayedPtr (midiChannel) == nullptr)
|
||||
{
|
||||
pressureDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::minValue();
|
||||
pitchbendDimension.lastValueReceivedOnChannel[midiChannel - 1] = MPEValue::centreValue();
|
||||
|
|
@ -395,7 +395,7 @@ void MPEInstrument::polyAftertouch (int midiChannel, int midiNoteNumber, MPEValu
|
|||
|
||||
MPEValue MPEInstrument::getInitialValueForNewNote (int midiChannel, MPEDimension& dimension) const
|
||||
{
|
||||
if (getLastNotePlayedPtr (midiChannel) != nullptr)
|
||||
if (! legacyMode.isEnabled && getLastNotePlayedPtr (midiChannel) != nullptr)
|
||||
return &dimension == &pressureDimension ? MPEValue::minValue() : MPEValue::centreValue();
|
||||
|
||||
return dimension.lastValueReceivedOnChannel[midiChannel - 1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue