MP3 to MIDI: Two Pressure Messages, One Key Number
A .mid can record that a key was pressed harder after it had already bottomed out, and the format gives that one idea two different messages. Only one of them carries a key number. The other sends a single value for the whole channel, defined as the greatest pressure among the keys held at that moment, so on a chord it cannot say which finger moved.
Short answer
- Two codes. Polyphonic Key Pressure is 1010nnnn with a key and a value; Channel Pressure is 1101nnnn with a value and no key at all.
- One is a maximum, not an average. The channel form is defined as the single greatest pressure value of all the current depressed keys.
- Ten keys, one number. The per-key form has 16,384 values per channel; the channel form has 128.
- Neither is required. General MIDI Level 1's four requirements name velocity and never mention pressure.
Two definitions, one sentence
Both rows of the message table are introduced by the same words: this message is most often sent by pressing down on the key after it "bottoms out". The specification uses the word aftertouch three times, hyphenated twice, and all three sit inside those two rows; it uses the word pressure five times, again all inside them. Nothing else in the document refers to either: those two rows are the whole vocabulary for what a key does after its note has started.
One address per key, or one per channel
Polyphonic Key Pressure is 1010nnnn 0kkkkkkk 0vvvvvvv: a key, then a value, so 128 keys times 128 values gives 16,384 per channel. Channel Pressure is 1101nnnn 0vvvvvvv: a value and nothing else, so 128 per channel, and its address is the channel rather than the key. The specification glosses the second form as sending the single greatest pressure value of all the current depressed keys. A maximum cannot be undone: one number does not lead back to ten.
What a chord loses
Hold ten keys and lean on one. The per-key form can report ten separate values, seventy bits in all. The channel form reports one, seven bits. Nine readings have nowhere to go, and the survivor is the greatest, not necessarily the one that changed. Ten keys pressed evenly and ten pressed unevenly can send the same channel message: a maximum is the same number either way.
What the per-key stream costs
With a status byte a per-key update is three bytes, a channel update two; running status removes one from each. Ten held keys updated once each therefore cost twenty bytes in the per-key form, while the channel form covers all ten in a single message of two bytes. Ten times less traffic, nine addresses fewer. A file may carry either form, both, or neither.
Why a converted file carries neither
Both messages describe a key, not a sound. Velocity is read once, at the instant the note begins; aftertouch is a second reading, taken from the keybed while the key is still held. Audio has no keybed. When a held synth note gets brighter, the cause is a filter, an envelope or a controller lane, and the last of those is already storable as a Control Change. A converter measuring amplitude and spectrum has nothing to put in either field, so the correct output is empty in both.
How to tell whether a file has it
In a hex view, look for status bytes from A0 to AF and from D0 to DF; the low nibble is the channel, so each family spans sixteen bytes. If either appears, a keyboard or a DAW wrote it. A file produced from audio alone has no source for either.