News for hackers. Stuff that matters.
Re:FLAC 1.4.0 released – added support for 32-bit audio by michaelwww on Wednesday September 14, 2022 @03:32PM (#32842161)
After reading "How Music Works" by David Byrne, it seem like FLAC is solving the wrong problem. No one needs over 4 billion discrete levels.
Re:FLAC 1.4.0 released – added support for 32-bit audio by colejohnson66 on Wednesday September 14, 2022 @03:39PM (#32842268)
You're correct; lossless formats aren't needed by the average consumer. But the problem they solve is a very real thing. Think of the difference between a repeatedly edited JPG vs. a repeatedly edited PNG. Every save of the JPG destroys information irretrievably, whereas every save of the PNG keeps it all. It's the same with MP3 vs. FLAC: MP3 throws away information each export, but FLAC doesn't.

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.

Re:FLAC 1.4.0 released – added support for 32-bit audio by squeaky-clean on Wednesday September 14, 2022 @04:02PM (#32842599)
(I think) They're not saying FLAC is pointless, just that 32 bit audio is. Even music producers record and export at 24bit, 32/64bit is only used for the effects and mixing (because compounding quantization noise and rounding errors is very real).

You can't find 32 bit PCM music anywhere, even hifi DVD audio is 24bit/96khz.

Re:FLAC 1.4.0 released – added support for 32-bit audio by jrajav on Wednesday September 14, 2022 @04:10PM (#32842697)
We don't always record and export at 24-bit, though that's always the end result from mastering (if not 16-bit). In some contexts, 32-bit files are common for samples and for transferring in-progress artifacts like mixed tracks that are ready for mastering.
Re:FLAC 1.4.0 released – added support for 32-bit audio by layer8 on Wednesday September 14, 2022 @07:34PM (#32844948)
> You can't find 32 bit PCM music anywhere

Yes you can (not that I think it’s useful): https://ototoy.jp/find/?q=32bit

(via https://news.ycombinator.com/item?id=32843619)

Re:FLAC 1.4.0 released – added support for 32-bit audio by iforgotpassword on Friday September 16, 2022 @03:30AM (#32863204)
With the recent debacle regarding that audiophile vinyl company secretly using digital in the process and nobody noticing, I'm just gonna assume that company could as well just interpolate up to 32bit...
Re:FLAC 1.4.0 released – added support for 32-bit audio by ZoomZoomZoom on Wednesday September 14, 2022 @06:17PM (#32844181)
> You can't find 32 bit PCM music anywhere

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.

Re:FLAC 1.4.0 released – added support for 32-bit audio by Blueskytech on Wednesday September 14, 2022 @08:19PM (#32845339)
I have a lynx hilo and it does 32 bit input. It’s incredibly nice for recording because if the input hits clipping range you can just lower the volume on the 32 bit recording after the fact and the recording is preserved. Lots of high end DACs have a 32 bit input output option because of this.
Re:FLAC 1.4.0 released – added support for 32-bit audio by ZoomZoomZoom on Thursday September 15, 2022 @04:19AM (#32848828)
Lynx hilo has 121dB input dynamic range and is built upon cs4398 which is a 24-bit DAC chip.

If your input clips, you usually don't need to lower it too much to protect your ADC, and if you recording the sounds so quiet they end up below 24bit noise floor after this, well they probably didn't clip in the first place and you most probably already facing bigger issues with mic/preamp/ambient noise and dynamic range.

Also, you mention hilo can take 32 bit input. Means, the signal is already digitized, and we're talking about recording?

Re:FLAC 1.4.0 released – added support for 32-bit audio by pwiecz on Wednesday September 14, 2022 @03:50PM (#32842442)
"People" don't need just lossless, they need The Beatles to release all of their pre-master tracks to be released in lossless format, so they of them can create their own remastered versions of a the tracks.
Re:FLAC 1.4.0 released – added support for 32-bit audio by michaelwww on Wednesday September 14, 2022 @03:57PM (#32842537)
16 bit is not enough?
Re:FLAC 1.4.0 released – added support for 32-bit audio by pavon on Thursday September 15, 2022 @10:15AM (#32852365)
No, if you want your final output to be 16-bit (eg CD quality), then you need more bits to work with when mixing. Each operation you perform will be requantized (rounded) to 16-bit resolution adding a bit of noise each time, until eventually the lower 4 bits (for example) are nothing but noise, and your signal is effectively only 12 bits. One the other hand if you did that mixing at 24-bit resolution, then you still have 20 bits of good data remaining, you throw away the bottom 4, and have nice clean 16-bit data to distribute. 32-bit integer is overkill in most situations, which is why it wasn't implemented for so long. 32-bit float is used a lot because it has 24-bits of resolution, but also has a huge scaling range, so you don't have to worry about clipping during intermediate operations, just at the end.
Re:FLAC 1.4.0 released – added support for 32-bit audio by atoav on Wednesday September 14, 2022 @03:36PM (#32842241)
I am a recording engineer and I will choose 32 bits over 24 any day when recording.

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

Re:FLAC 1.4.0 released – added support for 32-bit audio by ZoomZoomZoom on Wednesday September 14, 2022 @06:26PM (#32844269)
> I will choose 32 bits over 24 any day when recording.

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.

Re:FLAC 1.4.0 released – added support for 32-bit audio by atoav on Thursday September 15, 2022 @07:29PM (#32859854)
My audio interface is a sound devices mixpre 10 which records 32 bits. It also has preamps with -133dbV noise figures.

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.

Re:FLAC 1.4.0 released – added support for 32-bit audio by ZoomZoomZoom on Friday September 16, 2022 @07:03AM (#32864523)
I understand where you're coming from and the supposed benefits of a higher dynamic range.

In my experience as a mix engineer working with music, recordings, when made proper, rarely use the full available dynamic range of 24 bits. Often I get tracks recorded too low due to incorrect gain staging. But maybe even more common is just a noisy recording. Poor mains wiring, the length of a recording chain, self-noise of various gear used all contribute to what usually amounts to noise levels much higher than -144dB. And, to be honest, in my line of work it rarely matters until it crosses the 16bit noise floor of -96dB.

What I suppose I mean by all of this and my previous posts is if you're not careful enough to fit into the higher portion of the available dynamic range of 144dB you're just adding more noise regardless of the format used, as in most cases the level of cumulative noise is higher than -144dB. YMMV, of course.

Re:FLAC 1.4.0 released – added support for 32-bit audio by squeaky-clean on Wednesday September 14, 2022 @04:06PM (#32842643)
It's very unlikely your audio interface can actually record at 32 bit resolution.

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

Re:FLAC 1.4.0 released – added support for 32-bit audio by jrajav on Wednesday September 14, 2022 @04:13PM (#32842732)
32-bit is common in field recordings, like with a Zoom (and there's reason to believe they can legitimately take advantage of it).
Re:FLAC 1.4.0 released – added support for 32-bit audio by squeaky-clean on Thursday September 15, 2022 @02:43PM (#32856609)
That's a bit different, as it's 32 bit floating point, not integer. 32 bit float is often used for summing and that's what's going on here. Those are done by having 2 (or more) parallel ADCs (usually 24 or 16 bit) with the input voltage scaled lower on each successive one, and then they are digitally re-scaled and mixed together using a 32 bit float format into a single stream (double that paragraph for stereo).

The big benefit from 32bit float is you can go "above" 0db, so your digital operations can't "clip" in the analog sense. I definitely see the benefits of 32 bit float hardware, especially for field recordings (zoom aren't lying, it does work). But it's a different format and the internals are relying on the integer based format and don't exceed 24 bit integers.

Re:FLAC 1.4.0 released – added support for 32-bit audio by atoav on Friday September 16, 2022 @03:16AM (#32863105)
I was thinking flac 32 bits is float as well?
Re:FLAC 1.4.0 released – added support for 32-bit audio by atoav on Thursday September 15, 2022 @07:36PM (#32859930)
My sounddevices mixpre 10 records in 32 bits. Granted not all of those bits will be significant, but the preamps are good enough to take 24 bits to the limit.

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/

Re:FLAC 1.4.0 released – added support for 32-bit audio by michaelwww on Wednesday September 14, 2022 @03:58PM (#32842551)
> I will choose 32 bits over 24 any day

why?

Re:FLAC 1.4.0 released – added support for 32-bit audio by Blueskytech on Wednesday September 14, 2022 @08:23PM (#32845367)
Because if the recording goes past the clipping range for digital audio it still records the data and preserves it. 32bit recording has serious advantages because it’s much easier to record a hot input because digital clipping is not possible. You just need to pull the volume down on the recorded clip after the fact and there is no clipping.
Re:FLAC 1.4.0 released – added support for 32-bit audio by nextaccountic on Friday September 16, 2022 @02:51AM (#32862937)
You mean 32 bits float? This is 32 bits integer
Re:FLAC 1.4.0 released – added support for 32-bit audio by _joel on Wednesday September 14, 2022 @03:35PM (#32842213)
Nyquist Shannon theorem, sure. There are situations where you'd use 32bit audio but not for mastered music you'd listen to at home really. Although people still won't believe you, hence the market for thousand dollar cables and other snake oil.
Re:FLAC 1.4.0 released – added support for 32-bit audio by Night_Thastus on Wednesday September 14, 2022 @03:45PM (#32842358)
From my understanding, doesn't Nyquist-Shannon assume you take infinite steps to refine the discrete steps into the final waveform?

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)

Re:FLAC 1.4.0 released – added support for 32-bit audio by colejohnson66 on Wednesday September 14, 2022 @03:49PM (#32842423)
Nyquist-Shannon simply says that you need 2x the sample rate of the highest frequency to perfectly recreate something. So, to recreate a 20 kHz wave that was sampled at 16 bits, you'd need 40 kHz sample rate. Bump that up to 22.05 kHz (for anti-aliasing) and you get CD audio.

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

Re:FLAC 1.4.0 released – added support for 32-bit audio by Night_Thastus on Wednesday September 14, 2022 @03:54PM (#32842495)
Yes, you only need that many samples given you know a maximum frequency. But to actually perform the conversion from discrete samples to continuous wave takes infinitely many steps. The number a given DAC actually does varies. Some do hundreds, some thousands, a couple rare (very expensive) ones do 100k or more.

That's what I'm saying. Increase the number of samples in the audio itself, and the DAC can get closer to the original.

Re:FLAC 1.4.0 released – added support for 32-bit audio by colejohnson66 on Wednesday September 14, 2022 @03:57PM (#32842538)
Except it's not. The video shows that. In the real world, the DAC doesn't immediately jump from code N to N+1; it slides (the "slew rate" of the opamp). More bits just makes the difference between codes N and N+1 smaller; i.e. where it slides to is more accurate to the original. The "stair step" or "straight line" view you get from programs like Audacity is a lie.
Re:FLAC 1.4.0 released – added support for 32-bit audio by jrmcauliffe on Wednesday September 14, 2022 @04:18PM (#32842783)
A final low pass filter (tuned to remove anything above half the sample rate) allows the accurate reconstruction of the original analogue waveform from the sampled digital data. ( The vertical 'stair step' of sampled data is very high frequency information which gets removed, 'bending' the output back into it's original shape). The video linked above is well worth a watch.
Re:FLAC 1.4.0 released – added support for 32-bit audio by adgjlsfhk1 on Wednesday September 14, 2022 @03:46PM (#32842380)
There are definitely scientific uses that might want to (ab)use FLAC to store sound-like data that would benefit from 32 bit.
Re:FLAC 1.4.0 released – added support for 32-bit audio by navjack27 on Thursday September 15, 2022 @11:33AM (#32853626)
I got this one "remaster" of an album that I like that I've been working on that the 32-bit version that 100% definitely goes over 0 DB just happens to sound a whole lot better when I don't correct for that so on occasion I like to load up that album in Ableton live and listen to it exactly like that.
Re:FLAC 1.4.0 released – added support for 32-bit audio by mmastrac on Wednesday September 14, 2022 @03:46PM (#32842382)
There's a real use case for storing original tracks and masters in 32-bit and down-sampling for consumer use.
Re:FLAC 1.4.0 released – added support for 32-bit audio by matheusmoreira on Wednesday September 14, 2022 @04:47PM (#32843134)
How do you know no one needs it for anything? How do you know no one will ever need it in the future? It's not possible to know that. All we can do is capture the real world data with as much quality and precision as possible.
Re:FLAC 1.4.0 released – added support for 32-bit audio by jlouis on Wednesday September 14, 2022 @05:48PM (#32843876)
I don't think it's for storing music.
Re:FLAC 1.4.0 released – added support for 32-bit audio by tombert on Wednesday September 14, 2022 @03:53PM (#32842479)
While I doubt that human ears need 4 billion discrete levels, I think it's important for archival purposes.
Re:FLAC 1.4.0 released – added support for 32-bit audio by klodolph on Wednesday September 14, 2022 @04:02PM (#32842603)
Is it? What is your reasoning? And why would you pick 32-bit, instead of 24-bit or 64-bit or something else?

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.

Re:FLAC 1.4.0 released – added support for 32-bit audio by tombert on Wednesday September 14, 2022 @04:41PM (#32843073)
Fair enough! That's what I get for commenting on something I'm not as familiar enough with as I should be.