--- linuxsampler/trunk/src/engines/gig/Voice.cpp 2009/05/03 12:15:40 1895 +++ linuxsampler/trunk/src/engines/gig/Voice.cpp 2009/06/27 16:55:41 1923 @@ -200,7 +200,8 @@ if (pDimRgn->PitchTrack && (MIDIKey - (int) pDimRgn->UnityNote) < 40) pitchbasecents += (MIDIKey - (int) pDimRgn->UnityNote) * 100; this->PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(pSample->SamplesPerSecond) / double(pEngine->SampleRate)); - this->PitchBend = RTMath::CentsToFreqRatio(PitchBend / 8192.0 * 100.0 * pEngineChannel->pInstrument->PitchbendRange); + this->PitchBendRange = 1.0 / 8192.0 * 100.0 * pEngineChannel->pInstrument->PitchbendRange; + this->PitchBend = RTMath::CentsToFreqRatio(PitchBend * PitchBendRange); } // the length of the decay and release curves are dependent on the velocity @@ -746,7 +747,7 @@ } void Voice::processPitchEvent(RTList::Iterator& itEvent) { - PitchBend = RTMath::CentsToFreqRatio(itEvent->Param.Pitch.Pitch / 8192.0 * 100.0 * pEngineChannel->pInstrument->PitchbendRange); + PitchBend = RTMath::CentsToFreqRatio(itEvent->Param.Pitch.Pitch * PitchBendRange); } void Voice::processCutoffEvent(RTList::Iterator& itEvent) {