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: 32-bit floating-point (WAV) files "in the wild" (Read 7556 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #25
Frog behaviour beats me, could you maybe alert the developer?
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #26
I won't. The author obviously has great knowledge in algorithms and such. For example, 7-Zip, WavPack and Monkey have much poorer compression ratio than ofr.exe for this test file. The author may simply have a different way of thinking than ordinary users.

It is also possible that the version of Audition the author uses showed different result than mine, who knows.

APE developer(s)? completely evaded this issue by not supporting int32 in Cool Edit and Audition. WavPack offers manual override option. In case of false positive BitSort and oldsCool may say the file's max sample value is several hundred dB above full scale and such, so should be pretty easy to notice.

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #27
A "slightly different" question. To identify whether a given 32-bit float signal can be fit into 24 bit (or less) integer with no other loss than a volume normalization - I could read a BitSort log and subtract min from max, but is there any quicker method (or other quicker tool)?
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #28
Knowing the min and max values does not guarantee a file can be losslessly converted to a fixed bit depth because the intermediate values are not shown. The most reliable method is to check every sample. It sounds like a slow operation but in practice still much faster than typically used operations like dither, resample and so on.

The readme file mentioned oldsCool can check if converting a 16.8 or 24.0 file to a normal file is lossy or not, this operation checks all samples, or until it finds the first lossy sample.

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #29
Ah, right. Ruling out isn't ruling in, basic logic blunder. Thx.
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #30
ALAC (requires refalac.exe) support added. Also changed the fallback SoX command to demonstrate the scale factor feature of stat. With -s 256 sample values will be displayed as 24-bit, and -s 65536 for 16-bit and so on. In SoX, max and min amplitude values are signed, while BitSort and oldsCool display max and min absolute values.

I am not confident to correctly explain the meaning of every item displayed by SoX, better check the SoX manual.

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #31
https://hydrogenaud.io/index.php?topic=122263.msg1009279#msg1009279
Real world example that oldsCool shows the HDCD files posted by @koawmfot  only used 17 bits while SoX and Audition showed something else. It is recommended to save the files as flac or 7zip as they are smaller and have built-in error check so that we know the downloaded files are not corrupted.

SoX
Code: [Select]
Input File     : 'E:\download\SW Decode - ffmpeg.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 24-bit
Duration       : 00:00:15.00 = 661500 samples = 1125 CDDA sectors
File Size      : 3.97M
Bit Rate       : 2.12M
Sample Encoding: 24-bit Signed Integer PCM

In:100%  00:00:15.00 [00:00:00.00] Out:662k  [ =====|=====-]        Clip:0
             Overall     Left      Right
DC offset   0.000009  0.000009 -0.000004
Min level  -0.603907 -0.495191 -0.603907
Max level   0.536741  0.536741  0.481397
Pk lev dB      -4.38     -5.40     -4.38
RMS lev dB    -21.43    -21.23    -21.64
RMS Pk dB     -16.77    -16.77    -18.34
RMS Tr dB     -29.31    -29.20    -29.31
Crest factor       -      6.19      7.29
Flat factor     0.00      0.00      0.00
Pk count           2         2         2
Bit-depth      24/24     23/24     24/24
Num samples     662k
Length s      15.000
Scale max   1.000000
Window s       0.050
Done.

Input File     : 'E:\download\SW Decode - CUETools.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 24-bit
Duration       : 00:00:15.00 = 661500 samples = 1125 CDDA sectors
File Size      : 3.97M
Bit Rate       : 2.12M
Sample Encoding: 24-bit Signed Integer PCM

In:100%  00:00:15.00 [00:00:00.00] Out:662k  [ =====|=====-]        Clip:0
             Overall     Left      Right
DC offset   0.000009  0.000009 -0.000004
Min level  -0.603907 -0.495192 -0.603907
Max level   0.536739  0.536739  0.481396
Pk lev dB      -4.38     -5.40     -4.38
RMS lev dB    -21.43    -21.23    -21.64
RMS Pk dB     -16.77    -16.77    -18.34
RMS Tr dB     -29.31    -29.20    -29.31
Crest factor       -      6.19      7.29
Flat factor     0.00      0.00      0.00
Pk count           2         2         2
Bit-depth      20/20     19/20     20/20
Num samples     662k
Length s      15.000
Scale max   1.000000
Window s       0.050
Done.

oldsCool
Code: [Select]
-------------------------------------------------------------------------------
E:\download\SW Decode - ffmpeg.wav
00:00:15 = 1323000 samples / 2-ch @ 44100Hz
24-bit fixed point
Bit    Count            Percent
0      118          0.008919124
8      199           0.01504157
9      426           0.03219955
10     847           0.06402116
11     1730           0.1307634
12     3303           0.2496599
13     6834           0.5165533
14     13527           1.022449
15     27112           2.049282
16     54488           4.118518
17     107067          8.092744
18     205345          15.52116
19     346154          26.16432
20     382560           28.9161
21     161670          12.21995
22     11612          0.8777022
23     8           0.0006046863
-------------------------------------------------------------------------------
E:\download\SW Decode - CUETools.wav
00:00:15 = 1323000 samples / 2-ch @ 44100Hz
24-bit fixed point
Bit    Count            Percent
0      118          0.008919124
8      199           0.01504157
9      426           0.03219955
10     847           0.06402116
11     1730           0.1307634
12     3303           0.2496599
13     6834           0.5165533
14     13527           1.022449
15     27112           2.049282
16     54488           4.118518
17     107067          8.092744
18     205345          15.52116
19     346154          26.16432
20     382560           28.9161
21     161670          12.21995
22     11612          0.8777022
23     8           0.0006046863
-------------------------------------------------------------------------------
.WAV file(s) processed: 2

To identify whether a given 32-bit float signal can be fit into 24 bit (or less) integer with no other loss than a volume normalization
I am thinking about adding this check, as well as other things like more advanced wBitsPerSample analysis and such. I upgraded my PC and still don't have Visual Studio and other stuff installed so it may take some time.

Re: 32-bit floating-point (WAV) files "in the wild"

Reply #32
1.0.0.2
  • Combined BitSort and oldsCool into one executable.
  • Added action "LSB Trim".
  • Added signed max and min values in float reports.
  • Shows available actions at end of reports.
  • Uses advanced parsing rules to find nonstandard and malformed files.
  • Always update progress in console without speed penalty.
  • Fixed incorrect length report with some types of files.
  • oldsCool will enter read-only mode without prompt.

Download link:
https://1drv.ms/u/s!AvzB71jO7t0-gYwnoZKDu2Dr3TrAiQ?e=OnUhXp
SHA256:
8d82b8c79ec2ac85825fcc0ad03f6666ed19fdbfdc0f4beb7230c203cc465684

The CMD scripts attached in older posts are not compatible with BitSort 1.0.0.2, use the scripts included in the archive above. Other details are included in the updated readme file.