summaryrefslogtreecommitdiffstats
path: root/src/synth_engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth_engine.h')
-rw-r--r--src/synth_engine.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/synth_engine.h b/src/synth_engine.h
index 3b0b238..5ff7d8d 100644
--- a/src/synth_engine.h
+++ b/src/synth_engine.h
@@ -64,6 +64,8 @@ typedef struct {
int tmp_index;
} synth_viz;
+struct midi_t;
+
typedef struct {
PaStream *stream;
@@ -71,7 +73,7 @@ typedef struct {
cc_t * ccs[128];
int cci;
-
+
cc_t cc_pitch;
cc_t cc_cutoff;
cc_t cc_resonance;
@@ -83,7 +85,15 @@ typedef struct {
cc_t cc_adsr_s;
cc_t cc_adsr_r;
cc_t cc_gain;
-
+
+ cc_t cc_f_adsr_a;
+ cc_t cc_f_adsr_peak;
+ cc_t cc_f_adsr_d;
+ cc_t cc_f_adsr_s;
+ cc_t cc_f_adsr_r;
+
+ int autogain;
+
float x;
midi_note_t midi_note[MIDI_NOTES];
@@ -91,6 +101,7 @@ typedef struct {
int midi_active_n;
adsr_t adsr;
+ adsr_t f_adsr;
lfo_t lfo;
@@ -102,8 +113,12 @@ typedef struct {
cc_t cc_del_time;
cc_t cc_del_feedback;
unsigned long long counter;
-
+
+ int f_adsr_enabled;
int filter;
+ int biquad;
+ char biquad_type;
+
int clamp;
int modifiers[16];
@@ -117,11 +132,21 @@ typedef struct {
int active;
int sound_active;
-
+
+ int soundcard_id;
+ int midi_device_id;
+
synth_viz viz;
+
+ struct midi_t * midi;
} synth_t;
synth_t * init_synth();
-void free_synth(synth_t * synth);
+void free_synth(synth_t *synth);
+void change_soundcard(synth_t *synth);
+void change_midi_device(synth_t *synth);
+
+int save_synth(synth_t *synth, const char *path);
+int load_synth(synth_t *synth, const char *path);
#endif /* SYNTH_ENGINE_H */