Wednesday, September 28, 2022

16-Bit Dithering and Quantum Mechanics

The strange thing about dithering audio when converting to 16-bit from a higher-resolution format, such as 32-bit floating point, is that it's the first case I’ve encountered of a random process, adding noise, improving quality and accuracy rather than destroying it.

The theory is easy to understand. You have a smooth set of data, a smooth wave, and need to fit this into a fixed number of boxes. A crude algorithm would just shove it in the nearest box, but this is not accurate. Sometimes the data might be perfect, lined up for the dead middle of a box, but almost always it will be just a bit up or just a bit down. Say our datum ball was half-way up in a box; for greater accuracy you would put it in this box 66% of the time and put it in the box above 33% of the time. If the datum was on the border between two boxes, you'd want to put it in the lower box 50% of the time, the upper 50% of the time. Dithering randomises the data by a box-width to easily accomplish this probability scattering.

When I learned of this I realised that the universe itself has to do this, convert a smooth and ideal flow of data into 'real' lumps. Particles are themselves, physics tells us, solid pieces of data quantised from an ideal wave. Every circle in existence from the orbit of electrons to the surface of a proton’s ball is an imperfect approximation of an ideal circle or sphere; so the problem of audio dithering exactly explains when a random process can improve accuracy rather than damaging it. It explains the need for a random function when quantising anything.

An odd thing is that, once quantised, it's impossible to retrieve the original 'pure' data again, whether you dither or not. I was considering the option of rendering a 16-bit wave without dithering... but even then, some information would be lost, as the 'nearest box' option is still imperfect. Dithering is, however, random noise so repeated conversion will cause data to drift and degrade.

This problem must too also exist in physics and the real world, so we have two options here: that the raw/un-quantised data exists at the same time as the quantised data, that our particles are mere representations of an underlying flow of data (a 'Platonic' option); or that these are indeed converted to and from sole particle and wave formats, and thus would lose some integrity, as when converting to from floating-point format to 16-bit and back.

I wonder if an experiment could work out which of these is the case? The former sounds the most 'ideal' having a 'copy' of the pure data, but, as in computing, there is an overhead. It would mean that all particles have a 'soul' of their pure wave-like counterpart shadowing them at all times. But when a particle 'vanishes' and only the wave is there, where does it go, and why? Are these quantised units only here as a display for us, or can they achieve things that their wave-like 'soul' cannot? If the latter is so, then some conversion back would be necessary.

The conversion option, however, would lose integrity over time. This seems to have some analogue in the laws of entropy.

One interesting note is that if Einstein knew about 16-bit dithering he may have been less dismissive with his 'God playing dice' quote, as it shows that random factor can, in some circumstances, increase accuracy.