chikitin
chikitin

Reputation: 781

Time Signature Meta Message in MIDI

I am working on a MIDI project using mido library in Python. I see in the manual a meta message for time signature with value: notated_32nd_notes_per_beat which has a default value of 8.

<meta message time_signature numerator=4 denominator=4 clocks_per_click=24 notated_32nd_notes_per_beat=8 time=0>

Which makes sense. However, can I define it like:

<meta message time_signature numerator=4 denominator=4 clocks_per_click=24 notated_32nd_notes_per_beat=32 time=0>

Does this increase the display resolution when shown in a score/typesetting software? What is the usage of this please?

time_signature (0x58) meta message in midi files

Upvotes: 2

Views: 1440

Answers (1)

CL.
CL.

Reputation: 180240

The file header specifies the number of ticks per beat, and the tempo messages specify the length of a beat, in microseconds. These value are needed to correctly play back the file.

The last field of the time signature message specifies how the tick values in the MIDI file relates to notes in a score. It does not affect at what time events are sent (so a pure playback program will ignore this message), but how notes are displayed.

For example, if the header says there are 100 ticks per beat, and the time signature has the default of 8 32th notes per beat, then a note-on/note-off pair with a distance of 100 ticks is displayed as a quarter note. If you change the time signature to 32 32th notes per beat, then a length of 100 ticks corresponds to a whole note.

Upvotes: 2

Related Questions