MIDI PPQ and Ticks: What the Two Division Bytes Change

Short answer: PPQ (ticks per quarter note, also called the time division) is stored in exactly two bytes of a Standard MIDI File header, at offset 12–13. It does not change any note. It changes how long a tick is. In a real 169 B .mid downloaded from this site, those two bytes read 01 E0 = 480. Change only them to 00 F0 (240) and the same 7,627-tick passage lasts 15.889583 s instead of 7.944792 s; change them to 03 C0 (960) and it lasts 3.972396 s. The 14 notes, their pitches, velocities and tick positions are byte-for-byte identical in all three files. Every number below was measured on 8 November 2026 from that published file, and you can download it and recompute each one.

PPQOne tick (seconds)7627 ticks (seconds)
2400.00208333315.889583
480 (source)0.0010416677.944792
9600.0005208333.972396

Exclusive material on this page. Five of the seven sections below come from measurements of one published 169 B MIDI file and three single-variable variants of it, not from general format descriptions. Two denominators, computed on 8 November 2026: sections 5/7=71.4% and characters 6,230/8,108=76.8%. Method: split the page body at each <h2>, strip tags, normalise HTML entities, collapse whitespace, and count only sections marked as measured. The first-screen answer, head and footer are outside both denominators.

1. Fourteen bytes that decide how long a tick is

The MIDI file used here (169 B, SHA-256 90795f6ff271cb92…) is the actual downloaded output of running this site's test WAV through the browser converter on 24 October 2026. Its first 14 bytes are the MThd header. Read byte by byte:

OffsetBytes (hex)Meaning
0–34D 54 68 64MThd chunk ID
4–700 00 00 06header length = 6 bytes
8–900 01format 1
10–1100 022 track chunks
12–1301 E0division (PPQ) = 480

The whole file is 14 + 4 + 4 + 8 + 4 + 4 + 131 = 169 bytes: a 14-byte header, then a first MTrk chunk (4-byte ID, 4-byte length, 8-byte payload containing only a track name and end-of-track), then a second MTrk chunk (4 + 4 + 131 bytes) holding the note events. Independent parsing with @tonejs/midi 2.0.28 on 8 November 2026 returns 14 notes, 0 tempo events, PPQ 480 and a total of 7627 ticks. Only the second chunk contains notes, which is what "one note track" means for this site's output; the header still declares two track chunks.

Everything that follows changes offset 12–13 and nothing else. That pair of bytes is unsigned big-endian: 01 E0 is 1 × 256 + 224 = 480. It is the number of ticks the file assigns to one quarter note.

2. One two-byte change, three files, 167 identical bytes

Three files were produced from the published source. The 480 version is a byte-for-byte copy; the other two differ only at offset 12–13. Each remains 169 B. Each was re-opened independently with @tonejs/midi 2.0.28 — a structural check, not just a byte comparison — and all three parse to the same 14 notes with identical pitch, velocity, start tick and duration tick values.

PPQDivision bytesFile sizeBytes changedNotes parsed7627 ticks (s)
24000 F0169 B21415.889583
48001 E0169 B0 (source)147.944792
96003 C0169 B2143.972396

Reading the table the other way round: if you only know the bytes, you cannot tell how long the music lasts. The file says "note 3 starts at tick 959"; it does not say how many seconds tick 959 is. That conversion needs both the division and a tempo. This file has no tempo event, so a player falls back to a default of 120 BPM. With 480 ticks per quarter, one tick is 60 / (120 × 480) = 1/960 s; with 960 it is 1/1920 s. Doubling the resolution halves every elapsed time without moving a single event.

The variant files are working research artefacts and are not hosted on this site; the source MIDI above is the one published file you need to reproduce the edit. Changing the division of a file that also contains tempo events changes seconds in the same way, but it does not change the stored BPM.

3. Every note at three resolutions

Each row is one note parsed independently from the 169 B source. The tick columns are raw file values and are identical in all three variants; only the three seconds columns move. The odd rows are the eight intended notes of the C-major scale, the even rows are short octave-ghost artefacts from transcription (see clean up MIDI). Seconds are computed with ticks × 60 / (120 × PPQ).

#NoteMIDI pitchStart (ticks)Duration (ticks)s @ 240s @ 480s @ 960
1C46009360.0000000.0000000.000000
2C57201000.0000000.0000000.000000
3D4629599471.9979170.9989580.499479
4D574959891.9979170.9989580.499479
5E46419189363.9958331.9979170.998958
6E5761918893.9958331.9979170.998958
7F46528779375.9937502.9968751.498438
8F5772877785.9937502.9968751.498438
9G46738379597.9937503.9968751.998438
10G5793837787.9937503.9968751.998438
11A469480693710.0125005.0062502.503125
12A58148067810.0125005.0062502.503125
13B471575595911.9895835.9947922.997396
14C572671391413.9854176.9927083.496354

Note that the last event ends at tick 6713 + 914 = 7627, which is why 7627 ticks is the length of the whole passage. At PPQ 480 that is 7.944792 s; at PPQ 960, 3.972396 s; at PPQ 240, 15.889583 s. No note was added, removed, lengthened or shortened in ticks.

4. The formula, checked against the parser

The conversion is seconds = ticks × 60 / (BPM × PPQ). With the player default of 120 BPM this simplifies to ticks / (2 × PPQ). Every cell in section 3 was recomputed from that formula and then compared with the independent parser's reading of the corresponding variant file; all 42 cells (3 resolutions × 14 notes) agree.

QuantityFormulaValue
One tick at PPQ 48060 / (120 × 480)0.001041667 s
D4 starts, PPQ 240959 × 60 / (120 × 240)1.997917 s
D4 starts, PPQ 480959 × 60 / (120 × 480)0.998958 s
D4 starts, PPQ 960959 × 60 / (120 × 960)0.499479 s
Whole file, PPQ 4807627 × 60 / (120 × 480)7.944792 s
Ratio 960 / 480480 / 9600.5
Ratio 240 / 480480 / 2402

The two ratios are the whole point: elapsed time is inversely proportional to PPQ. The numbers in the table are not rounded from a screenshot — they are the formula evaluated on the tick values read out of the file. If you plug 959, 120 and 480 back in, you get 0.998958333…, which is the 0.998958 shown. A file with an explicit tempo event would use the stored BPM in the same denominator.

5. PPQ is not tempo: a zero-effect injection

To show that these are two independent byte dimensions, a fourth file was built from the 480 source by inserting one tempo event and nothing else: 00 FF 51 03 07 A1 20 (delta 0, tempo meta event, 500,000 microseconds per quarter = 120 BPM) into the first track, just before its end-of-track marker, with that track's length field changed from 8 to 15 bytes. The file grows from 169 B to 176 B. The division bytes stay 01 E0.

PropertySource (169 B)With one tempo event (176 B)
Tempo events01
Stored BPMnone (player default)120
division (PPQ)480480
Notes parsed1414
7627 ticks (s)7.9447927.944792
D4 starts (s)0.9989580.998958

Writing 120 BPM explicitly changes no elapsed time at all, because 120 BPM was already the default the parser applied. PPQ sets how many ticks make a quarter note; tempo sets how long that quarter note lasts. Changing one does not change the other. This is also why an exported MIDI can sound "the wrong speed" in a DAW without any note being wrong — see MIDI wrong tempo after conversion for the tempo side of that problem. This site does not detect tempo or BPM from audio; it writes note events and no tempo event.

6. How to reproduce these numbers

These steps describe a method, not a measurement; they are not counted as exclusive material in the denominators above.

7. What this site writes, and what it does not