From 550497e9b09894a79c1c9888901bbbf4949a614b Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sat, 15 Jan 2011 15:27:38 +0100 Subject: Added rudimentary support for freq-envelopes todo: pfactor'ed amount todo: support for 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 | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'synth/programs.h') diff --git a/synth/programs.h b/synth/programs.h index 1ed9d6f..6a24db3 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 @@ -113,12 +118,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 +156,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