Corrected a bug where the pitch shift due to the note displacement with respect to the key center was applied twice
This commit is contained in:
parent
87ee6e1d74
commit
bfb9b80724
1 changed files with 2 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ void sfz::Voice::startVoice(Region* region, int delay, int channel, int number,
|
|||
|
||||
sourcePosition = region->getOffset();
|
||||
initialDelay = delay + static_cast<uint32_t>(region->getDelay() * sampleRate);
|
||||
baseFrequency = midiNoteFrequency(number) * pitchRatio;
|
||||
baseFrequency = midiNoteFrequency(number);
|
||||
prepareEGEnvelope(initialDelay, value);
|
||||
}
|
||||
|
||||
|
|
@ -463,6 +463,7 @@ void sfz::Voice::fillWithGenerator(AudioSpan<float> buffer) noexcept
|
|||
pitchBendEnvelope.getQuantizedBlock(bends, region->bendStep);
|
||||
else
|
||||
pitchBendEnvelope.getBlock(bends);
|
||||
|
||||
applyGain<float>(bends, jumps);
|
||||
jumps[0] += phase;
|
||||
cumsum<float>(jumps, phases);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue