summaryrefslogtreecommitdiff
path: root/synth/programs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'synth/programs.cpp')
-rw-r--r--synth/programs.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/synth/programs.cpp b/synth/programs.cpp
index b896a06..cfbd9a1 100644
--- a/synth/programs.cpp
+++ b/synth/programs.cpp
@@ -174,6 +174,13 @@ void program_t::set_param(const parameter_t &p, fixed_t v) //ACHTUNG:
case FILTER_TREM_LFO: filter_settings.trem_lfo=v; break;
case SYNC_FACTOR: sync_factor=v; break;
+
+ case FREQ_ATTACK: osc_settings[p.osc].freq_env.attack=v*samp_rate >>SCALE; break;
+ case FREQ_DECAY: osc_settings[p.osc].freq_env.decay=v*samp_rate >>SCALE; break;
+ case FREQ_SUSTAIN: osc_settings[p.osc].freq_env.sustain=v; break;
+ case FREQ_RELEASE: osc_settings[p.osc].freq_env.release=v*samp_rate >>SCALE; break;
+ case FREQ_HOLD: osc_settings[p.osc].freq_env.hold=(v!=0); break;
+ case FREQ_ENV_AMOUNT: osc_settings[p.osc].freq_env_amount=double(v)/ONE; break;
default: throw string("trying to set an unknown parameter");
}