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: Merge two audio files (ADX extension) (Read 3096 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Merge two audio files (ADX extension)

Hello everyone,

I have two ADX files from a game, vocals and instruments, of the same song. They are 48 Khz/16 Bit Depth.
Importing both in Audacity, I only cut the last part of the vocals (silence only), and then export them into a single file.

What's the best way to do it?
Is FLAC the recommended way to save them to preserve quality, even with a doubled file size, or should I just use MP3 or another lossy format? Should I use Dither as well?

Thanks for reading.

Re: Merge two audio files (ADX extension)

Reply #1
What format do you usually listen to?

FLAC is often the best format.  It's lossless, compressed to almost half the size as WAV, and tagging (metadata) is better supported than WAV.   The only downside is that not every computer will play it without installing a CODEC.   You may want to save a FLAC archive even if you want to listen to an MP3 version.

MP3 (or AAC) can often be transparent (sound identical to the original) so there's nothing wrong with choosing it.

Quote
Should I use Dither as well?
Dither is for downsampling the bit depth.   But, dither (or the effects of dither) are not audible at 16-bits or more under any reasonable conditions so in reality it doesn't matter one way or the other.

What you should look out for is clipping.   Mixing is done by addition (summation) so you can get clipping.    If you get clipping, or if you're not sure, run Amplify or Normalize after mixing and before exporting.   Audacity uses floating-point internally/temporarily so it can go over 0dB, but normal WAV or FLAC files are hard-limited to 0dB and you can get clipping when you export.    If you have peaks over 0dB, Amplify  will default to whatever negative dB gain (attenuation) that's required to bring the peaks down to 0dB.

 

Re: Merge two audio files (ADX extension)

Reply #2
ADX is a lossy ADPCM format, and decodes to 16 bits per sample. No need to use dithering when mixing them, but I would advise using whatever lossless format you want as an intermediate format, and possibly use something like VGAudio to encode it to either ADX again, or HCA.

If you turn off looping in VGMStream before converting them to WAV, mix them, then encode the resulting mix to ADX or HCA with the correct loop offsets, you can have a looping track with minimal fuss. Or you could look up on hcs64.com how to tag an Ogg Vorbis track with loop info, and rename it to .logg for VGMStream.

Re: Merge two audio files (ADX extension)

Reply #3
Thanks so much for the answers.
I'll surely pay attention to clipping now, it doesn't seem to be present but it's good to know what might be a potential problem.

Since it's a complete song used just for listening I don't need any looping, but the info are interesting and might come handy in the future. I might ask more on this if the time comes.

If I were to convert it in ADX again, wouldn't a lossy to lossless to lossy conversion lose more quality? That's why I thought to use FLAC to keep it as source and for PC listening, and then eventually have a copy as MP3 or OGG for portable compatibility.
Speaking of that, if I need to convert it to 44100 Hz, should I pay attention to other side effects? Is Audacity still ok for this?

Thanks again.

Re: Merge two audio files (ADX extension)

Reply #4
I have two ADX files from a game, vocals and instruments, of the same song. They are 48 Khz/16 Bit Depth.
Importing both in Audacity, I only cut the last part of the vocals (silence only), and then export them into a single file.

You mean, there is a vocal track and a "karaoke" track, and you want to mix them into a song?

Re: Merge two audio files (ADX extension)

Reply #5
Quote
I'll surely pay attention to clipping now, it doesn't seem to be present but it's good to know what might be a potential problem.
I just remembered something...   Audacity doesn't mix 'till you export.   If you re-import the file and it's hitting 0dB* it's probably clipped.

There are a couple of ways to handle this.   You can export to 32-bit floating point, re-import and normalize.   Or, reduce the volume of both tracks by -6dB before mixing/exporting.   (The -6dB may leave you with some headroom.)

Quote
If I were to convert it in ADX again, wouldn't a lossy to lossless to lossy conversion lose more quality?
Yes.  Plus, it's an odd-ball format.   I wouldn't recommend using it unless you needed it so you can use the new file in the game.


* You can check the peak level in Audacity by running the Amplify effect (and you can cancel before applying the effect if you wish).     Amplify will pre-scan the file and default to whatever gain change is needed for normalized/maximized 0dB peaks.   For example, if it defaults to +2dB, your peaks are now -2dB (you have 2dB of headroom).   If it defaults to -2dB, your peaks are +2dB and a regular (integer) WAV file will clip.   If it defaults to 0dB (no change) then your peaks are exactly 0dB which means the file was previously normalized or clipped. 



Re: Merge two audio files (ADX extension)

Reply #6
You mean, there is a vocal track and a "karaoke" track, and you want to mix them into a song?

This is definitely the case.

I just remembered something...   Audacity doesn't mix 'till you export.   If you re-import the file and it's hitting 0dB* it's probably clipped.

There are a couple of ways to handle this.   You can export to 32-bit floating point, re-import and normalize.   Or, reduce the volume of both tracks by -6dB before mixing/exporting.   (The -6dB may leave you with some headroom.)

* You can check the peak level in Audacity by running the Amplify effect (and you can cancel before applying the effect if you wish).     Amplify will pre-scan the file and default to whatever gain change is needed for normalized/maximized 0dB peaks.   For example, if it defaults to +2dB, your peaks are now -2dB (you have 2dB of headroom).   If it defaults to -2dB, your peaks are +2dB and a regular (integer) WAV file will clip.   If it defaults to 0dB (no change) then your peaks are exactly 0dB which means the file was previously normalized or clipped

Audacity showed me the mixed file was clipping, but using Amplify with a -0,001 db value was enough, so I guess that's why I couldn't here any distortion, and both tracks were probably already normalized. To save the file, I disabled dither (since Audacity uses it by default with FLAC) and put 16-bit as default sample format in Preferences -> Quality.

Would it be more correct to convert the two ADX files to FLAC in advance before working them on Audacity?