You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.0 KiB
65 lines
1.0 KiB
#ifndef SYNTH_SHED_H
|
|
#define SYNTH_SHED_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
// Types (as forward declarations)
|
|
// != 0 means ERR
|
|
typedef int SYNTH_STATUS;
|
|
typedef struct _synth synth_t;
|
|
typedef synth_t synth;
|
|
|
|
// Enums
|
|
typedef enum _filtertype {
|
|
HPF,
|
|
LPF,
|
|
BPF
|
|
} filtertype_t;
|
|
|
|
typedef enum _tech {
|
|
ANALOG,
|
|
DIGITAL
|
|
} tech_t;
|
|
|
|
// Structs
|
|
typedef struct _filter {
|
|
tech_t technology;
|
|
filtertype_t type;
|
|
} filter_t;
|
|
|
|
struct _synth {
|
|
const char* model_name;
|
|
int osc_count;
|
|
tech_t technolgy;
|
|
filter_t filter;
|
|
};
|
|
|
|
|
|
// Functions
|
|
void init_synth_shed();
|
|
|
|
synth_t* synth_create(const char* name);
|
|
|
|
SYNTH_STATUS synth_set_osc_count(synth_t* synth, int osc_count);
|
|
|
|
//SYNTH_STATUS synth_set_filter(synth_t* synth,
|
|
// filter_t* filt);
|
|
//
|
|
//SYNTH_STATUS synth_set_tech(synth_t* synth,
|
|
// tech_t tech);
|
|
|
|
const char* tech_to_string(const tech_t* tech);
|
|
|
|
const char* filtertype_to_string(const filtertype_t* filt);
|
|
|
|
|
|
const char* play_synth(synth_t* synth);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif //SYNTH_SHED_H
|
|
|