Translate the channel for noteOn at the right place
This commit is contained in:
parent
1fe8932851
commit
a70316c24c
1 changed files with 1 additions and 1 deletions
|
|
@ -420,6 +420,7 @@ void sfz::Synth::noteOff(int delay, int channel, int noteNumber, uint8_t velocit
|
||||||
ASSERT(noteNumber < 128);
|
ASSERT(noteNumber < 128);
|
||||||
ASSERT(noteNumber >= 0);
|
ASSERT(noteNumber >= 0);
|
||||||
|
|
||||||
|
channel = translateMidiChannelToSfz(channel);
|
||||||
AtomicGuard callbackGuard { inCallback };
|
AtomicGuard callbackGuard { inCallback };
|
||||||
if (!canEnterCallback)
|
if (!canEnterCallback)
|
||||||
return;
|
return;
|
||||||
|
|
@ -430,7 +431,6 @@ void sfz::Synth::noteOff(int delay, int channel, int noteNumber, uint8_t velocit
|
||||||
auto replacedVelocity = midiState.getNoteVelocity(channel, noteNumber);
|
auto replacedVelocity = midiState.getNoteVelocity(channel, noteNumber);
|
||||||
auto randValue = randNoteDistribution(Random::randomGenerator);
|
auto randValue = randNoteDistribution(Random::randomGenerator);
|
||||||
|
|
||||||
channel = translateMidiChannelToSfz(channel);
|
|
||||||
for (auto& voice : voices)
|
for (auto& voice : voices)
|
||||||
voice->registerNoteOff(delay, channel, noteNumber, replacedVelocity);
|
voice->registerNoteOff(delay, channel, noteNumber, replacedVelocity);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue