summaryrefslogtreecommitdiffstats
path: root/src/synth_gui.c
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2025-11-27 18:33:13 +0200
committergrm <grm@eyesin.space>2025-11-27 18:33:13 +0200
commit5f3058f662b7222ea47a49ea2a450aa0491b5496 (patch)
tree84d43f105a2601b36326bc33d8fe5468a21d5100 /src/synth_gui.c
parent7828597e5f159010c168f9fe366828825fc75205 (diff)
downloadsynth-project-5f3058f662b7222ea47a49ea2a450aa0491b5496.tar.gz
synth-project-5f3058f662b7222ea47a49ea2a450aa0491b5496.tar.bz2
synth-project-5f3058f662b7222ea47a49ea2a450aa0491b5496.zip
feat: add global lfo index and viz for cutoff lfoHEADmaster
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);