Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: wav 32bit fixed-point to FLAC (Read 908 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

wav 32bit fixed-point to FLAC

Hi!
Can someone explain me how to convert .wav files 48kHz, 32-bit (fixed-point) 3072kbps PCM-codec to FLAC? When im trying to do it with foobar2000 (as i did it millions times) there is a message pop-up with next lines
Quote
"Transcode Warning: Due to technical limitations, the requested convesation will NOT be lossless, as the source format does not fit in 32-bit float. Are you sure?"
So how should i convert these files?

Re: wav 32bit fixed-point to FLAC

Reply #1
If you even think you need it, use WavPack instead.

Although the FLAC format is specified to be able to handle 32-bit integer, the reference FLAC implementation does not support it - neither to encode nor to decode. So you will have to use some third-party implementation ... does ffmpeg handle it, anyone?
I am not up-to-date, but see this old thread.  https://hydrogenaud.io/index.php?topic=83520.0



High Voltage socket-nose-avatar

Re: wav 32bit fixed-point to FLAC

Reply #2
Also foobar2000 doesn't support 32-bit integer (aka fixed-point) PCM.

Re: wav 32bit fixed-point to FLAC

Reply #3
Don't expect significant compression ratio with high bit depths. Probably leave the file as it is, or use WavPack if you need good tagging.

Re: wav 32bit fixed-point to FLAC

Reply #4
Please provide one scientifically valid reason why 32bit fixedpoint PCM should be used or supported and I will investigate how to get it working properly for fb2k 2.0.
It seems to me like once I raise the bar (heh), soon people will want 64bit and 128bit, which are just as pointless.
We are the bork. Your software bugs will be added to our own. Resistance is futile.

Re: wav 32bit fixed-point to FLAC

Reply #5
... it's not about playback. It has been told a million times and people seems to not want to listen to it.

All DAWs in the world work with 32 bit files, whether people like it or not. And it's not about magical listening differences, but reducing artifacts if further editing the files on the future. So 32 bits is used for archival of production files. Many people here use foobar too, and the ability to batch convert those files to a reasonable format for playback would be useful. The same for tagging, preview listening, etc. Not having to use a DAW for that is QoL change.

That's why wavpack allows 32 bits (it makes no sense to archive file in .wav when you can compress them). It's not about raising the bar to 256 bits or 1024 bits... It's about giving support to bit depths used in the real world and making our lifes easier. If you don't want to support it is your choice (and it's ok), but let's stop the -anti-audiophile- (*) discussion of those bit depths not being "useful" in the real world... because they are. Real world is not only about listening (and I think we are at a point where foobar has gone farther than being just a player: tagger, converter, file management, etc.).

Flac has chosen the same path and it has been clearly a poor choice. 2021 and you still have to save production files as wav (or wav-pack) because the reference encoder/decoder of the most extended lossless format on the world doesn't allow 32 bit files. A joke. But all DAWs in the world save the files in 32 bits by default. The joke becomes even bigger. We are wasting disk space just for the joy of wasting it.

(*) Because that's the only real reason we still have this discussion. People continue arguing about those bit depths being useful or not for listening, and that's not the point at all. But some "scientific" users are so focused on that question that totally forgot audio is not only the listening experience of the 'final user'. There are tons of users who also record, produce music, etc.

Re: wav 32bit fixed-point to FLAC

Reply #6
@regor, are 32-bit integer widespread at all?
32-bit float is at least float, so they have a mission in life.

(Also, from what I understand, 32-bit float - like DSD - should be converted using WavPack standalone rather than foobar2000.)
High Voltage socket-nose-avatar

Re: wav 32bit fixed-point to FLAC

Reply #7
Let me clarify.

foobar2000 uses 32-bit floating-point as its internal data format.
All audio is converted to 32-bit floating-point when decoding.
24-bit fixed-point and 32-bit floating-point can be transferred losslessly.
Unfortunately, least significant bits of 32-bit fixed-point get lost when converting to 32-bit floating-point and back.
I don't consider this much of an issue because theoretical dynamic range of 24-bit is already overkill. However, to stop people from complaining about unsignaled data loss, warnings have been introduced when converting 32-bit fixed-point.
foobar2000 can PLAY 32-bit fixed-point just fine, unless you consider lossless delivery of full 32bit stream (rather than most significant 24bit part of it) to your audio device to be critical.
Conversion of 32-bit floating-point IS LOSSLESS, foobar2000 is more than happy to read and write it, not having to convert to an internal format and back.

I don't understand why pro audio software isn't using 32-bit floating-point as an intermediate format, it has practically infinite dynamic range and doesn't suffer from clipping.

Using fixed-point instead of floating-point gives no performance advantage, quite the opposite (no need for clipping when applying gain).
We are the bork. Your software bugs will be added to our own. Resistance is futile.

Re: wav 32bit fixed-point to FLAC

Reply #8
Addendum

With the increased pressure to make a 64-bit version of foobar2000, I will be eventually releasing a new version that's not ABI-compatible with the current components.
At that point, I can also address the above, by using 64-bit floating-point for internal data format. (Yes, changing the data format means breaking all components.)
However, I don't find the current arguments convincing, sounds like whatever software writes the offending files should be configured to use already-well-supported 32-bit floating-point instead.
We are the bork. Your software bugs will be added to our own. Resistance is futile.

Re: wav 32bit fixed-point to FLAC

Reply #9
Quote
@regor, are 32-bit integer widespread at all?
32-bit float is at least float, so they have a mission in life.

(Also, from what I understand, 32-bit float - like DSD - should be converted using WavPack standalone rather than foobar2000.)
I do agree the 32 bit float vs integer thing is stupid though.... They should have settled into one of them and done...

But I can see how it's useful to support both within foobar, at least for conversion (and dither for playback). The same for dsd. And obviously the 'main' problem here is flac not supporting either, totally nonsense. And I would say one of the main reasons dsd is being used for "archiving" purposes by big labels, another "great" idea.

Going 64 bits for foobar means breaking many things but hopefully most components can be rewritten for it and we can finally look into the future. And here we got another reason to release the source code (for the components)... many would not be forced to die now.

Re: wav 32bit fixed-point to FLAC

Reply #10
Quote
@regor, are 32-bit integer widespread at all?
32-bit float is at least float, so they have a mission in life.

(Also, from what I understand, 32-bit float - like DSD - should be converted using WavPack standalone rather than foobar2000.)
I do agree the 32 bit float vs integer thing is stupid though.... They should have settled into one of them and done...

But I can see how it's useful to support both within foobar, at least for conversion (and dither for playback). The same for dsd. And obviously the 'main' problem here is flac not supporting either, totally nonsense. And I would say one of the main reasons dsd is being used for "archiving" purposes by big labels, another "great" idea.

Going 64 bits for foobar means breaking many things but hopefully most components can be rewritten for it and we can finally look into the future. And here we got another reason to release the source code (for the components)... many would not be forced to die now.

foobar2000 will go from being the swiss army knife of useful audio player applications to something that you need to have a separate 32-bit install for a very long time and 64-bit version you barely want to use for a long time.

Re: wav 32bit fixed-point to FLAC

Reply #11
There is of course one reason to "support" it, and that is not to break the "lossless is lossless" maxime.

But for that purpose, refusing to do the worst oddballs and throwing an error box for this thing - that is just fine. The box could of course as a service to users have identified the 32-bit integer and said "Try WavPack from the command line." And given that it identifies 32-bit integer, the box could very well also have said "(And tell whoever created this to use a less stupid format.)" At least beta versions users should be fine with such insults.
High Voltage socket-nose-avatar

Re: wav 32bit fixed-point to FLAC

Reply #12
foobar2000 will go from being the swiss army knife of useful audio player applications to something that you need to have a separate 32-bit install for a very long time and 64-bit version you barely want to use for a long time.
Agreed.  :(
And given that it identifies 32-bit integer, the box could very well also have said "(And tell whoever created this to use a less stupid format.)"
Agreed  :))

Re: wav 32bit fixed-point to FLAC

Reply #13
BTW, reminder that 32-bit float isn't always the piece of cake either .... See this post #6.  If @bennetng feels the days are filled with too much leisure and too little work, maybe there will be a version that can detect the integer format(s?) too.
High Voltage socket-nose-avatar

Re: wav 32bit fixed-point to FLAC

Reply #14
BTW, reminder that 32-bit float isn't always the piece of cake either .... See this post #6.  If @bennetng feels the days are filled with too much leisure and too little work, maybe there will be a version that can detect the integer format(s?) too.
My software (oldsCool) can detect int32 files. It assumes type 1 32-bit files as float unless it found something abnormal: Infinity, NaN or extremely high (over 6xx dBFS) sample values. Most (all?) int32 files in my PC were generated by SoX:
https://hydrogenaud.io/index.php?topic=101850.0
https://www.audiosciencereview.com/forum/index.php?threads/help-needed-compiling-sox-linux-solved.19786/post-649993

SoX does support lossless int32 WavPack, but lossy (and prone to clipping) for float, and no DSD support.

Re: wav 32bit fixed-point to FLAC

Reply #15
Gaaaah ... someone had a bright idea back in the day then.

(sox is thirty years old. I used it quite a lot in my Linux-on-desktop days, so, mildly disappointed over an old acquaintance being that stupid. Allegedly it supports 32-bit integer and 64-bit float ....)
High Voltage socket-nose-avatar

Re: wav 32bit fixed-point to FLAC

Reply #16
Gaaaah ... someone had a bright idea back in the day then.

(sox is thirty years old. I used it quite a lot in my Linux-on-desktop days, so, mildly disappointed over an old acquaintance being that stupid. Allegedly it supports 32-bit integer and 64-bit float ....)
Perhaps SoX was born in the era that CPUs' built-in FPUs were slow or didn't even had built-in FPUs?

Anyway... Reaper supports lossless import and export up to 64-bit float, Audacity is lossy beyond 32-bit float but able to handle int32 and float64 files in lossy ways like foobar. Audition is also lossy beyond 32-bit float, don't know about the latest Adobe CC versions, but at least it is true in the older versions I have. For these float32 DAWs exporting to int32 is actually lossy! Only special DAWs like the old (early 2000s), fixed-point hardware-based Pro Tools TDM used integer as internal format: 24-bit for external link and 48-bit processing precision with 8 guard bits for clipping prevention, so 56 fixed bits for a measly 24-bit data chain (source). The newer Pro Tools HDX uses 32/64-bit float already (source). So for those who strive for the "industry standard" in this era, 64-bit float is the way to go, even WavPack doesn't support it. Also a bit off-topic, those so-called 32-bit DACs nowadays only use 24-bit filter coefficients, people are being scammed! :))
X

