summaryrefslogtreecommitdiff
path: root/synth/programs.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-15 15:27:38 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-15 15:27:38 +0100
commit550497e9b09894a79c1c9888901bbbf4949a614b (patch)
tree22a1b1f5eac70051eb8336312569ad07c512cc82 /synth/programs.h
parent9e3998bbaddf4eb6df8544497e42231137824998 (diff)
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
Diffstat (limited to 'synth/programs.h')
-rw-r--r--synth/programs.h28
1 files changed, 18 insertions, 10 deletions
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;