diff --git a/state.h b/state.h new file mode 100644 index 0000000..0c61d80 --- /dev/null +++ b/state.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include "vco.h" + +typedef struct { + float clock_bpm; + float vco_freq; + vco_mode_t vco_mode; + float vco_volume; + bool quant_enabled; + float filter_freq; + float filter_resonance; + float env1_attack; + float env1_release; + float env2_attack; + float env2_release; + float reverb_amount; + bool amen_enabled; +} state_t; + +extern state_t state; + diff --git a/vco.c b/vco.c new file mode 100644 index 0000000..1235a89 --- /dev/null +++ b/vco.c @@ -0,0 +1,4 @@ +float phase = 0.0f; + +float vco(void); + diff --git a/vco.h b/vco.h new file mode 100644 index 0000000..1670bcc --- /dev/null +++ b/vco.h @@ -0,0 +1,11 @@ +#pragma once + +typedef enum { + VCO_SINE = 0, + VCO_SQUARE = 1, + VCO_TRIANGLE = 2, + VCO_SAW = 3, +} vco_mode_t; + +float vco(void); +