Add silence from length

Man I am terrible at explaining. The URLS are screenshots explaining the process in detail. 1 2 3 4 5

I don’t follow. Why do you need to cut down the “original” files? Surely those are the correct length :confused:

Where did your modded files come from? I’m wondering why you have 3000 files that are all the wrong length.
What format are the files? if they are MP3 it may be impossible to make them an “exact” length because length is never exact for MP3 files.

Nah, the original files are the correct length, the modified ones are just sounds of Link from Zelda games, I need to make the modified ones the same length as the original files by generating silence at the end of each of them to match the length of the originals. If this could be automated using audacity. It would help out immensely saving days of doing it manually.

OK, I’m getting the idea now.
You have downloaded a load of modded files from somewhere, tried to put them into your game and found that they don’t work.
You’ve since found out that they need to be 22050 Hz sample rate WAV and that they need to be the exact right length.

Am I right so far?

I very much doubt that they need to be 32-bit float WAV - that would be extremely unusual.

I’d suggest that you download “MediaInfo” from MediaInfo - Download MediaInfo for Microsoft Windows. Get the MediaInfo version without installer, because the installer may have adware. Open one of the original files in MediaInfo and select “Text” (or HTML) from the “View” menu. That will show you detailed information about the file.

Then try making ONE of your modded files match the specification. Pick one that is easy to test in the game. Replace the original version with your edited modded version. Does it work? Keep a note of the exact steps required to make it work - hopefully the steps will be the same for all the other files, then we can look to see how much of the job we can automate.

Aye, those screenshots were from a friend who also made a voicepack, I asked them what their process for doing it was because mine was taking much longer.
Also, I have audacity set to 16 bit pcm (default) so don’t worry. I also tried converting the entire thing into 32bit float because their soundpack worked with it, I was unsuccessful and it just made the sounds sound worse, pretty sure the files just need to be 16bit pcm, 22050hz and the same length as the originals to not retain audio bugs. (at least for voices)

My current process is:

  1. drag and drop original file
  2. drag and drop modded file
  3. generate silence on original file
  4. cut original file from the end of the modded file
  5. copy + paste the modded file into the original file
  6. click the x on the blank file
  7. export

I have a few files I can test out real quick
will report back

Can confirm the right length fixed the audio bugging out. Although I found out that some of my files are actually longer than the originals in which case I faded out about half way through, all the way to the end, to fix the clipping, some of the audio levels are different as well, but I haven’t really used Audacity enough to know how to make them louder.

Didn’t you say that your modded files are stereo and the original files mono? Do stereo files work or do you need to convert them to mono?

They need to be mono

Unless the required length is the same for each file, I don’t think there is any way that you can automate the process.
Converting stereo to mono can be done as a batch process and exporting as WAV can, but changing the sample rate can’t and adjusting the length to match another file can’t.

You can use the Normalize effect to make all of the files have the same peak level, but I’m not sure how much that will help as the same peak level (maximum amplitude) does not mean that they will sound the same “loudness”. I think the best you can do is to “get in the flow”, and streamline your way of working as you go. Yes it will take time, but I don’t see any way round that.

Well it’ll keep me out of trouble at least.

EDIT: But automating that process is possible?? There’s not many of the modded files that are longer, most of them are shorter, and the ones that aren’t I can find and edit manually later. Normalizing is also making the files louder. I’ve already converted the files to the same frequency, rate, and format. It’s just this part that takes forever.

If Normalizing the entire file gives you an acceptable result, create a Chain containing Normalize and an ExportWAV command then apply the Chain to files that are in the same folder.

If Normalize does not make the files equally loud, add the ReplayGain Nyquist plugin to Audacity’s Plug-Ins folder. Then assuming you are using the latest Audacity 2.1.2, open Effect > Add / Remove Plug-ins, select ReplayGain, enable it, then OK. Then add ReplayGain instead of Normalize to the Chain.

See here for how to use that ReplayGain plugin ReplayGain plug-in


Thanks for the tips, but you misunderstand. I need audacity to make files the same length as other files by adding silence to the end of them. So far I mapped keys to help me do it quicker but if it could be automated that would help me out a lot.

Batch processing files can only be performed on one file at a time. There’s no way to import a second file into the project as part of a batch process.

The quickest way that I can think of to extend a file to the same length as a longer file is:

  1. Import the (longer) original file and the (shorter) modded file.
    The files will create two tracks, one above the other.

  2. Double click on the original file to select it.
    The original file is selected, the modded file isn’t selected.

  3. Press Ctrl+L
    The original file is silenced.

  4. Export to create a new modded file.

    Tip: If you’ve not already done so, you can prevent the Metadata Editor from popping up in Preferences: This does NOT prevent metadata being written to the exported file, it just stops the editor from popping up.

That’s actually brilliant.
I was opening the original files, dragging + dropping the new file in, adding silence to it, copying pasting it into the original file, deleting the duplicate and exporting. Your way is much more convenient.

Edit: in fact, if I silenced ALL the original files through a batch process, all I’d need to do is import the new files and export.

Almost as quick to just press Ctrl+L :wink:
Anyway, if you do that, avoid overwriting your originals - good practice for all audio editing is to keep backups of everything.

I’m having trouble with metadata automatically being added, the weird thing is it’s all the same metadata from one track, unlike how it usually adds metadata by the original track name. The original files contain no metadata either so this shouldn’t be happening.

EDIT: it was from adding silence to the original files, added metadata to them, I used some software to remove them all though.

This “feature” has bugged me for years :imp:
There really should be a way to NOT write metadata in exported files, but there isn’t.

Metadata tags are complicated. It’s something that has evolved gradually over time, leading to many different “standards”. Quite often you will find that a file has metadata that shows up in one program, but not in another. A classic example is WAV files, which “appear” to have no metadata in most programs, but show metadata in others (Audacity is one of the few applications that supports metadata tags in WAV files).

An Audacity Project can only have ONE set of metadata at a time. I believe that importing a file always updates the project metadata.

There is a way (in 2.1.2) to not write metadata, which is to press “Clear” in Metadata Editor when it pops up at export. Or if you have hidden Metadata Editor for the export step in Import/Export Preferences, then File > Edit Metadata and press “Clear” before you export.

“Clear” is supposed to write no tags, not just empty tags, but I see this has gone wrong somewhere between 2.1.2 and now (2.1.3 alpha). Pressing Clear in 2.1.3 alpha still writes empty ID3 tags. This applies to ID3 tags in WAV too.



I don’t understand how that helps. For the 3000 files that deafwench needs to export, isn’t it still necessary to either have the Metadata Editor pop-up and “Clear” it 3000 times, or File > Edit Metadata and press “Clear” before you export 3000 times?

Most users probably don’t need to export thousands of files in a row, but over a period of time it is an annoyance for those that don’t want metadata in their exported files. There should be a way to turn off writing metadata to exported files, but there isn’t as far as I can see.

Repetitive exporting is exactly the reason why needs to be fixed.

Just as users don’t want an extra “Clear” step to prevent metadata export, users who do want metadata export in Export Multiple don’t want extra steps. :cry:

So I look forward to your planned “No metadata” checkbox and your fix for bug 551 as extensively discussed. :wink: