From f66aedfc4ffbb638c8b1db96e273bbe975eaf6e3 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Mon, 20 Jan 2020 06:29:27 +0100 Subject: [PATCH] Added pitch wheel region activation --- src/sfizz/Synth.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 63101517..cf414774 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -382,7 +382,7 @@ void sfz::Synth::renderBlock(AudioSpan buffer) noexcept const auto callbackStartTime = std::chrono::high_resolution_clock::now(); buffer.fill(0.0f); - + resources.filePool.cleanupPromises(); if (freeWheeling) @@ -490,7 +490,7 @@ void sfz::Synth::cc(int delay, int ccNumber, uint8_t ccValue) noexcept resetAllControllers(delay); return; } - + midiState.ccEvent(ccNumber, ccValue); for (auto& voice : voices) voice->registerCC(delay, ccNumber, ccValue); @@ -512,6 +512,11 @@ void sfz::Synth::pitchWheel(int delay, int pitch) noexcept ASSERT(pitch >= -8192); midiState.pitchBendEvent(pitch); + + for (auto& region: regions) { + region->registerPitchWheel(pitch); + } + for (auto& voice: voices) { voice->registerPitchWheel(delay, pitch); }