Apply the pitch ratio to wavetable oscillator

This commit is contained in:
Jean Pierre Cimalando 2020-03-16 17:54:47 +01:00
parent 4065d406f7
commit 2002a58da2

View file

@ -506,7 +506,8 @@ void sfz::Voice::fillWithGenerator(AudioSpan<float> buffer) noexcept
auto frequencies = tempSpan1.first(buffer.getNumFrames());
auto bends = tempSpan2.first(buffer.getNumFrames());
fill<float>(frequencies, baseFrequency);
float keycenterFrequency = midiNoteFrequency(region->pitchKeycenter);
fill<float>(frequencies, pitchRatio * keycenterFrequency);
if (region->bendStep > 1)
pitchBendEnvelope.getQuantizedBlock(bends, bendStepFactor);