summaryrefslogtreecommitdiff
path: root/spec/midi.fspec
diff options
context:
space:
mode:
Diffstat (limited to 'spec/midi.fspec')
-rw-r--r--spec/midi.fspec14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/midi.fspec b/spec/midi.fspec
new file mode 100644
index 0000000..2c46944
--- /dev/null
+++ b/spec/midi.fspec
@@ -0,0 +1,14 @@
+struct midi_track {
+ u8 type[4] | matches('MTrk') str;
+ u32 length;
+ u8 data[length];
+};
+
+struct midi {
+ u8 type[4] | matches('MThd') str;
+ u32 length | matches(6);
+ u16 format;
+ u16 track_count;
+ u16 division;
+ struct midi_track tracks[track_count];
+};