midifile: add support for UMP

Add a type to the events, which can be MIDI1 or UMP.

Add debug functions for UMP messages.

midifile only supports saving MIDI1 format files for now. It will convert
to MIDI1 when asked to write an UMP message.

In pw-cat, convert the MIDI1 messages to UMP before sending into the
graph.
This commit is contained in:
Wim Taymans 2024-07-26 15:21:08 +02:00
parent d9e7a10b0d
commit d057c95b2b
4 changed files with 269 additions and 12 deletions

View file

@ -9,6 +9,9 @@
struct midi_file;
struct midi_event {
#define MIDI_EVENT_TYPE_MIDI1 0
#define MIDI_EVENT_TYPE_UMP 1
uint32_t type;
uint32_t track;
double sec;
uint8_t *data;