I need to handle time signatures properly in my application, and have been trying to figure out for quite some time what the implications of the wording of the spec are and have yet to really figure anything useful out.
so the spec lists this to define what the meta event is:
<pre class="line-numbers"><code class="language-markup">FF 58 04 nn dd cc bb</code></pre>
I understand what nn and dd are for totally. However cc and bb are what I cannot understand. Even looking out into other source code for other midi parsers and software I have yet to find anything useful.
<blockquote>The cc parameter expresses the number of MIDI clocks in a metronome click. The bb parameter expresses the number of notated 32nd-notes in what MIDI thinks of as a quarter-note (24 MIDI Clocks). </blockquote>
That is what the spec explicity stays about the two bytes yet they are pretty vauge.
Then a reason is given for adding bb which still isn't very useful.
<blockquote>This was added because there are already multiple programs which allow the user to specify that what MIDI thinks of as a quarter-note (24 clocks) is to be notated as, or related to in terms of, something else.</blockquote>
Finally an example is given which is a compound 6/8 time signature. This helps tremendously but it is still not enough information.
<blockquote>Therefore, the complete event for 6/8 time, where the metronome clicks every three eighth-notes, but there are 24 clocks per quarter-note, 72 to the bar, would be (in hex):
<pre class="line-numbers"><code class="language-markup">FF 58 04 06 03 24 08</code></pre>
That is, 6/8 time (8 is 2 to the 3rd power, so this is 06 03), 36 MIDI clocks per dottedquarter(24 hex!), and eight notated 32nd-notes per MIDI quarter note.</blockquote>
So if anyone has any insights, better/more examples of other complex time signatures that would be great.