MIDI Program Change: the one byte that names an instrument

Short answer: a Standard MIDI File does not contain instrument audio. It contains a label: a two-byte Program Change event (00 C0 00 in the published file) whose second byte is a General MIDI number from 0 to 127. In the 169 B MIDI file published on this site, that byte is 00 and an independent parse with @tonejs/midi 2.0.28 names it acoustic grand piano. Change only that byte to 0A and the file is still 169 B with 168 B unchanged, yet the same parser calls it music box — and reports the same 14 notes. Every row below is that one file with one byte rewritten, measured on 10 November 2026. Download the source and check each byte yourself.

One-byte editFile sizeProgram byteGM numberInstrument nameIndependent parse
Original (published file)169 B000acoustic grand piano14 notes, PPQ 480
00 → 0A @ offset 44169 B0A10music box14 notes, PPQ 480
00 → 28 @ offset 44169 B2840violin14 notes, PPQ 480
00 → 46 @ offset 44169 B4670bassoon14 notes, PPQ 480
00 → 7F @ offset 44169 B7F127gunshot14 notes, PPQ 480

All five rows are the same 169 B file with exactly one byte rewritten. No audio was re-converted, no note was added, and no track was split: only the instrument label moved. The last column is what an independent parser read after re-opening each copy from scratch.

Exclusive material on this page. Five of the seven sections below are built from measurements of the published file and seven single-byte edits of it, not from general format descriptions. Two denominators, computed on 10 November 2026: sections 5/7=71.4% and characters 6,926/9,107=76.1%. 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.

Honesty line, stated up front. This site does not separate instruments. It does not keep a drum track. It outputs a single-track .mid file with one note track and no per-instrument parts. There is no multitrack output and no instrument separation here. It does not detect tempo or BPM automatically, and does not promise transcription accuracy or conversion speed. A Program Change byte is a label in a file, not a claim about separating instruments in audio. This page makes no conversion claim at all: it opens one already-published .mid, edits one byte at a time and re-parses the copies.

Version caveat. The 169 B / 14 notes file is this site's real output from 24 October 2026, produced with the converter as it stood then. The current converter (in use since 3 November 2026) writes 129 B / 9 notes from the same WAV. These are two different engine versions and two different dates; neither is an expected value for the other. If you run the WAV through the live tool today, expect 129 B, not 169 B. The byte-level experiment below deliberately uses the published 169 B file because that file is public and reproducible; it is not a measurement of the current converter's output.

1. Where the instrument byte lives in a 169-byte MIDI file

The source is the 169 B MIDI file published on this site on 24 October 2026, alongside the test WAV it came from. Its first 14 bytes are 4D 54 68 64 00 00 00 06 00 01 00 02 01 E0: the MThd chunk declares format 1, two tracks and a division of 01 E0 = 480 ticks per quarter note. The three chunks were read straight from the file's own length fields, with no assumed offsets:

ChunkOffsetLength fieldBytes on diskWorking
MThd (header)0614 B8 + 6 = 14
MTrk (conductor)14816 B8 + 8 = 16
MTrk (notes)30131139 B8 + 131 = 139
Total——169 B8+6 + 8+8 + 8+131 = 169

The first MTrk is an 8 B conductor track with a track-name meta event and end-of-track. The second holds 131 B of events, beginning with another track-name event. Walking forward from the note-track body start (offset 38) through the variable-length delta-times locates the Program Change event from the bytes themselves rather than from a remembered subscript:

Offset (decimal)ByteWhat the byte isHow it was derived
3800delta-time 0 before track-name meta eventnote-track body starts at chunk offset 30 + 8
39–41FF 03 00track-name meta event, name length 03 bytes after the delta
4200delta-time 0 before Program Changenext event starts here
43C0status: Program Change on channel 00xC = Program Change; & 0x0F = 0
4400program number (GM instrument)the byte edited in section 3
4500delta-time 0 before the first note-onnotes begin on the next byte
4690first note-on status (channel 0)unchanged by every edit on this page

The C0 status byte splits into two halves: 0xC0 >> 4 = 0xC means Program Change, and 0xC0 & 0x0F = 0 means channel 0. The next byte is the program number. The delta-time bytes before each event and the PPQ division field are separate measurements on this same published file; this page is about the three bytes 00 C0 00.

2. What a program change is, and what it is not

General MIDI assigns numbers 0–127 to instrument names: 0 is acoustic grand piano, 40 is violin, 127 is gunshot. A Program Change event stores one such number on one channel. It is metadata, not sound. The file never contains a piano sample or a violin waveform; whatever plays the file decides what that number sounds like, and two players can sound entirely different while reading identical bytes. Editing this byte therefore changes a label and nothing else about the notes. It is also not a way to split one track into instruments: a single-track file with one Program Change byte is still one track. The MIDI to MP3 tool on this site renders a .mid to audio; the byte inspection on this page does not.

3. Four single-byte edits to the program number

Four copies were made, each changing only the program-number byte at offset 44. Every copy is 169 B, differs from the source in exactly one byte, and was re-opened from scratch with @tonejs/midi 2.0.28. The GM number column is the decimal value of the byte written; the instrument name is what the parser reported, not a name supplied by this page. The notes column is the parser's note count across all tracks:

