Live data from Hacker News

FLAC 1.4.0 released – added support for 32-bit audio

xiph.org

91–100 of 119 posts

Re: FLAC 1.4.0 released – added support for 32-bit audio

#91

Earlier quoted context omitted.

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, musi…

16 bit is not enough?

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

#92
post #88
post #83

Earlier quoted context omitted.

It is sad that a technically superior and patent free technology often lose out in the popularity contest. Sigh.

What do you mean? Both FLAC and WavPack claim to be patent-free.

I am not aware of FLAC claims to be patent free ( when it started ), it may be royalty free and patent free now given it has been 20+ years since 1.0. They do however claims they dont hold any patent on it.

WavePack was specifically designed to be Patent Free, or using old and expired Patent techniques.

Re: FLAC 1.4.0 released – added support for 32-bit audio

#93

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.

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

#94
post #13

Earlier quoted context omitted.

I've used it to record oscilloscope captures. Especially useful since audio cards are cheap high res adc's.

I'm amazed that consumer-grade audio cards are still available and cheap, to be honest. I can't recall having seen one in years, then again, I haven't had a reason to look for them in years either.

it's a weird market segment. the inside of a computer is not a great place to put a DAC, due to the EMI from all the other components. an audio enthusiast is going to strongly prefer running optical or USB to an external DAC/amp. a non-enthusiast is likely to be happy with whatever comes with their motherboard. it's hard to imagine a scenario that actually makes sense for a high-end audio card, but I'm sure some people buy them anyway.

Re: FLAC 1.4.0 released – added support for 32-bit audio

#95

32-bit integer, not float. I didn't even know 32-bit integer was a thing. Float is far more common. (For audio.)

This does not matter… 32bits is 32bits is 32bits.

It absolutely does matter when the compression algorithm is expecting audio in a certain format. If you put something else in those bits you will get worse, or no, compression, and might as well just use zip.

Re: FLAC 1.4.0 released – added support for 32-bit audio

#96
post #38

Earlier quoted context omitted.

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

32-bit is common in field recordings, like with a Zoom (and there's reason to believe they can legitimately take advantage of it).

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

#97
post #41
post #21

Earlier quoted context omitted.

I made my own encoder and experimented with variable block size (with dynamic programming) plus a massive amount of brute-force search for LPC parameters. But the amount of compression gain I could achieve over libflac was small and not worth the hours of encoding time. https://www.nayuki.io/page/benchmark-of-nayukis-flac-encoder

Sometimes encoding time doesn't matter. Archiving is done once in a lifetime. I encode everything with "--lax -8Vepl32" which takes ages but since it runs as a low priority background task I don't care. Also, you can use heuristics to choose the right blocksize instead of brute-forcing it. If the algorithm is clever enough you might achieve slightly better results at almost zero costs.

Interesting. Do you have numbers to show that variable block size can be done with "almost zero cost" as you said?

Re: FLAC 1.4.0 released – added support for 32-bit audio

#98
post #73

Earlier quoted context omitted.

Audiophiles usually recommend using some better algorithms such as SSRC resampler (foobar2000 have it as plugin handily) than whatever FFMPEG provides. 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.

> 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.

> artifact-free resampling definitely isn't a straightforward thing.

It definitely isn't in general sense. Thankfully, limitations of human range of hearing (20Hz-20KHz, < 100db dynamic range) make the limitations non-issue, except for people who claim they can hear ultrasonic frequencies or can hear Cymbals when played with over 124db of dynamic range.

Re: FLAC 1.4.0 released – added support for 32-bit audio

#99

Earlier quoted context omitted.

ffmpeg can downsample audio to a more manageable rate. I use it to reduce hi-res flacs to 16-48, which cuts it down to a ~third of its original size and is supported in my car stereo and everywhere else. Can't tell any difference on playback.

Audiophiles usually recommend using some better algorithms such as SSRC resampler (foobar2000 have it as plugin handily) than whatever FFMPEG provides. 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.

When you scale a 24 bit number to a 16 and halve rate from 96 to 48, the calculations are easy as pi. Not like we’re running them thru jpeg twice. Like taking an average, scaling down from 20x more quality that can be sensed to 2x more quality that can be sensed.

Re: FLAC 1.4.0 released – added support for 32-bit audio

#100
post #5

Earlier quoted context omitted.

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

> 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…

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.

Post reply on HN