On Mon, 2006-07-24 at 16:38 -0400, Lee Revell wrote:
I've never been a MIDI expert but I'm now
having to learn. I have a
question about this excerpt of a MIDI file viewed with hexedit.
00001BB0 22 80 3D 35 31 80 3A 39 0E 80 37 31 03 80 31 1F ".=51.:9..71..1.
00001BC0 81 0C 90 30 5B 00 90 3C 79 81 70 90 39 73 00 90 ...0[..<y.p.9s..
00001BD0 36 69 4B 80 36 43 0A 80 3C 26 01 80 30 44 0A 80 6iK.6C..<&..0D..
00001BE0 39 42 82 08 90 37 63 00 90 43 7B 81 70 90 3E 5E 9B...7c..C{.p.>^
00001BF0 00 90 3A 66 08 80 37 30 02 80 43 32 31 80 3E 11 ..:f..70..C21.>
Take the sequence "80 3D 35 31 80 3A 39 0E 80 37 31 03 80 31 1F" in
the first line for example. I know that 0x80 is note-off, and 0x3D are
note number and 0x35 the velocity of the note-off. But what the heck is
the next byte, 0x31? The MIDI standard says note-off is one status byte
followed by 2 data bytes!
That's the standard for MIDI that is sent realtime over a wire. When it
is stored in a file you also need some sort of timestamp for each event.
The extra byte is the number of clock ticks to wait before you play the
event (since the last event).
--
Lars Luthman - please encrypt any email sent to me if possible
PGP key:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x04C77E2E
Fingerprint: FCA7 C790 19B9 322D EB7A E1B3 4371 4650 04C7 7E2E