I am trying to understand the structure of the Set Tempo command FF 51 03 tttttt.
My reference is The Complete MIDI 1.0 Detailed Specification version 96.1.
On page 141/142, there is an example of a tempo of 500000 microseconds/quarter being represented by the following bytes: 07 A1 20.
However, A1 has the following bit pattern: 10100001. The most significant bit is set to 1.
On page 38, it describes data bytes as having 8 bits with the most significant bit set to binary 0 and on page 130, it describes data as being nibble-ized and 7-bit-ized.
I would be grateful if this apparent anomaly could be clarified as I am developing a Java program in which I need to know if I should be treating 7 or 8 bits of these bytes as data.
The parameter number (tttttt) is a 24 bit unsigned integer, in big endian format.
"Set tempo" is a meta-event, belonging to the SMF specification. It applies only to Standard MIDI Files, and like the other meta-events are not supposed to be transmitted over the wires on real time. On the other hand, the Data Byte description that is confusing you applies to the over-the-wire protocol.
Pedro,
Many thanks for your quick response.