summaryrefslogtreecommitdiffstats
path: root/src/synth_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth_engine.c')
-rw-r--r--src/synth_engine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/synth_engine.c b/src/synth_engine.c
index b47d510..15dda16 100644
--- a/src/synth_engine.c
+++ b/src/synth_engine.c
@@ -464,6 +464,10 @@ init_synth(synth_t * synth)
CC(synth->cc_lfo_freq, "lfo_freq", 1, 1000, 2, 1);
CC(synth->cc_lfo_amp, "lfo_amp", 0, 1, .01, 0);
CC(synth->cc_pitch, "pitch", -3, 4, 0.01, 1);
+ CC(synth->cc_adsr_a, "attack", 0, 3, 0.05, 0.00);
+ CC(synth->cc_adsr_d, "decay", 0, 2, 0.05, 0.3);
+ CC(synth->cc_adsr_s, "sustain", 0, 1.0f, 0.05f, 0.7f);
+ CC(synth->cc_adsr_r, "release", 0, 5, 0.05f, 0.2f);
synth->modi = 0;
@@ -481,7 +485,7 @@ init_synth(synth_t * synth)
synth->lfo.amp = 0.0f;
synth->lfo.elapsed = 0;
- for (int i =0; i<MIDI_NOTES; i++) {
+ for (int i = 0; i < MIDI_NOTES; i++) {
synth->midi_note[i].freq = 0;
synth->midi_note[i].channel = -1;
synth->midi_note[i].noteOn = -1;
@@ -529,6 +533,7 @@ init_synth(synth_t * synth)
init_sound(synth, sound_gen);
synth->osctri = make_tri("triangle");
+
}
void