From f170fb058a07175e6e753f2a6d20283dc7200a88 Mon Sep 17 00:00:00 2001 From: gramanas Date: Wed, 28 Jun 2023 22:41:03 +0300 Subject: Add wavetable synthesis --- src/midi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/midi.c') diff --git a/src/midi.c b/src/midi.c index d9955d2..8452bcc 100644 --- a/src/midi.c +++ b/src/midi.c @@ -27,6 +27,7 @@ void midi_decode(uint32_t msg, synth_t * synth) { synth->midi_note[data1].velocity = (float)data2 / 127.0; synth->midi_note[data1].elapsed = 0; synth->midi_note[data1].active = 1; + synth->active = 1; break; case 0x0A: printf("Aftertouch: channel=%d, note=%d, pressure=%d\n", channel, data1, data2); @@ -144,7 +145,7 @@ init_midi(midi_t *m, synth_t *synth) void terminate_midi(midi_t *m) { - Pm_Close(m->stream); Pt_Stop(); + Pm_Close(m->stream); Pm_Terminate(); } -- cgit v1.2.3