Added freeze pitch and volume controls
This commit is contained in:
michalcourson
2025-11-05 19:17:34 -05:00
parent f4a0b995ba
commit e89620df27
7 changed files with 34 additions and 2 deletions

View File

@ -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;
}