Multiple release samples can play on pedal up
This commit is contained in:
parent
a3943abf79
commit
dc328cb9a7
1 changed files with 1 additions and 9 deletions
|
|
@ -1058,15 +1058,7 @@ bool sfz::Region::registerNoteOff(int noteNumber, float velocity, float randValu
|
||||||
// If we reach this part, we're storing the notes to delay their release on CC up
|
// If we reach this part, we're storing the notes to delay their release on CC up
|
||||||
// This is handled by the Synth object
|
// This is handled by the Synth object
|
||||||
|
|
||||||
const auto sameNoteTest = [noteNumber](const std::pair<int, float>& noteAndValue) {
|
delayedReleases.emplace_back(noteNumber, midiState.getNoteVelocity(noteNumber));
|
||||||
return noteAndValue.first == noteNumber;
|
|
||||||
};
|
|
||||||
|
|
||||||
auto it = absl::c_find_if(delayedReleases, sameNoteTest);
|
|
||||||
if (it == delayedReleases.end())
|
|
||||||
delayedReleases.emplace_back(noteNumber, midiState.getNoteVelocity(noteNumber));
|
|
||||||
else
|
|
||||||
it->second = velocity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue