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.
| PPQ | One tick (seconds) | 7627 ticks (seconds) |
|---|---|---|
| 240 | 0.002083333 | 15.889583 |
| 480 (source) | 0.001041667 | 7.944792 |
| 960 | 0.000520833 | 3.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.
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:
| Offset | Bytes (hex) | Meaning |
|---|---|---|
| 0–3 | 4D 54 68 64 | MThd chunk ID |
| 4–7 | 00 00 00 06 | header length = 6 bytes |
| 8–9 | 00 01 | format 1 |
| 10–11 | 00 02 | 2 track chunks |
| 12–13 | 01 E0 | division (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.
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.
| PPQ | Division bytes | File size | Bytes changed | Notes parsed | 7627 ticks (s) |
|---|---|---|---|---|---|
| 240 | 00 F0 | 169 B | 2 | 14 | 15.889583 |
| 480 | 01 E0 | 169 B | 0 (source) | 14 | 7.944792 |
| 960 | 03 C0 | 169 B | 2 | 14 | 3.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.
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).
| # | Note | MIDI pitch | Start (ticks) | Duration (ticks) | s @ 240 | s @ 480 | s @ 960 |
|---|---|---|---|---|---|---|---|
| 1 | C4 | 60 | 0 | 936 | 0.000000 | 0.000000 | 0.000000 |
| 2 | C5 | 72 | 0 | 100 | 0.000000 | 0.000000 | 0.000000 |
| 3 | D4 | 62 | 959 | 947 | 1.997917 | 0.998958 | 0.499479 |
| 4 | D5 | 74 | 959 | 89 | 1.997917 | 0.998958 | 0.499479 |
| 5 | E4 | 64 | 1918 | 936 | 3.995833 | 1.997917 | 0.998958 |
| 6 | E5 | 76 | 1918 | 89 | 3.995833 | 1.997917 | 0.998958 |
| 7 | F4 | 65 | 2877 | 937 | 5.993750 | 2.996875 | 1.498438 |
| 8 | F5 | 77 | 2877 | 78 | 5.993750 | 2.996875 | 1.498438 |
| 9 | G4 | 67 | 3837 | 959 | 7.993750 | 3.996875 | 1.998438 |
| 10 | G5 | 79 | 3837 | 78 | 7.993750 | 3.996875 | 1.998438 |
| 11 | A4 | 69 | 4806 | 937 | 10.012500 | 5.006250 | 2.503125 |
| 12 | A5 | 81 | 4806 | 78 | 10.012500 | 5.006250 | 2.503125 |
| 13 | B4 | 71 | 5755 | 959 | 11.989583 | 5.994792 | 2.997396 |
| 14 | C5 | 72 | 6713 | 914 | 13.985417 | 6.992708 | 3.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.
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.
| Quantity | Formula | Value |
|---|---|---|
| One tick at PPQ 480 | 60 / (120 × 480) | 0.001041667 s |
| D4 starts, PPQ 240 | 959 × 60 / (120 × 240) | 1.997917 s |
| D4 starts, PPQ 480 | 959 × 60 / (120 × 480) | 0.998958 s |
| D4 starts, PPQ 960 | 959 × 60 / (120 × 960) | 0.499479 s |
| Whole file, PPQ 480 | 7627 × 60 / (120 × 480) | 7.944792 s |
| Ratio 960 / 480 | 480 / 960 | 0.5 |
| Ratio 240 / 480 | 480 / 240 | 2 |
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.
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.
| Property | Source (169 B) | With one tempo event (176 B) |
|---|---|---|
| Tempo events | 0 | 1 |
| Stored BPM | none (player default) | 120 |
| division (PPQ) | 480 | 480 |
| Notes parsed | 14 | 14 |
| 7627 ticks (s) | 7.944792 | 7.944792 |
| D4 starts (s) | 0.998958 | 0.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.
90795f6ff271cb92.01 E0. Replace them with 00 F0 for 240 or 03 C0 for 960. Save as a new file; do not touch any other byte or the chunk length fields.@tonejs/midi 2.0.28. Read header.ppq, the notes' ticks and durationTicks, and duration.ticks × 60 / (120 × ppq) and compare with the parser's time. The 14 pitch/velocity/tick tuples should be identical in all three.These steps describe a method, not a measurement; they are not counted as exclusive material in the denominators above.