diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index cc00b295..b4a8f003 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -454,9 +454,15 @@ void sfz::Synth::cc(int delay, int channel, int ccNumber, uint8_t ccValue) noexc } } -void sfz::Synth::pitchWheel(int /* delay */, int channel, int /* pitch */) noexcept +void sfz::Synth::pitchWheel(int delay, int channel, int pitch) noexcept { + ASSERT(pitch <= 8192); + ASSERT(pitch >= 8192); channel = translateMidiChannelToSfz(channel); + + for (auto& voice: voices) { + voice->registerPitchWheel(delay, channel, pitch); + } } void sfz::Synth::aftertouch(int /* delay */, int channel, uint8_t /* aftertouch */) noexcept { diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index 41cd4600..81ca9f53 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -223,7 +223,7 @@ public: * than the size of the block in the next call to * renderBlock(). * @param channel the midi channel for the event (0-based) - * @param pitch the pitch value + * @param pitch the pitch value centered between -8192 and 8192 */ void pitchWheel(int delay, int channel, int pitch) noexcept; /**