MIDI Time Signature and BPM

In this guide I'm going to explain how MIDI files keep time. There's quite a lot of information about MIDI time keeping on the internet but I found that usually the sources said the same thing as each other and didn't provide much context. Here I've tried to provide some context of how each of the following numbers would be used in practice.

MIDI Time Signature:

Type: Meta Message value: 255 (0xFF)
Sub Type: Time Signature Message value: 88 (0x58)
Message Format: FF 58 nn dd cc bb
The time signature is important for several reasons. Firstly it's vital to properly notate a piece of music. For MIDI editing software like Finale it's important to be able to retrieve the standard sheet music time signature. The software would need to know the time signature numerator and denominator to lay the music how the author intended i.e. where to put the bar ends.
[nn] Numerator The numerator represents the numerator of the time signature that you would find on traditional sheet music. The numerator counts the number of beats in a measure. For example a numerator of 4 means that each bar contains four beats. This is important to know because usually the first beat of each bar has extra emphasis.
[dd] Denominator The denominator represents the denominator of the time signature that you would find on traditional sheet music. The denominator specifies the number of quarter notes in a beat. A time signature of 4,4 means: 4 beats in the bar and each beat is a quarter note (i.e. a crotchet). In MIDI the denominator value is stored in a special format. i.e. the real denominator = 2^[dd].
[cc] MIDI ticks per metronome click The standard MIDI clock ticks every 24 times every quarter note (crotchet) so a [cc] value of 24 would mean that the metronome clicks once every quarter note. A [cc] value of 6 would mean that the metronome clicks once every 1/8th of a note (quaver). Be warned, this midi clock is different from the clock who's pulses determine the start time and duration of the notes (see PPQN below). This MIDI clock ticks 24 times a second and seems to be used only to specify the rate of the metronome - which I can only assume is a real metronome i.e. a device which makes a tick noise at a steady rate... tick, tick tick...
[bb] 32nd notes per MIDI quarter note This value specifies the number of 1/32nds of a note happen every MIDI quarter note. It is usually 8 which means that a quarter note happens every quarter note - which is logical. By choosing different values it's possible to vary the rate of the music artificially. By putting a value of 16 it means that the music plays two quarter notes for each quarter note metered out by the midi clock. This means the music plays at double speed.

MIDI Tempo:

Type: Meta Message value: 255 (0xFF)
Sub Type: Set Tempo Message value: 81 (0x51)
Message Format: FF 51 tt tt tt
This meta message signifies a change in the tempo of the music. This is given by a change in the number of beats per minute (BPM) of the piece.
[tt tt tt] Micro seconds per quarter note The tempo is given in micro seconds per quarter beat. To convert this to BPM we needs to use the following equation:

BPM = 60,000,000/[tt tt tt]

Pulses Per Quarter Note (PPQN):

In MIDI notes are measured in pulses rather than in time. The note start time and duration will be a discrete number of pulses. Pulses per quarter note can be found in the header part of the MIDI file and specifies how many midi pulses make up one quarter note. This is useful for determining note values - if the current PPQN is 96 and a note's duration is 48 we know that it's a quaver. It's also vital for determining the rate at which the MIDI file should be played. The tempo tells us how long each pulse should last. The BPM measures how many quarter notes happen in a minute. To work out the length of each pulse we can use the following formula: Pulse Length = 60/(BPM * PPQN)

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.