• SONAR
  • Vid for flac v. wave null test using Sonar
2017/01/09 19:03:27
gswitz
The reason for this video was I asserted in a thread about bit depth that I had experienced a difference and so I just skipped FLAC.
 
Bit asserts here that they should be the same or maybe my null test wasn't good.
http://forum.cakewalk.com/FindPost/3541386
 
So, I attempted to make a video of the null test showing the exported wave zeros to the original wave where the exported flac does not.
https://youtu.be/mht-gyi9IM4
 
2017/01/09 19:27:18
gswitz
It occurred to me that maybe the clips might be offset by a sample, but they are identical in starting point and length.
140:03:516
 
I can't say why the Flac doesn't null to the wave.
2017/01/09 23:50:54
rabeach
lossless compression means the original information is retrievable. flac files and wave files will not null. flac files are compressed files. you have to decompress a flac file to return it to a wave file, which should null with the original. i do not believe sonar decompresses the file when it is imported.
2017/01/09 23:58:04
bitflipper
Great job on the demo, Geoff. I still maintain the differences are due to the test or the test environment, not the flac encoding. But what exactly that might be beats the heck outa me. 
 
The reason I'm confident that any differences are not an artifact of the encoding is that the flac encoder actually generates an md5 hash from the original file. That hash is stored in the flac file so that when it's subsequently decoded it can be compared against the original. They have to match. Any encoder that can't do that is a flawed implementation of the algorithm. Hashes can't lie. It's the same basic mechanism that assures your network packets arrive intact, guarantees your disk data isn't corrupt and that you've entered a correct password. If just one single bit is askew in a 100 MB file, that error will be revealed when the hashes don't match.
 
One thing you could do is verify that the two imported files are lined up perfectly. You'll need to find a clearly visible transient in the file - maybe record a clave click - and then zoom in to the individual sample level. I don't know for certain that SONAR can even do that reliably. Something like Adobe Audition should be able to do it if SONAR can't.
 
It's hard to see in your video, but it looks to me as though the difference waveform is a series of large, abrupt level changes. I'd like to see that zoomed in and scaled to full screen. Abrupt changes are not what you see when you do this kind of test with an MP3 or AAC, where you expect easily audible differences to be found. In those cases, you can clearly hear elements of the original file in the difference file. Not random noise. (If you have Ozone Advanced, it conveniently has this feature built in. Unfortunately, only for MP3 and AAC, not lossless codecs.)
 
 
2017/01/10 00:14:56
soens
Huh???!!?!
2017/01/10 08:07:22
gswitz
Bit,

It looks like the differences are one bit exactly, plus or minus. So, the waves go all the way up or down, flatten then return.

It isn't random. I can hear the song in it.

You can see that the differences correlate to when the signal in the song is stronger. There are less likely to be differences at the quiet moments.

Flac may be lossless properly implemented, I don't argue this. Sonar's implementation of Flac is not working properly if my test is valid.

Further, I checked the clip properties and the start times and lengths were identical. The problem is with the Flac encoding or decoding, not clip alignment.
2017/01/10 11:54:47
brundlefly
I'm not exactly sure where it went wrong in the video, but I just did a quick test and an imported FLAC nulled perfectly with the original WAV file in the project. The normalized bounce or the two was a perfect flatline.
 
Three keys I can think of to avoid introducing unintended differences:
 
- Pre-create your null bounce target track, and set outputs of all tracks direct to hardware Main Outs.
- When you export, set source = Tracks.
- Make sure your Import and Render bit depths are both 24 under Preferences > File > Audio Data.
 
EDIT: Also, when you bounce to the nulling track, set Source = Main Outs. 'Entire Mix' includes all other hardware outs on your interface, which could be problematic.
2017/01/10 12:09:57
John
I've been moving toward flac for awhile now. I'm very glad to read this thread.
2017/01/10 12:33:29
Sheanes
great video !! 
can only think the export dialog for the FLAC  'signed 24pcm'  could cause a difference somehow if that causes some bit depth change or simular.
could not do a test as my X3 somehow won't export to Flac.
again, great video and report !
2017/01/10 12:43:33
brundlefly
I don't think FLAC export was supported until Platinum. I did everything at 48kHz, 24-bit in my test, using the 'Signed 24-bit PCM' option for the export to FLAC, and it nulled perfectly.
12
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account