From 67025394dcbc2d0917c89856c40be3b9198eca5e Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sat, 15 Jan 2011 18:13:48 +0100 Subject: Implemented freq-envelopes for non-compiled notes plus some tiny bugfixes: - in Envelope (get_sustain now returns orig_sustain) - parser now uses isnum instead of isfloat where appropriate --- synth/programs.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'synth/programs.h') diff --git a/synth/programs.h b/synth/programs.h index 1ed9d6f..3ca4a65 100644 --- a/synth/programs.h +++ b/synth/programs.h @@ -48,7 +48,12 @@ enum parameter_enum FILTER_TREMOLO, FILTER_TREM_LFO, SYNC_FACTOR, - + FREQ_ATTACK, + FREQ_DECAY, + FREQ_SUSTAIN, + FREQ_RELEASE, + FREQ_HOLD, + FREQ_ENV_AMOUNT, PARAMETER_N_ENTRIES, UNKNOWN=-1 @@ -75,6 +80,7 @@ struct pfactor_formula_t { param_factor_t **fm; param_factor_t *out; + param_factor_t *freq_env_amount; param_factor_t filter_env; param_factor_t filter_res; param_factor_t filter_offset; @@ -84,6 +90,7 @@ struct pfactor_value_t { fixed_t **fm; fixed_t *out; + fixed_t *freq_env_amount; fixed_t filter_env; fixed_t filter_res; fixed_t filter_offset; @@ -113,12 +120,24 @@ struct custom_wave_t }; +struct env_settings_t +{ + jack_nframes_t attack; + jack_nframes_t decay; + fixed_t sustain; + signed int release; + bool hold; +}; + struct oscillator_t { fixed_t *fm_strength; //this osc gets modulated by osc #i by fm_strength[i]. fixed_t output; //NOT: osc #i gets modulated by this osc! int waveform; fixed_t factor; + float freq_env_amount; + env_settings_t freq_env; + fixed_t phase; fixed_t tremolo_depth; @@ -139,15 +158,6 @@ struct oscillator_t oscillator_t& operator=(const oscillator_t &that); }; -struct env_settings_t -{ - jack_nframes_t attack; - jack_nframes_t decay; - fixed_t sustain; - signed int release; - bool hold; -}; - struct filter_params_t { bool enabled; -- cgit v1.2.3