summaryrefslogtreecommitdiffstats
path: root/src/synth_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth_gui.c')
-rw-r--r--src/synth_gui.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/synth_gui.c b/src/synth_gui.c
index db37bf7..4cdf37d 100644
--- a/src/synth_gui.c
+++ b/src/synth_gui.c
@@ -1234,6 +1234,15 @@ draw_main(synth_t *synth)
draw_cc_circle(&synth->cc_f_adsr_r, 30 + (30 + foffset) * fb++, 260, 30, 30);
draw_cc_hbar(&synth->cc_cutoff, 30, 300, 256, 24);
+ synth->lfo_on_cutoff = GuiCheckBox((Rectangle){30 + 256 + 6, 300, 12, 24},
+ "lfo", synth->lfo_on_cutoff);
+ if (synth->lfo_on_cutoff) {
+ float cutoff = synth->cc_cutoff.target;
+ cutoff = cutoff + 22000 * synth->cc_lfo_amp.target * osc_sin(synth->lfo_index);
+ if (cutoff <= 0) cutoff = 0.001;
+
+ generic_hbar(cutoff, 50, synth->cc_cutoff.min, synth->cc_cutoff.max, 30, 300, 256, 24);
+ }
draw_cc_vbar(&synth->cc_resonance, 330, 20, 24, 256);
//draw_cc_vbar(&synth->cc_adsr_s, 30, 250, 30, 30);