Wim Taymans
3b1fc4acce
midifile: put some parsed data in the event
...
Put some of the data we parsed into the event.
2020-03-01 20:37:50 +01:00
Wim Taymans
2982b9511e
pw-cat: simplify midi reading and writing
2020-02-28 20:35:28 +01:00
Wim Taymans
a3582f0e0f
pw-cat: add midi recording
2020-02-27 15:37:12 +01:00
Wim Taymans
b7dbf4bbc1
pw-cat: rework midifile a little
...
Move the code to read and write midi into the midifile helper
and simplify things a bit.
2020-02-27 12:42:21 +01:00
Wim Taymans
9bec2e5d8a
pw-cat: improve midi errors
...
EINVAL for invalid events and file
ENOENT for unknown event
2020-02-24 10:20:33 +01:00
Wim Taymans
8b874a9514
pw-cat: handle midi EOF better
...
Return 0 when there are no more events, 1 when we have an event and
< 0 for errors. Use this to correctly push the last set of events on
EOS and then return 0 and stop without an error.
2020-02-21 11:19:35 +01:00
Wim Taymans
cc1ed84f9f
midi: simplify some things
2020-02-19 10:48:16 +01:00
Wim Taymans
ddcb08a98a
pw-cat: read midi file from memory
...
mmap the midi file and read from memory. Simplifies some things and
allows us to potentially parse from the RT thread later.
2020-02-19 09:58:47 +01:00
Wim Taymans
b6a6d1f0bb
pw-cat: fix tempo changes
...
Use time in seconds as event timestamp.
Apply tempo from the new events, keep track of elapsed time and
time since tempo change to get the right time.
Skip metadata midi in pw-cat.
2020-02-18 16:13:35 +01:00
Wim Taymans
fe616e38d8
pw-cat: add midi support
2020-02-18 13:38:26 +01:00