From 5f3058f662b7222ea47a49ea2a450aa0491b5496 Mon Sep 17 00:00:00 2001 From: grm Date: Thu, 27 Nov 2025 18:33:13 +0200 Subject: feat: add global lfo index and viz for cutoff lfo --- src/synth_gui.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/synth_gui.c') 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); -- cgit v1.2.3