#ifndef NOTE_H #define NOTE_H #include #include typedef enum { WAVE_NONE, WAVE_SINE, WAVE_SQUARE, WAVE_SAW, WAVE_TRIANGLE } Waveform; typedef struct { uint8_t id; float phase; float freq; float gain; float attack_ms; float release_ms; bool is_playing; Waveform form; } Note; void play_note(Note *note, float *buffer, unsigned int buffer_size, float sample_rate); #endif // NOTE_H