2022-07-10 11:32:21 -05:00
|
|
|
#ifndef MUSIC_H
|
|
|
|
#define MUSIC_H
|
|
|
|
|
|
|
|
#include "tsf.h"
|
|
|
|
#include "tml.h"
|
2023-11-27 14:29:55 -06:00
|
|
|
#include "dsp.h"
|
2022-07-10 11:32:21 -05:00
|
|
|
|
|
|
|
struct dsp_midi_song {
|
2023-11-27 14:29:55 -06:00
|
|
|
float bpm;
|
|
|
|
double time;
|
|
|
|
tml_message *midi;
|
|
|
|
tsf *sf;
|
2022-07-10 11:32:21 -05:00
|
|
|
};
|
|
|
|
|
2023-11-27 14:29:55 -06:00
|
|
|
dsp_node *dsp_midi(const char *midi, tsf *sf);
|
|
|
|
tsf *make_soundfont(const char *sf);
|
2022-07-10 11:32:21 -05:00
|
|
|
void play_song(const char *midi, const char *sf);
|
|
|
|
void dsp_midi_fillbuf(struct dsp_midi_song *song, void *out, int n);
|
|
|
|
|
2022-11-25 07:12:31 -06:00
|
|
|
#endif
|