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.
69 lines
1.3 KiB
69 lines
1.3 KiB
#ifndef SYNTH_SHED_H
|
|
#define SYNTH_SHED_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
// Types (as forward declarations)
|
|
typedef struct _synth synth_t;
|
|
typedef synth_t synth;
|
|
|
|
// Enums
|
|
typedef enum _SYNTH_STATUS {
|
|
SYNTH_STATUS_OK,
|
|
SYNTH_STATUS_ERR,
|
|
SYNTH_STATUS_ARG_ERR
|
|
} SYNTH_STATUS;
|
|
|
|
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* brand;
|
|
const char* model;
|
|
int osc_count;
|
|
tech_t technology;
|
|
filter_t filter[3];
|
|
};
|
|
|
|
|
|
// Functions
|
|
void init_synth_shed();
|
|
|
|
SYNTH_STATUS synth_create(synth_t **new_synth, const char *brand, const char *model, int osc_count);
|
|
|
|
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* status_to_string(SYNTH_STATUS status);
|
|
|
|
const char* tech_to_string(const enum _tech* tech);
|
|
|
|
SYNTH_STATUS filtertype_to_string(const filtertype_t* const filt,const char** ftstr);
|
|
|
|
const char* play_synth(synth_t* synth);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif //SYNTH_SHED_H
|
|
|