From c8cd7f9298de876f2046fddd2e322a63c421a505 Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 7 Jul 2023 01:09:12 +0300 Subject: suppa --- src/synth_engine.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/synth_engine.h') diff --git a/src/synth_engine.h b/src/synth_engine.h index a1f3d4a..38ff740 100644 --- a/src/synth_engine.h +++ b/src/synth_engine.h @@ -6,21 +6,12 @@ #include #include +#include "synth_common.h" #include "notes.h" #include "filter.h" #include "adsr.h" #include "control.h" -//#define SAMPLE_RATE (44100) -#define SAMPLE_RATE (48000) -#define FRAMES_PER_BUFFER (256) - -#define VIZ_BUF 1024 - -#define WIDTH 1024 -#define HEIGHT 600 - -#define MIDI_NOTES 128 #ifndef M_PI #define M_PI (3.14159265) @@ -38,8 +29,10 @@ typedef struct midi_note_t { PaTime noteOn; PaTime noteOff; float velocity; // normalized - size_t wvt_index; + float wvt_index; + float lfo_index; unsigned long long elapsed; + unsigned long long noteOffSample; adsr_t * adsr; int active; } midi_note_t; @@ -60,6 +53,7 @@ typedef struct { cc_t cc_cutoff; cc_t cc_resonance; cc_t cc_lfo_freq; + cc_t cc_lfo_amp; float freq_offset; float gain; @@ -81,7 +75,7 @@ typedef struct { int modifiers[16]; int modi; - float (*gen[4]) (float freq, midi_note_t * midi_note, float x, unsigned int sample_rate); + float (*gen[7]) (float freq, midi_note_t * midi_note, float x, unsigned int sample_rate); int geni; float cutoff; -- cgit v1.2.3