Byte editOffsetBeforeAfterGM numberInstrument nameNotesSize
00 → 0A44000A10music box14169 B
00 → 2844002840violin14169 B
00 → 4644004670bassoon14169 B
00 → 7F44007F127gunshot14169 B

Each edit leaves 168 B unchanged, keeps 14 notes and PPQ 480, and leaves the file parseable. The instrument number read by the parser equals the decimal value of the byte written in all four cases: 0A = 10, 28 = 40, 46 = 70, 7F = 127. A single data byte therefore selects the label while the musical content is bit-for-bit the rest of the file. Writing the original 00 back over the changed byte restores the exact source SHA-256, which is the structural check that each copy is a one-byte edit and not a re-encoded file.

4. Every number recomputed from the bytes

No figure below is copied from a rendered page. The left column is the formula, the middle is the computed result, and the right says where the same value appears independently. Chunk lengths come from the file's own length fields; nibbles come from the status byte; GM values come from hexadecimal; 168 B is subtraction:

FormulaComputedCorroborated by
8+6 + 8+8 + 8+131169 Bsum of the three chunk length fields + 8 B headers
0xC0 >> 40xC (12)high nibble of the status byte = Program Change
0xC0 & 0x0F0low nibble = MIDI channel 0
0x7F127largest 7-bit General MIDI program number
0x0A / 0x28 / 0x46 / 0x7F10 / 40 / 70 / 127decimal values written into offset 44
169 − 1 changed byte168 B unchangedbyte diff of each injected copy
(0x01 << 8) | 0xE0480 ticks / quarterdivision field 01 E0 = parser PPQ
60 / (120 × 480)1/960 s per tickSMF default 120 BPM, no tempo event in this file

The division bytes 01 E0 give 480 ticks per quarter note, so one tick is 60 / (120 × 480) = 1/960 s at the SMF default of 120 BPM. The file itself contains no tempo event, which is why the default applies; none of the four program edits changes that. The format and track-count fields were measured separately on this same file, and the 33 delta-time fields were enumerated from its events. Those values are unchanged by every edit on this page.

5. A structural control: editing the status byte instead

Changing the data byte changes a label. Changing the adjacent status byte at offset 43 changes what the following bytes mean. Three more one-byte edits were made there, still 169 B and still 168 B unchanged. The parser's readings show why "the file opens" and "the file says the same thing" are different claims:

Byte editVariant fileStill parsesNotes readSize
— (source)C-major-eight-notes-44k1.midyes14169 B
C0 → C1 @ offset 43status-C1-channel1.midyes14169 B
C0 → B0 @ offset 43status-B0-control.midyes12169 B
C0 → FF @ offset 43status-FF-meta.midno0169 B

C0→C1 moves the event to channel 1; the file still parses and still holds 14 notes, but the parser now reports two tracks because the channel changed. C0→B0 turns the event into a Control Change, and the parser reads 12 notes instead of 14 while still opening the file. C0→FF turns it into a meta event and the parse fails outright. A file that still parses is not necessarily a file with the same content. This is also why this page never treats a successful parse as proof of a good conversion; the four program edits were checked for note count, track count, PPQ and a byte-for-byte restore, not merely for "it opened".

6. The 14 notes do not move

The strongest check is the note list itself. The independent parser read these 14 notes from the source file; the same list, with the same pitches, velocities, start ticks and duration ticks, was read from each of the four program-number copies. Pitch is the MIDI note number, duration ticks come from the note-on and note-off delta-times, and time is seconds at 1/960 s per tick:

#Note namePitchVelocityDuration ticksStart (s)
1C5720.2991000.000000
2C4600.7179360.000000
3D5740.283890.998958
4D4620.7179470.998958
5E5760.268891.997917
6E4640.7489361.997917
7F5770.307782.996875
8F4650.749372.996875
9G5790.283783.996875
10G4670.7569593.996875
11A5810.252785.006250
12A4690.7489375.006250
13B4710.7489595.994792
14C5720.7729146.992708

Nothing in this list names an instrument. The Program Change byte sits before the first note-on and applies to the whole track, which is exactly why changing it cannot add, remove, retune or re-time a note. If you are chasing wrong notes after a conversion rather than a wrong instrument label, the clean-up MIDI page covers the note artefacts that a real audio-to-MIDI run leaves behind.

7. How to repeat this yourself, and what this page does not claim

Download the 169 B source file, open it in any hex editor, and look at offsets 42–44: 00 C0 00. Write one byte at offset 44, save, and re-open with a MIDI library that reports instrument names. The chunk length fields do not need editing because all seven variants are in-place single-byte writes; writing 00 back restores the original file exactly. If you would rather convert audio than edit bytes, the MP3 to MIDI converter and the other format pages run in your browser and produce a single-track .mid you can inspect the same way.

What is not here: no measurement of conversion accuracy, no speed figure, no tempo or BPM detection claim, no multitrack or per-instrument output, no drum track, no URL or YouTube input, and no claim that this site is more accurate than anyone else. The numbers come from one 169 B file published on 24 October 2026 and seven one-byte edits of it, measured on 10 November 2026 (UTC). A different audio input produces a different file, and the current engine produces a different byte count from the same WAV. General format facts, method notes, limits and disclaimers are deliberately excluded from the exclusive-material denominators above.