Export Selected function problem


Excuse the anger, I will try to contain my choice of words within whats reasonable.
I have a complaint about the “Export Selected” and also the general Export function:

When I edit an audio file, I edit it to perfection. When I export the audio file, I EXPECT to export the audio EXACTLY the way I edited it. This is unfortunately not the case. For some reason Audacity likes to add silences to the beginning of the audio file. Even when using the export selected function it still DOES NOT export EXACTLY what I selected.

Now you could say things like “audacity detects a user error as the audio file does not start from silence thus possibly generating a plop at the start of the sound”. Well, if that were the case, I could add a small fade in myself easily enough with Audacity. However in my case my point was to create a simple SFX loop that I need (a machinegun firing loop which has to loop perfectly for a video game I’m making). It seems simply impossible to export exactly what I have in my project file. In audacity the loop sounds perfect (and looks), however when exported it is visibly and audibly changed from what was in my project. I’ll add a screenshot as proof.

Unfortunately this means I now have to boot up my macbook and do it in Logic Pro. I use audacity to do quick and dirty audio editing every now and then (where I don’t feel like waiting for my laptop and logic pro to boot up), but this exporting issue just baffles me.

I believe the upcoming 2.1.3 doesn’t have leading zero problems. You can get around this in the current version by creating a silent track in addition to your work. The silent track should be longer than your work and the end cut to length when you reach final edit. The silent track will vanish but preserve any leading silences in the show.

Also, if you export the work as MP3, you may not get accurate timing. MP3 is notorious for sloppy file exports. Never do production in MP3.


I’m guessing it’s user error.
Are you exporting in a lossless format (such as WAV), or a lossy format that does not define the encoder delay (such as MP3)?

One of the limitations of the MP3 format (and some other lossy encoding formats) is that a small amount of padding is added to the start/end of the tracks, but the precise amount is not defined. Note that this is a limitation of the format, not a limitation due to Audacity.

From Wikipedia:

Lossy audio compression schemes that are based on overlapping time/frequency transforms add a small amount of padding silence to the beginning and end of each track. These silences increase the playtime of the compressed audio data.[1] If not trimmed off upon playback, the two silences played consecutively over a track boundary will appear as a pause in the original audio content. Lossless formats are not prone to this problem.

For some audio formats (e.g. Ogg Vorbis), where the start and end are precisely defined, the padding is implicitly trimmed off in the decoding process. Other formats may require extra metadata for the player to achieve the same. The popular MP3 format defines no way to record the amount of delay or padding for later removal.

The solution is to use a lossless format for the export (such as WAV), or if you must use a lossy format, use one that defines the encoder delay (such as Ogg).

I indeed used MP3 as export format. I haven’t tried WAV yet (fully lossless) but when I do this on Logic Pro, it will first bounce as a WAV and then convert the file to .MP3, leaving zero “sloppiness”. Perhaps this is something to look into as for future updates?

Please see this link: http://lame.sourceforge.net/tech-FAQ.txt.