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: Monkey's Audio Adds 32-bit Float Support (Read 7362 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #25
Resaved using Reaper, trial version is free. All attached files and your original 1sec.rf64.wav can be played in MPC-HC without issue and in correct duration.
https://github.com/clsid2/mpc-hc/releases

SoX's stats command also reported the duration of 1sec.rf64.wav correctly.


Re: Monkey's Audio Adds 32-bit Float Support

Reply #27
I was still using this for my float test:
(m_wfeInput.wFormatTag == WAVE_FORMAT_IEEE_FLOAT)

But the input format is just extended with a float marker.

So I needed to store the float state as a separate variable.

Thanks again.


Re: Monkey's Audio Adds 32-bit Float Support

Reply #29
reaper-bw64.wav has BW64 for the WAV RIFF header.  If I let that pass it compresses and decompresses to the same.

But I'm not sure if there are other changes I would need to handle in that case so am a little reticent to change.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #30
reaper-wave64.wav is actually a W64 file.  If I use that encoder it processes fine.

Should I assume that any WAV file with "riff" for the header (instead of "RIFF") is W64?  Today I'm looking at the extension.

Thanks.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #31
I've got all three files compressing and decompressing nicely.  Thanks for the help!  I'll put out a new build eventually.



Re: Monkey's Audio Adds 32-bit Float Support

Reply #34
BW64 seems rather young, this link has specs:
https://www.itu.int/rec/R-REC-BS.2088/en

Wave64: All I can find are scattered information instead of official specs from the inventor (Sonic Foundry or Sony).

Re: Monkey's Audio Adds 32-bit Float Support

Reply #35
Oops, BW64 isn't a straight extension of RF64, no. My bad. And whoever updated https://en.wikipedia.org/wiki/RF64 (t'wasn't me!)

BW64 files even start with "BW64" rather than "RIFF", so no wonder they aren't recognized until they are specifically supported.
Mote, WAVE_FORMAT_IEEE_FLOAT is at present not implemented. Hm. And WAVE_FORMAT_EXTENSIBLE shouldn't be - the channel allocation data are supposed to be represented differently.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #36
Updated one more time to always open with a buffer reader.  That way pipes should still work even with the header checking.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #37
A quick look in a hex editor I can see that 1sec.rf64.wav has some issues (indicated chunk sizes not matching actual data length) even though some apps can still parse the file without issue.

Preserving the structure of a potentially problematic file is a two-edged sword. Advantages are there is no need to study how any unknown non-audio data in a file works, there is no risk to further mess up things if the whole file is preserved. Of course, disadvantage is compatibility issues with other software.

Ideally, this should be fixed on the software that created the input file. When it is not possible, the encoder can show warnings but keep the whole file intact, or ask user for permission to apply a fix during decoding.

The comments above are not specific to any software involved (APE, foobar2000, ffmpeg, WavPack), just to express some of my opinions.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #38
https://www.monkeysaudio.com/files/MAC_1033_x64.exe
Code: [Select]
E:\download>mac 1sec.rf64.wav 1sec.ape -c1000
--- Monkey's Audio Console Front End (v 10.33) (c) Matthew T. Ashland ---
Compressing (fast)...
Progress: 100.0% (0.0 seconds remaining, 0.0 seconds total)
Success

E:\download>mac 1sec.ape 1sec.wav -d
--- Monkey's Audio Console Front End (v 10.33) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 0.0 seconds total)
Success
The resulting .wav file is unusable.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #39
Thanks.  Reading the header then seeking back is causing the reader to reset incorrectly.  I'll need to think for a little while.




Re: Monkey's Audio Adds 32-bit Float Support

Reply #43
And one more update because AIFF files required seeking so I had to implement it.  Thanks again.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #44
What started this whole procedure was someone posted a W64 file named WAV.  I was only finding them if they were named W64.

Then I tried WavPack and it figured it out nicely.

I thought I should try to be smart like WavPack.

Reading the header was causing some of the buffering readers (needed for pipe support) to fail.

So I needed to make a new reader that reads the header but makes everything else still work.

It's taken some back and forth, but hopefully it's pretty good now.

Thanks again for the help.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #45
1sec.rf64.wav has some issues

[...]

Ideally, this should be fixed on the software that created the input file.

*sighs*

Given what created it ... any volunteers to report the misery?
X

Not so fast! Devil details from the official RF64 specs:
X

foobar seems to use dwSampleLength in RIFF fact chunk to deduce file duration.
X

So foobar and other software that fail to read 1sec.rf64.wav should use the info on the ds64 chunk. @Peter ?

Re: Monkey's Audio Adds 32-bit Float Support

Reply #46
the official RF64 specs:

EBU3306 is "effectively superseded". Quoting from https://tech.ebu.ch/publications/tech3306 :
"EBU Tech 3306 was a major source for Recommendation ITU-R BS.2088, which has effectively superseded the EBU specification. This final, version 2 is therefore a pointer document to the ITU specification. The EBU will no longer develop Tech 3306. Previous versions are available below."

The "final" EBU3306 is just two pages concluding as follows:
"To avoid any confusion and duplication of standardisation effort resulting from there being two
separate specifications of the 64-bit audio file format the EBU has decided that Recommendation
ITU-R BS.2088 should exclusively be used."
... and then comes up with a link that is no longer available, but which can be found at http://web.archive.org/web/20171203032244/https://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.2088-0-201510-I!!PDF-E.pdf

However, this document effectively kills RF64 and prescribes BW64 instead?! Already in that 2015 version yes, so BW64 is apparently not that new.
Updated version here: https://www.itu.int/rec/R-REC-BS.2088-1-201910-I

Some changes compared to the above RF64 spec:



EBU's BW64 lib on Github: https://github.com/ebu/libbw64

Re: Monkey's Audio Adds 32-bit Float Support

Reply #47
Both RF64 and BW64 can use the capitalized "RIFF" header when file size is smaller than 4GB, it is mentioned on page 6 of this document:
https://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.2088-1-201910-I!!PDF-E.pdf
However, when "RF64" or "BW64" header is being used, the rules to use data on the ds64 chunk vs RIFF chunk are the same. So, even if the ffmpeg-created file starts with "BW64", the rules are no different.

Attached a BW64 file using the "RIFF" header, apart from an additional "junk" chunk as a placeholder of the "ds64" chunk, it is no different from legacy RIFF WAVE file. RF64 uses the same treatment as well.

Also attached an RF64 file using the "RIFF" header with BWF data "bext" chunk.

Re: Monkey's Audio Adds 32-bit Float Support

Reply #48
https://www.soundsonline.com/pianos-and-keyboards/pianos

This one has a "Fake" chunk and in 32-bit float.
2230_Litolff Scherzo Steinway.wav

Other files have "JUNK" right after "WAVE", but in 24-bit.

To stay on topic, yes, the recent version of mac.exe handles these files correctly.

[edit]
Click the VIEW ALL DEMO button I found other 32-bit float files with "Fake" chunk as well:
2231_Grieg Pianoconcert A-min Bosendorfer.wav
2232_Benda Pianoconcert G Maj Bechstein.wav
2233_Prokofiev Pianoconcert Yamaha.wav