Page 1 of 1

Exporting as Wav = Distortion?

Posted: Wed Feb 24, 2010 3:23 am
by L. Spiro
Windows XP 32 Bits (and Windows 7 64 Bits, but not for recording)
Core i7 975 Quad Core @ 3.33GHz
12 GB DDR3 RAM
2 TB Hard Drive
Sound Card #1: Sound Blaster X-Fi Titanium Fatal1ty Championship Series
Sound Card #2: [email protected] Professional Audio
ATI Radeon HD 5970 ×2 Crossfire

This problem occurs on all modern versions of Audacity.

// ==
I record with perfect digital quality usually with Audacity.
For example, at the start of the recording there is some silence, and the recording in Audacity reflects the perfect nature of this silence, filling the start of the sound with 0’s.
To verify, in Audacity, that this region is really 100% silence, I can select the area and use the Amplify tool, which shows a “1.$” (the result of division by 0). If there is even a tiny bit of noise, this will be a very large (but valid) number. I can also use the Generate Silence tool to get the same results.

I save this to a 16-bit PCM .wav file.
I check the file in a hex editor and find that it did not store perfect silence at the start of the file. There are little 1’s and -1’s everywhere where there should be just 0’s. This is too small to be audible, but it is corruption of the data.

// ==
As another test, I saved the project as a whole, without exporting to .wav.
I reloaded the project and the same happened. Before saving, I could select the silent area at the start and the Amplify tool generates 1.$ as a result of division by 0 (since the largest wave there was 0).
After re-opening, I select the same area (using the snap feature to be SURE I am selecting the same exact bytes) and the Amplify tool generates 160.0 Db (or so). Meaning that the largest wave was NOT 0 for some reason (but was very small).

// ==
So I recorded using Wavosaur. The recording was once again perfect with pure silence at the start.
I saved that as a .wav. Viewed in hex editor. The results were as I expected. The starting silence was just a long row of 0’s as it should be.
I then imported that file into Audacity and exported again back to .wav without modifying it. Viewed in hex editor. Again the file was corrupted with 1’s and -1’s instead of just a bunch of 0’s.
Also of note is that I could tell the file was already corrupted during the import process because selecting the silenced region at the start and using the Amplify tool did not generate a 1.$ as it would have if the beginning was just a row of 0’s.


Apparently Audacity is running some kind of filter over the wav files as it exports and imports them. Is there any way to disable this?


Thank you,
L. Spiro

Re: Exporting as Wav = Distortion?

Posted: Wed Feb 24, 2010 3:55 am
by kozikowski
<<<Apparently Audacity is running some kind of filter over the wav files as it exports and imports them. >>>

You could say that. What's it's actually doing is converting everything to 32-bit floating and then back. And no, you're not the first person to notice that. I'm looking for for the earlier threads.

Before you rise up in indignation, you probably missed that Audacity isn't a WAV editor. It's an Editorial Production Environment Manager. That's why Audacity will not Save a sound file. It's saves Projects -- Environments. To get a sound file you have to Export one, in effect, convert what Audacity is doing back into a sound file for the outside world.

I'm looking.

Koz

Re: Exporting as Wav = Distortion?

Posted: Wed Feb 24, 2010 4:05 am
by kozikowski

Re: Exporting as Wav = Distortion?

Posted: Wed Feb 24, 2010 4:10 am
by kozikowski
Here's a related thread about 32-bit execution.

http://forum.audacityteam.org/viewtopic ... 87&start=0

Koz

Re: Exporting as Wav = Distortion?

Posted: Wed Feb 24, 2010 6:06 am
by L. Spiro
I know it is not specifically a WAV editor; its implementations are plug-in based (as far as I can tell) so its core functionality is intended to be more generalized and then specialized through add-ons.

So in fact I am not even sure this is really an issue with Audacity as much as the plug-in/add-on it uses to open WAV files. But the fact that it can not save its own project files without this distortion leads me to seek help here.


As per the end of your first link, maybe I need to try saving as 32-bit PCM. It may work in my toolchain.


I prefer to work entirely with Audacity to avoid build-up of hiss.
I have some equalization settings stored in Audacity that I can not easily port to Wavosaur or Free Audio Editor. So for consistency I always need to do the final tweaking in Audacity.
If I record in another software and save as 16-bit PCM, the precision will be lost and amplifying after that conversion generates noticeable noise. Wavosaur does not store the audio as floating-point internally as far as I can tell because amplifying from there also generates larger hiss.


I will try 32-bit PCM when I get home. Thank you.


L. Spiro

Re: Exporting as Wav = Distortion?

Posted: Wed Feb 24, 2010 10:16 am
by waxcylinder
If you have Audacity set to 32-bit float and you export to 32-bit WAV or save the Audacity Project - then you should not get any dithering applied. Dithering is normally only applied on downsampling e.g. working in 32-bit and then downsampling to 16-bit PCM WAV on export.

There are a couple of Preferences settings to control the dithereing - go to Edit > Preferences > Quality. I have my real-time coversion set to "none" and my Hiqh Quality Conversion set to "Triangualr" (for export downsampling). See this page in the 1.3/2.0 manual that is under development: http://manual.audacityteam.org/index.ph ... references

See this article in the Wiki for a bit more info: http://wiki.audacityteam.org/wiki/Dither

BTW I would strongly recommend that you upgrade to 1.3.11 - although it is labelled as Beta it is in fact pretty stable by now and often more stable than 1.2.x on more modern platforms.

WC