Initial commit of project.

This commit is contained in:
Anachronaut
2026-03-13 15:09:17 -04:00
commit 48ee8c2c75
7 changed files with 485 additions and 0 deletions

21
include/midi.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef MIDI_H
#define MIDI_H
#define _POSIX_C_SOURCE 200809L
#include <alsa/asoundlib.h>
#include "synth.h"
typedef struct {
snd_seq_t *seq;
int port;
int client;
Synth *synth; // pointer to the synth we'll drive with MIDI events
} MidiState;
int midiInit(MidiState *m, Synth *synth);
void midiListInputs(MidiState *m);
void midiConnect(MidiState *m, int srcClient, int srcPort);
void midiClose(MidiState *m);
void *midiThread(void *arg);
#endif