summaryrefslogtreecommitdiffstats
path: root/src/synth_engine.h
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2023-04-20 18:24:49 +0300
committergramanas <anastasis.gramm2@gmail.com>2023-04-20 18:24:49 +0300
commitc161e1016a04566a56b4858ea43502fed88dcc7f (patch)
treeb4b3086f000df6b63229dae6057f1aa253811b30 /src/synth_engine.h
parent1e374b426b4182c7b73b35219aadaca267b9623c (diff)
downloadsynth-project-c161e1016a04566a56b4858ea43502fed88dcc7f.tar.gz
synth-project-c161e1016a04566a56b4858ea43502fed88dcc7f.tar.bz2
synth-project-c161e1016a04566a56b4858ea43502fed88dcc7f.zip
Add midi
Diffstat (limited to 'src/synth_engine.h')
-rw-r--r--src/synth_engine.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/synth_engine.h b/src/synth_engine.h
index 1191892..86cfe1a 100644
--- a/src/synth_engine.h
+++ b/src/synth_engine.h
@@ -40,6 +40,8 @@ typedef struct {
typedef struct {
int sample_rate_divider;
+ float wave[1000200];
+ int wi;
} viz_t;
typedef struct {
@@ -47,10 +49,6 @@ typedef struct {
float gain;
float x;
- int notes_active;
- float freq[100];
- unsigned long long freq_count[100];
-
note_t n;
adsr_t adsr;
@@ -78,6 +76,7 @@ typedef struct {
float adsr_amplitude(void *synthData, unsigned long long elapsed);
float make_sample(unsigned long long phase, void *synthData, unsigned int sample_rate, int viz);
void init_synth(synth_t * synth);
+void free_synth(synth_t * synth);
int sound_gen(const void *inputBuffer, void *outputBuffer,
unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo* timeInfo,