200 |
if (pDimRgn->PitchTrack && (MIDIKey - (int) pDimRgn->UnityNote) < 40) pitchbasecents += (MIDIKey - (int) pDimRgn->UnityNote) * 100; |
if (pDimRgn->PitchTrack && (MIDIKey - (int) pDimRgn->UnityNote) < 40) pitchbasecents += (MIDIKey - (int) pDimRgn->UnityNote) * 100; |
201 |
|
|
202 |
this->PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(pSample->SamplesPerSecond) / double(pEngine->SampleRate)); |
this->PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(pSample->SamplesPerSecond) / double(pEngine->SampleRate)); |
203 |
this->PitchBend = RTMath::CentsToFreqRatio(PitchBend / 8192.0 * 100.0 * pEngineChannel->pInstrument->PitchbendRange); |
this->PitchBendRange = 1.0 / 8192.0 * 100.0 * pEngineChannel->pInstrument->PitchbendRange; |
204 |
|
this->PitchBend = RTMath::CentsToFreqRatio(PitchBend * PitchBendRange); |
205 |
} |
} |
206 |
|
|
207 |
// the length of the decay and release curves are dependent on the velocity |
// the length of the decay and release curves are dependent on the velocity |
747 |
} |
} |
748 |
|
|
749 |
void Voice::processPitchEvent(RTList<Event>::Iterator& itEvent) { |
void Voice::processPitchEvent(RTList<Event>::Iterator& itEvent) { |
750 |
PitchBend = RTMath::CentsToFreqRatio(itEvent->Param.Pitch.Pitch / 8192.0 * 100.0 * pEngineChannel->pInstrument->PitchbendRange); |
PitchBend = RTMath::CentsToFreqRatio(itEvent->Param.Pitch.Pitch * PitchBendRange); |
751 |
} |
} |
752 |
|
|
753 |
void Voice::processCutoffEvent(RTList<Event>::Iterator& itEvent) { |
void Voice::processCutoffEvent(RTList<Event>::Iterator& itEvent) { |