For foobar, I care more about plugin compatibility, what if kode54 don't update all of his game music plugins? I lost foo_midi already, can't afford more loss.

Re: wav 32bit fixed-point to FLAC

Reply #17
Perhaps SoX was born in the era that CPUs' built-in FPUs were slow or didn't even had built-in FPUs?
If I understand correctly, the ability to handle 32-bits at all was introduced much later, and if so, "born" is not an excuse.

Also a bit off-topic, those so-called 32-bit DACs nowadays only use 24-bit filter coefficients, people are being scammed! :))

32-bit means:
 * is able to receive and immediately trash the last eight bits
 * will naturally dither away a few more in the conversion (measurements from Archimago)
 * so in the end you can take pleasure in the sound of your lightbulb while you are playing at pain threshold ... and not to mention, revel in the placebo effect over the eleven or twelve more bits that are printed on the outside of the device (and take up most of the hard drive space)

OH(DCD) JOY!
High Voltage socket-nose-avatar

Re: wav 32bit fixed-point to FLAC

Reply #18
If I understand correctly, the ability to handle 32-bits at all was introduced much later, and if so, "born" is not an excuse.
I see. I am not a long time SoX user so don't know about this history.

Re: wav 32bit fixed-point to FLAC

Reply #19
I don't see how using only 24 bits of precision to store the coefficients, this does not preclude using a larger precision numbers as the intermediate products of multiplication, then adding them together and truncating or possibly rounding them.

Re: wav 32bit fixed-point to FLAC

Reply #20
Few programs of what I have actually support 32-bit integer, that would be Sound Forge (can do basic editing operations on any selected word length), SoX, Center Cut (old tool for upmixing). Integer is a special format for preserving the most accuracy in old tools like SoX and Center Cut that for whatever reason can't handle floating-point.

I'm fine with Foobar not supporting it. Pure command-line encoder front ends exist and can be used for conversion. 32-bit int converted to float would still retain dynamic range in the quietest sections where it matters. Breaking compatibility by changing the internal data format has more negative consequences.

Re: wav 32bit fixed-point to FLAC

Reply #21
I don't see how using only 24 bits of precision to store the coefficients, this does not preclude using a larger precision numbers as the intermediate products of multiplication, then adding them together and truncating or possibly rounding them.
More or less similar ways that the old fixed-point Pro Tools used 56-bit summing as mentioned above. The Envy24 on the other hand only used a 36-bit mixer and 42-bit for some RME products.



 
SimplePortal 1.0.0 RC1 © 2008-2021