From 51821bb2e9b67fc70486a4ee8dcbc88971adc3b6 Mon Sep 17 00:00:00 2001 From: gramanas Date: Thu, 14 Sep 2023 14:37:13 +0300 Subject: More cleanup --- src/midi.c | 3 +-- src/synth_engine.c | 3 --- src/synth_engine.h | 4 ---- src/synth_gui.c | 12 ------------ 4 files changed, 1 insertion(+), 21 deletions(-) (limited to 'src') diff --git a/src/midi.c b/src/midi.c index b53f365..c01b803 100644 --- a/src/midi.c +++ b/src/midi.c @@ -53,7 +53,7 @@ void midi_decode(uint32_t msg, synth_t * synth) { break; case 4: cc_step(&synth->cc_cutoff, x); - synth->cutoff = synth->cutoff + (x * (10 * log10(synth->cutoff))); + //synth->cutoff = synth->cutoff + (x * (10 * log10(synth->cutoff))); break; case 5: cc_step(&synth->cc_resonance, x); @@ -71,7 +71,6 @@ void midi_decode(uint32_t msg, synth_t * synth) { synth->filter = x - 1; break; case 29: - synth->multi = x - 1; break; default: } diff --git a/src/synth_engine.c b/src/synth_engine.c index 5c15565..517f9d8 100644 --- a/src/synth_engine.c +++ b/src/synth_engine.c @@ -465,10 +465,7 @@ init_synth(synth_t * synth) synth->del_feedback = 0.5f; synth->counter; - synth->poly = 0; - synth->multi = 0; synth->filter = 1; - synth->cutoff = 22000.0f; synth->clamp = 1; synth->gen[0] = gen0; diff --git a/src/synth_engine.h b/src/synth_engine.h index b3b16d6..aee38d9 100644 --- a/src/synth_engine.h +++ b/src/synth_engine.h @@ -75,8 +75,6 @@ typedef struct { float del_feedback; unsigned long long counter; - int poly; - int multi; int filter; int clamp; @@ -86,8 +84,6 @@ typedef struct { float (*gen[7]) (float freq, midi_note_t * midi_note, float x, unsigned int sample_rate); int geni; - float cutoff; - BWLowPass* fff; BWBandStop* fff2; diff --git a/src/synth_gui.c b/src/synth_gui.c index 35c940a..ed10547 100644 --- a/src/synth_gui.c +++ b/src/synth_gui.c @@ -166,14 +166,6 @@ draw_bars(synth_t * synth, int x, int y, int width, int height, int offset) synth->adsr.s = GuiSlider((Rectangle){ x, y + count++ * (height + offset), width, height }, "S: ", buf, synth->adsr.s , 0.0f, 1.0f); snprintf(buf, sizeof buf, "%.3f", synth->adsr.r); synth->adsr.r = GuiSlider((Rectangle){ x, y + count++ * (height + offset), width, height }, "R: ", buf, synth->adsr.r , 0.001f, 3.0f); - snprintf(buf, sizeof buf, "%.3f", synth->cutoff); - synth->cutoff = GuiSliderBar((Rectangle){ x, y + count++ * (height + offset), width, height }, "fC: ", buf, synth->cutoff , 0.0f, 11000.0f); - /* snprintf(buf, sizeof buf, "%.3f", synth->resonance); */ - /* synth->resonance = GuiSliderBar((Rectangle){ x, y + count++ * (height + offset), width, height }, "fR: ", buf, synth->resonance , 0.001f, 5.0f); */ - snprintf(buf, sizeof buf, "%.3f", synth->lfo.freq); - synth->lfo.freq = GuiSliderBar((Rectangle){ x, y + count++ * (height + offset), width, height }, "lfo freq: ", buf, synth->lfo.freq , 0.001f, 10.0f); - snprintf(buf, sizeof buf, "%.3f", synth->lfo.amp); - synth->lfo.amp = GuiSliderBar((Rectangle){ x, y + count++ * (height + offset), width, height }, "lfo amp: ", buf, synth->lfo.amp , 0.0f, 0.93f); snprintf(buf, sizeof buf, "%.3f", synth->gain); synth->gain = GuiSlider((Rectangle){ x, y + count++ * (height + offset), width, height }, "gain: ", buf, synth->gain , 0.0f, 2.0f); snprintf(buf, sizeof buf, "%.3f", synth->del_feedback); @@ -245,10 +237,6 @@ rayrun(void *synthData){ mouse(synth, synth->stream); int prec = 100000; - if (IsKeyPressed(KEY_ENTER)) { - synth->multi = !synth->multi; - } - // Draw //---------------------------------------------------------------------------------- BeginDrawing(); -- cgit v1.2.3