171 points · by thrdbndndn · 4y ago · 114 comments
* The sensor system wants to do unit conversion for me. This data doesn't really have 32-bits of dynamic range, but for archival purposes I'd like to store the exact bits without adding another quantization step - that can happen later.
* The sensor system combines multiple ADC channels HDR style. I'd rather get the raw readings and do the combining myself, but don't always have access to it.
* Some more advanced preprocessed results, akin to a GPS solution. Linear predictor based algorithms are perfect here since the full possible set of values does have high dynamic range, but the upper bits change very slowly.
Edit: oops, I can't. No fp support yet.
WavePack was specifically designed to be Patent Free, or using old and expired Patent techniques.
Now I can at least re-compress them losslessly in FLAC. (previously I have to use Wavpack, which isn't bad but I'd prefer to have a single format in my media library.)
there’s no part of the analogue capture process that can utilise such a low noise floor (as far as i’m aware): is there anything of value worth preserving there?
Not really in term of audio itself, just easier to do bitwise comparison with the original file, in term of file integrity.
I can't say I personally can tell the difference, but based on my (limited) knowledge of DSP, artifact-free resampling definitely isn't a straightforward thing.
It's more that in practice artifact free resampling isn't a thing at all, so you have to choose what your artifacts do.
[1] https://www.e-onkyo.com/music/ [2] https://ototoy.jp/top/
The real problem with CD audio is that it's premixed in stereo, and the real next step is Atmos/spatial audio. Just because you only have two ears doesn't mean you can't hear 360 degrees.
Would love to see some benchmarks on this. Since FLAC hit 1.0 over 20 years ago, CPU speed has increased by ~100x, so a small hit on encode speed for better compression mostly doesn't matter. Then again, storage space has increased by the same amount, too.
I didn't even know 32-bit integer was a thing. Float is far more common. (For audio.)
32bits is 32bits is 32bits.
You can then do processing with a 64bit float after converting the int’s bits without loss.
Pretty sure every ADC IC I looked at uses integers. During analog processing, using the term “float” is highly disingenuous for an analog waveform, and if an ADC spouts out an int, what float are we talking about here?
I maybe have gone too deep in the weeds reading TI chip manuals and writing drivers for some adc chips for my 8 channel, 32bit, 192kHz recording system, and maybe I missed some nuances in what “32bit” means, but last I checked my audio is pretty solid even after converting the 32bit int to 64bit float during my signal processing.
Audio engineering has been a massive pain because these people use different terms for basic things (great example is “phantom power” — it’s just a 48v, low-current power supply, but good luck finding a simple answer to that useless term) and there doesn’t seem to be any authoritative references to find answers, so I am sure I am missing something here.
Most systems are 64bit now, I wouldn’t be doing signal processing on a system that wasn’t. If my signal has 32bits to work with during capture and my scratch space is 64bits during processing, I can assure you I am not losing any signal during conversion between int / float.
What am I missing?
For an example, music artists/producers can't afford to lose information when they "bounce" a track. FLAC solves that. "People" don't need lossless, but for those that do, it's great.
You can't find 32 bit PCM music anywhere, even hifi DVD audio is 24bit/96khz.
Yes you can (not that I think it’s useful): https://ototoy.jp/find/?q=32bit
The real reason is that there's no 32-bit floating point digital audio converters, so distributing the audio in a format which needs to be quantized to be played anyway has no purpose (outside of deceptive marketing, of course).
Even integer 32 bit makes no sense for a final format - the available noise floor is just beyond reasonable, 24 bit is more than enough. In practice, 16 bit is too.
Of course you need the right (exceptionally good!) preamps to even make a difference here, but when you are manipulating audio 32 bits and upwards (for summing) are the default (for a reason).
Having something to store those files with a little bit of lossless compression is a welcome addition
There's probably no point since your audio interface doesn't produce 32 bit audio anyway.
For transient formats it's another story: if a bit of audio gets re-printed multiple times with some processing between renders, then it's beneficial to store it in a DAW-native format (32/64 fp) to avoid quantization or multiple additions of dither noise. For recording you just waste space.
> Having something to store those files with a little bit of lossless compression is a welcome addition
You'd probably want to store 32/64 bit floating point, and WavPack works really well. On comparable formats it achieves ratios really on par with Flac.
In the practical sense what this means is that I have to be less careful with setting the gain. Typically when setting recording gain you want to go as high as possible so preamp/mic noise doesn't become an issue, but not so high that you are going into the limiter when something unexpectedly loud happens.
I often record in environments where unexpectedly loud things happen, so having a recorder that allows me to record at a lower level while still not gaining noise issues or loosing detail in the silent parts is a very welcome thing.
https://www.mojo-audio.com/blog/the-24bit-delusion/
32bit or more makes sense for dsp and summing, and non-musical data storage. But your I/O is most likely not giving 32 bits
32 bits are less critical to set the gain for (more headroom) and audio files are tiny anyways (compared to say, video). So in a practical sense I need to be less precise with setting the gain, or can record a bit more dynamic events. I am very happy with the results.
Sounddevices has a good explaination if you are curious: https://www.sounddevices.com/32-bit-float-files-explained/
why?
Since real-world DACs don't have infinite taps, either increasing the number of samples per second in the original audio or the number of steps done by the filter will improve how close it gets to the original waveform.
Would that apply to the number of bits used to represent the level as well? I thought that was mainly useful to give some additional headroom when editing?
(Obviously there's diminishing returns either way)
The bit depth, OTOH, is your signal-noise ratio (noise floor) when sampling/quantizing said audio. It's unrelated to Nyquist-Shannon. More bits gives you less noise when reproducing it. For CD audio, 16 bits was chosen to give an acceptable SNR of 96 dB.
Monty Montgomery (of xipf.org) has a nice YouTube video related to this: https://www.youtube.com/watch?v=cIQ9IXSUzuM
Actual audio equipment has a noise floor. The encoding depth you use also has a noise floor. If the noise floor of the encoding is far below the noise floor of the signal, then it won't be perceptible.
So you choose to put your noise floor at some amount below the existing noise floor. Not infinitely below, because that would require infinite bits. This is the reasoning you'd use for 24-bit audio, which has a very comfortable noise floor of -144 dB, which leaves a large margin even for extreme low-noise professional equipment (you might see -120 dB ish for extremely good equipment).
At 24-bit, even passive components like transformers and resistors are contributing measurable amounts of noise.
The reason you might pick 32-bit in practice is so that you can have lots of headroom for some DSP algorithm, or do lots of sums of different signals without accumulating quantization error. The final "archive" file will still have worse than 24-bit precision.
I'm curious if sites like Qobuz will suddenly replace some of their existing files with higher-bit copies if they already had them and just had no way to encode them as FLAC.
The kind of equipment I'd expect to see in order to record that kind of range is where you'd have something like multiple microphones, and switch back and forth between them based on the level of the material you're recording (which would have to be something like actual gunfire or explosions).
I don't know what kind of equipment you'd need to reproduce this dynamic range, but I don't think it's audio equipment.
My guess is that the main real application of this is going to be compression of non-audio data that happens to compress well with FLAC.
In principle, every time you convert from the 32 bit float back to 24 bit integer, there's an opportunity for a careless human to screw up the scaling, and throw away some of the available integer range. Rinse and repeat until you have an audible problem.
So this forms the basis for an argument in favour of keeping the audio in a float representation for as much of the production process as can reasonably be achieved.
I don't see any benefit in 32 bit representation for delivery of the finished content, but I suppose that if, as part of the production process, you're transferring the audio online between different sites/people/whatever, then having lossless compression that works without having to convert back to integer might be useful.
EDIT: Just read the thing more carefully, and realised that it's specifically talking about 32 bit int, NOT float. So right now, I can't see much practical use for this.
However, there is a legitimate purpose behind having higher dynamic range for production purposes and sample sources. There are some recording sources that can actually produce 32-bit audio. Plus, you might want to do some processing on the sound that would end up affecting the dynamic range, or otherwise benefit from the increased resolution. One example is nonlinear processing that generates new musical information from the original signal - you can of course just reduce the gain after processing, but you are then sacrificing some of the resolution of the new combined signal, which itself could otherwise be used by further downstream processes. This all happens post-recording, but can still be musically important before getting to the finished product.
This is why DAWs work in 32-bit or 64-bit processing internally, and why many high-quality sample libraries will come in 32-bit, especially smaller one-shots. I often convert samples to .flac for space reasons, and have to either skip 32-bit .wavs or downsample them to 24.
This is the justification for 24-bit audio... is there a reason why 24 bits is not enough here?
If you're capturing audio sources directly, you'd use something like a 24-bit ADC, which you can find easily enough. The "raw" output of the ADC is 24 bits.
If you're doing intermediate processing in your DAW, then the DAW is using single-precision floats (or possibly double), which cannot be losslessly converted either to 32 bit or 24 bit integers, so how would you choose the right format to store? It seems to me that you'd either store the original floating-point data, or you'd perform some kind of lossy conversion to a high-quality archival format... but if you do that, isn't 24 bits good enough? You're quantizing either way, and at 24 bits, you can have plenty of headroom and noise floor at the same time. Loads, even.
Some of your ADC/DAC chain can reasonably claim 125dB range. Some amplifiers can claim 17 or even 18 bits above their noise floor - 108dB.
No full-spectrum microphones, headphones or speakers can reasonably claim 125dB without distortion, but if they did you would still want to limit your exposure to "never". Long-term damage begins with long-term exposure under 96dB.
https://en-de.neumann.com/d-01
156 dB max spl 86 dB snr 130 dB dynamic range
Neumann patented a dual ADC preamp to make this possible.
My thought is that it would be very hard to get that 130 dB range all the way from an audio source to your ADC, and it would be very hard to get it back out all the way to speakers again.
It's not that hard to beat 16-bit, which is 96 dB, using easy-to-find, off-the-shelf equipment. One example scenario is that you are recording something but you don't have a precise idea of how loud it will be ahead of time, so you record at low levels and rely on 24-bit capture to give you headroom above and noise floor below. Trying to capture at 16-bit can, in practice, be annoying and difficult because it is more likely that you will ruin takes by setting the gain wrong.
As far as human hearing goes, 24-bit is already overkill. Even 16-bit should be an imperceptible downgrade for anything with a naturally low dynamic range (i.e. most music).