What information in an audio file lets timbre of individual instruments be recognizable, regardless of playback device?

What information in an audio file lets my iPod, home speakers, PC, and bluetooth boombox output the same recognizable “guitar” and drum sound, if it’s just a measure of the encoded amplitude values? Won’t the timbre of each instrument be lost if it all becomes numerical values between -128 and 127? Is timbre just an interpretation of air pressure?

For example:

1. Let’s say I export an audio file that's a recording of an acoustic guitar and kick drum.

2. When I export the audio file, the waves (amplitude) that make up the guitar’s characteristic harmonics are translated to numerical values via PCM (-128 to 127) at a fidelity dependent on my sample rate.

3. My bluetooth boombox takes the amplitude data and moves the cone proportionally creating air pressure that I hear.

4. Air pressure reaches my tympanic membrane and then...what? My brain interprets that air pressure as a "guitar?"

PCM doesn't have only 127 signed values, it has at minimum [for CD-quality] 32,767 at 16-bit resolution, up to 8 million at 24-bit & 2 billion at 32-bit [the theoretical maximum is infinite.]

Each of those individual values can be thought of as a "position" - where the magnetic forces in your loudspeaker will push the cone under a specific positive or negative voltage.
Generated sound comes from each of these numbers/voltages going by so quickly that they are no longer discrete values, but become a series of physical movements - single discrete positions at 44 thousand times per second for CD or 'regular' MP3 [or higher still, the current maximum 'common' sample rate is 192 kHz]. At these speeds, the individual positions are no longer perceived as discrete events and the movement of the cone becomes audible sound.

The ability of digital audio to sample where this speaker cone should be thousands of times a second is how the particular acoustic properties of any instrument, or complex combination, are delivered.

Each sampled position contains no sonic data at all. It is simply a position the speaker cone should move to. It only becomes perceivable as sound once all these movements become too fast to recognise as discrete events. About 40 times per second is the largest gap between events that humans can hear. [We can feel it below that, but it tends to then be perceived as vibration rather than sound]. Up to 20 thousand is the maximum. [This reduces as you get older.]

A speaker cone is exactly the same mechanism as a [dynamic] microphone, but in reverse. Both use a diaphragm & a coil of wire inside a magnet. If you move a coil in a magnet it produces a voltage. If you supply a voltage to a coil in a magnet, it will move. They are exactly the same electro-magnetic principal. If you do this fast enough, it becomes sound, or an analogue of sound which we can now store as 'positions' - eg on a vinyl record as movement away from a centre point, or a tape recorder as positional variation of a magnetic field, or in digital form as numbers representing distinct voltages.

Vibrating a cone of paper will produce alternating pressures in the air… we perceive this as sound when it reaches our ear drums & makes them vibrate in time with the air movement - just like a microphone.
Even weirder… humans use electricity to transmit this information to the brain, though the microphone analogy breaks down there, it's not an identical mechanism.

Anyway - once that series of vibrations is fast enough that we don't hear individual speaker 'positions'… then it becomes indistinguishable from the natural permeation of sound from the original guitar.

Mathematics can break down any sound into a series of overlapping, interfering sine waves. The ear doesn't really do it the same way, but the perception of sound is the same for one reproduced by a speaker to that of the original instrument. Digitally sampled audio doesn't actually contain any sine waves, only individual positions, which are then recombined at the speaker to once more become "sound" with all its intricacies.

Both microphone & speaker manufacturers each try to build their devices to best recreate each absolute position to best accurately reproduce sound at all frequencies. Generally, as with all things technical, you can get somewhere close quite cheaply, but to do it exceptionally well becomes logarithmically expensive [& with a great deal of perceptual opinion in the upper echelons.]

• This rambles a bit - I'd never make a university lecturer - but I hope the essence of comprehension is contained within. ;) Jul 15, 2022 at 16:40