midi time signature meta event calculator
MIDI Time Signature Meta Event Calculator guide
A MIDI file can play back at exactly the right speed while its bar lines appear in the wrong place. A Set Tempo event supplies a time scale, while a Time Signature event supplies the meter used by a sequencer. Enter the written numerator and denominator here, then choose the metronome-click grouping and notation relationship.
Play the instrument ↑- Default result
- FF 58 04 04 02 18 08
Calculation and units
The event begins with FF 58 and a data length of 04. Its four data bytes are numerator, base-two exponent of the denominator, MIDI clocks per metronome click, and notated thirty-second notes per MIDI quarter note. A denominator of eight encodes as 03 because two cubed equals eight. Each displayed pair is one hexadecimal byte.
Worked examples
Select a named case in the Worked example control to load these values. You can then edit any input to compare the result.
Straight four
Numerator = 4 · Denominator = 4 · MIDI clocks per click = 24 · Notated 32nds per MIDI quarter = 8.
FF 58 04 04 02 18 08. 4/4 time · 2^2 = 4. Standard MIDI File meta event, excluding its preceding delta time.
A quarter-note click divides the measure into four equal beats under the usual notation relationship. The exponent two identifies a quarter-note denominator. The clock-count byte controls how the click follows that meter.
Waltz in three
Numerator = 3 · Denominator = 4 · MIDI clocks per click = 24 · Notated 32nds per MIDI quarter = 8.
FF 58 04 03 02 18 08. 3/4 time · 2^2 = 4. Standard MIDI File meta event, excluding its preceding delta time.
Only the numerator changes from the straight-four example. Quarter-note duration and click spacing can remain identical even though the downbeat comes after three counted beats.
Two dotted beats
Numerator = 6 · Denominator = 8 · MIDI clocks per click = 36 · Notated 32nds per MIDI quarter = 8.
FF 58 04 06 03 24 08. 6/8 time · 2^3 = 8. Standard MIDI File meta event, excluding its preceding delta time.
Six notated eighths fit into one measure. Choosing 36 timing clocks per click groups them into two dotted-quarter beats instead of assuming the denominator defines the click.
Six smaller clicks
Numerator = 6 · Denominator = 8 · MIDI clocks per click = 12 · Notated 32nds per MIDI quarter = 8.
FF 58 04 06 03 0C 08. 6/8 time · 2^3 = 8. Standard MIDI File meta event, excluding its preceding delta time.
The same written meter can ask for a click on every eighth note. Compare this byte string to the dotted version and locate the one payload byte that changes.
Cut time
Numerator = 2 · Denominator = 2 · MIDI clocks per click = 48 · Notated 32nds per MIDI quarter = 8.
FF 58 04 02 01 30 08. 2/2 time · 2^1 = 2. Standard MIDI File meta event, excluding its preceding delta time.
A half-note denominator uses exponent one. A half note spans 48 MIDI clocks with the usual notation relationship, giving a click on each of the two half notes.
A sixteenth-note denominator
Numerator = 7 · Denominator = 16 · MIDI clocks per click = 6 · Notated 32nds per MIDI quarter = 8.
FF 58 04 07 04 06 08. 7/16 time · 2^4 = 16. Standard MIDI File meta event, excluding its preceding delta time.
Sixteen is two to the fourth, so the denominator byte becomes four. This grouping illustrates why writing the literal denominator into the event would describe an entirely different meter.
Interpreting the result
To represent a dotted-quarter click in a six-eight passage, set the numerator to six and the denominator to eight. A MIDI quarter accounts for 24 clocks, so the dotted-quarter click takes 36 clocks, encoded as 24 in hex. Keeping the usual eight notated thirty-seconds per MIDI quarter completes the event. Changing the click does not rewrite existing note times.
Measurement and model limits
When adding a meter change to an existing track, choose an appropriate tick position separately. The file encodes a delta time before the event and uses its header division to interpret tick distances. Copying the seven displayed bytes without a preceding delta time is insufficient to insert a valid timed event in a track.
Music theory tools → · MIDI Set Tempo Calculator → · MIDI Association Standard MIDI Files specification →
Answers before you play
Common questions
Why does six-eight sometimes click in eighth notes?
The numerator and denominator set written meter. The clock-count byte can specify a different click grouping, and some software chooses its own metronome arrangement. Compare the raw event before attributing a playback difference to damaged notes.
Does FF mean reset on a MIDI cable?
Inside a Standard MIDI File track it introduces a meta event. A live MIDI stream has a different framing convention. This encoder produces file bytes for inspection or serialization, without sending them to an instrument.
Does changing the signature set the BPM?
The tempo and signature use different Standard MIDI File event types. Keep the tempo event or add a separate one if the playback rate also changes.
Why is 24 clocks printed as 18?
The input is a decimal count and the packet display is hexadecimal. Sixteen plus eight equals 24, so 18 is the correct two-digit hex representation.