diff options
Diffstat (limited to 'src/generator.h')
| -rw-r--r-- | src/generator.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/generator.h b/src/generator.h index df90578..72d10ca 100644 --- a/src/generator.h +++ b/src/generator.h @@ -15,7 +15,7 @@ enum osc_enum { SQR }; -enum adsr_type { +enum adsr_enum { LINEAR, CUBIC }; @@ -43,7 +43,7 @@ typedef struct sound_node { int n; } sound_node; -struct generator { +typedef struct generator { // list of indexes for oscilators, lfos and adsrs float osc[MAX_CMP]; float lfo[MAX_CMP]; @@ -58,12 +58,14 @@ struct generator { //o0-saw:l0-sin:l1-sin:a0-linear //a0-o0/frequency:l0-o0/frequency:l1-l0/frequency:o0-1 -}; +} generator; int sound_tree_add_node(sound_node * root, const char * cmp); // needs to "play" the wiring defined in the struct // using sounds from `s` and the midi note `i` -float generate(generator * g, synth_t * s, int i); +float generate(generator * g, synth_t * s, int i, sound_node * root); + +int load_preset(sound_node * tree, const char * path); #endif /* GENERATOR_H */ |
