shithub: neindaw

ref: 6ea764ff9cc93aab462e4a7db6796d149175e5d2
dir: /piper/piper.h/

View raw version
typedef struct Cmd Cmd;
typedef struct Synth Synth;

enum {
	CmdNote,
	CmdVol,
	CmdRaw,
};

struct Cmd {
	int type;
	union {
		struct {
			float freq;
			float dur;
			float vel;
		}note[3];
		char *raw;
		float vol;
	};
	int numnotes;
};

struct Synth {
	char *name;
	int (*cmd)(void *aux, Cmd *c);
	void *(*alloc)(char *path);
};

extern Synth ay_3_8910;
extern Synth kick_drum;
extern Synth piano;