fbpx
Skip to main content

MIDI Forum

SMF time signature ...
 
Notifications
Clear all

SMF time signature confusion.

4 Posts
2 Users
0 Reactions
20 K Views
Matthew Sitton
Posts: 3
Active Member
Topic starter
 

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:
[code type=markup]FF 58 04 nn dd cc bb[/code]

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.

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).

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.

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.

Finally an example is given which is a compound 6/8 time signature. This helps tremendously but it is still not enough information.

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):
[code type=markup]FF 58 04 06 03 24 08[/code]
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.

So if anyone has any insights, better/more examples of other complex time signatures that would be great.

 
Posted : 11/11/2016 5:26 pm
Bavi_H
Posts: 267
Reputable Member
 

Here is my understanding:

A "MIDI quarter note" is 24 MIDI clocks. ("MIDI clocks" are small MIDI messages sent at a steady rate that help indicate the current tempo to other MIDI devices.)

A "notated quarter note" is presumably how your MIDI software displays quarter notes on the screen.

In a Time Signature event, the bb value supposedly lets you change the relationship between a "MIDI quarter note" and a "notated quarter note". However, in the MIDI software I have used, my tests changing the bb value had no effect on how the software displayed quarter notes. And in every MIDI file I have encountered, the bb value is always set as 8 indicating a "MIDI quarter note" and a "notated quarter note" are the same.

Does the MIDI Manufacturers Association or any other users here know of any MIDI software that uses the Time Signature bb value in any way?

If you were to set the bb value to something other than 8, then you have to carefully understand which items are defined in terms of "MIDI quarter notes" and which items are defined in terms of "notated quarter notes":

Tempo meta event: The specification says "Another way of putting 'microseconds per quarter note' is '24ths of a microsecond per MIDI clock'", indicating the tempo meta event value is defined in terms of "MIDI quarter notes".

Time signature denominator: The specification says "nn and dd represent the numerator and denominator of the time signature as it would be notated", suggesting the time signature denominator is defined in terms of "notated quarter notes".

Ticks per quarter note: When the quarter-note based division is used, is the "division" value in the header in terms of "MIDI quarter notes" or "notated quarter notes"? I guess it's "MIDI quarter notes", but the specification only says "ticks per quarter note".

As you can see, I have also wondered about the exact meaning and usage of the Time Signature bb value, but since I haven't found software that uses the bb value for anything, and the specification could be clearer about which items are defined in terms of "MIDI quarter notes" or "notated quarter notes", my current suggestion is to always set the bb value to 8 to specify "MIDI quarter notes" and "notated quarter notes" are the same.

In a Time Signature event, the cc value is intended to let you change the duration between metronome clicks. For example, if you use a 6/8 time signature, instead of each measure consisting of six metronome clicks, you might want each measure to consist of two metronome clicks (one click every three eighth notes). To specify that, you could set the cc value to decimal 36 (hex 24) and the bb value to 8.

However, in the recent MIDI software I have used, my tests changing the cc value had no effect on the metronome clicks. Most software always clicks the metronome nn (the time signature numerator) times per measure.

The last time I tested Synthesia, it ignored the Time Signature cc value, but did have special metronome behavior for the 6/8 time signature. As I remember, the default "1x" metronome setting clicked two times per 6/8 measure, and the "2x" metronome setting clicked six times per 6/8 measure. This is a reasonable default that I really like, but it doesn't matter what you set the Time Signature cc value to.

I might dig up some of the older MIDI software I have used and test it. I think I remember using sequencer software like Cakewalk and Voyetra Music Write 2000 that let me specify two metronome clicks per measure for 6/8 measures, but I can't remember if it saved and read the MIDI file Time Signature cc value to do that or if it was only saved in its own file format.

Does the MIDI Manufacturers Association or any other users here know of any MIDI software that uses the Time Signature cc value in any way?

Here's another thing I've thought about in regards to the cc value: Should the metronome clicks always align evenly with measures? What if the cc value indicates metronome clicks that don't evenly fit into a measure? For example, in a 6/8 time signature, if cc was set to decimal 37 (hex 25), should the metronome really click at a slightly longer duration than the notes?

If I wrote a MIDI sequencer I would probably only obey the cc value if: A. an integer number of metronome clicks fits into a time signature denominator note value, or B. an integer number of time signature denominator note values fits into a metronome click and an integer number of metronome clicks fits into a measure.

 
Posted : 12/11/2016 12:56 am
Matthew Sitton
Posts: 3
Active Member
Topic starter
 

Thanks, you pointed out one thing i hadn't really noticed before about the tempo meta events being related to midi clocks in some way..

Observations:
In sheet music generally the tempo will sometimes be explicitly defined as a note value for example: quarter note at 120 BPM or a dotted quarter note at 120BPM(6/8 compound)

This shows some relationships more explicitly from one of the examples later on in the spec"
"4 bytes: 4/4 time, 24 MIDI clocks/click, 8 32nd notes/24 MIDI clocks"

So this isn't exactly a direct reply to your message, but more thoughts about ways i can see interpreting the text.

One thing i think that is the source of most of the confusion "MIDI clocks in a metronome click"
This is actually the only time it really refers to any metronome.

So is a "metronome click" (by default without touching the last 2 ts values) a midi quarter note, or is it defined as the "notated" time signature denominator. To me it seems to make most sense as being the midi quarter-note because it relates more to the sheet music observation above. Then you would have some modifier(one of the last two TS values) to change the metronome click to be a different note length else: dotted quarter, 8th, 16th, half note, etc.

The problem with that nice picture is how do you then relate that "metronome click" back to the tempo. Tempo is defined as basically time per quarter-note so that means the above wouldn't actually be changing that note-length for which its defined as. However we could still scale it up or down so with 6/8 36 8 you could scale up the time based on divisions of a quarter note this would be effectively changing the emphases of beats. But in cases such as compound 6/8 the time signature doesn't just change emphases and have bpm in quarter notes, it will generally define bpm as being per dotted quarter.

So does this mean that with "number of notated 32nd-notes in a MIDI quarter-note" bb is actually changing the type of notated note length that the length of time from the tempo is representing?

I've looked into the source of a lot of open source midi using applications and as far as i can tell they almost all just ignore the two values...

 
Posted : 12/11/2016 12:48 pm
Matthew Sitton
Posts: 3
Active Member
Topic starter
 

And also something i forgot to mention regarding this:

So does this mean that with "number of notated 32nd-notes in a MIDI quarter-note" bb is actually changing the type of notated note length that the length of time from the tempo is representing?

If that is true then that could give us 2 different but useful values:
cc for changing the emphasis of beats within the tempo
bb for changing what the note period that tempo defines (midi quarter-note) into another note value.

 
Posted : 12/11/2016 12:54 pm
Share: