@ -54,7 +54,7 @@ void ShifterVoice::Release() {
|
||||
|
||||
void ShifterVoice::Process() {
|
||||
current_amplitude = amplitude_envelope_.Process(onoff_);
|
||||
current_period_ = sample_rate_ / mtof(portamento_.Process((float)current_midi));
|
||||
current_period_ = sample_rate_ / mtof(portamento_.Process((float)current_midi + pitch_adjust));
|
||||
period_counter++;
|
||||
overflow_ = period_counter >= current_period_;
|
||||
if (overflow_) {
|
||||
@ -93,4 +93,8 @@ float ShifterVoice::GetPanning(int channel) const {
|
||||
case 1:
|
||||
return panning > .5 ? 1.0 : panning * 2.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void ShifterVoice::SetPitchAdjust(float adj) {
|
||||
pitch_adjust = adj;
|
||||
}
|
||||
Reference in New Issue
Block a user