YesNoOk
avatar

Using ADX instead of MP3 for your BGMs (Read 76019 times)

Started by 外音リザ, January 22, 2006, 05:33:48 pm
Share this topic:
Using ADX instead of MP3 for your BGMs
#1  January 22, 2006, 05:33:48 pm
  • ****
  • Lost all his MUGEN stuff in hard disk crash. :(
  • CHIKARA TO EIKOU!!!
    • Philippines
    • Skype - o_hermanm
    • www.rotbrc.com
Not all of you may know what an ADX file is, but it is a waveform file format capable of infinitely looping music. To put it short, you can specify which point in the music should play ad infinitum. This format was developed and owned by CRI Middleware, Inc, and what sets it apart, is that it can produce lossless looping music files. This format also  can concurrently perform with other tasks, in other system platforms, and is highly-optimized. This format is still in use today, and is fast becoming the most-preferred audio format by game developers.

ADXs are used in Dreamcast, GameCube and PS2 games. They're also in use in Naomi and Atomiswave, for BGMs. Their usage is not limited to music, however.

And now, with a recent discovery, you can now harness ADXs for your MUGEN BGMs!

Why use ADX?

1. It loops indefinitely!
2. Saves on disk space.
3. You can still use and play it outside MUGEN!
4. Better and lossless quality than MP3!

How to use ADXs in MUGEN.

Firstly, go to this webside and download his in_cube plugin.
http://www.halleyscometsoftware.com/in_cube.html

Save and unpack the file in your directory of choice. In this case, extract it to the plugins directory of MUGEN.

Now open mugen.cfg located in your data folder of your MUGEN installation.

Look for this section.

MUGEN.CFG @ your MUGEN directory said:
  ;List Winamp-compatible plugins here.
  ;Specify the filename of the plugin and the list of file types to
  ;use the plugin for. One plugin per line.
  ;Example: plugin = plugins/my_plugin.dll, mp3, mp2, mpg
  ;
  ;If music is not looping with a particular plugin, you can try an
  ;optional first argument looptype=1 (seek to zero; may stutter)
  ;or looptype=2 (reload plugin; slow).
  ;Example: plugin = looptype=1, plugins/my_plugin.dll, mp3, mp2, mpg
;plugin = plugins/my_plugin.dll, mp3, mp2, mpg                  1
plugin = looptype = 1, Plugins/in_mp32.dll, mp3, mp2, mpg
plugin = plugins/in_cube.dll, adx
plugin = plugins/in_wave.dll, wav
plugin = plugins/in_ape.dll, ape
plugin = plugins/in_vorbis.dll, ogg
plugin = plugins/in_wm.dll, wma

Insert the code marked in boldface as illustrated.
If you have in_dsp and in_adx, remove them and replace them like so.

Before running MUGEN with your plugin, of course, configure one BG to use ADX files.

Once you've configured your BG file to use adx music, open a command prompt, and change directory to your MUGEN directory.

type winmugen -configplugins and press ENTER.

You'll now be presented with plugin configuration menu. Raise the priority to "Above Normal". Set loopcount to 0, which will make the ADX file loop infinitely. Set the fadetime to 0 as well. After that, press OK to save the changes.

Now you are ready to test! run MUGEN specifying the BG with ADX music. It should run perfectly and the music should not skip. If it does still, play around with the priority of the plugin. If problems persist, post and I'll try to help. If it worked perfectly, good! Now you're ready to take on the challenge of converting your existing musics to MP3! But trust me, you'll need good listening skills and at least a good sense of aesthetics to make perfectly-looping music in ADX.

I'll give you a tutorial on how to build your own ADX files later.

Give it up for vans1belmont who made this discovery. This is one winamp plugin that we've been waiting for a long time!
Orochi Herman: MUGEN Creator, Producer Video Editor and Web Programmer

And possibly more other shady things lol

https://www.facebook.com/OrochiHerman/
Last Edit: January 22, 2006, 06:05:51 pm by Midori Kasugano
Hey there...
#2  January 22, 2006, 08:14:27 pm
  • **
  • ADX Encoder Frontend Developer
Hey there, I'm new to this forum (not to mugen), but I hope you won't be too mad that I beat you to the punch on a short, yet very sweet, tutorial on making AND looping ADX files.

Here's what you need to start:
ADX Encoder (Finding New Free Host)
The ".WAV" file of choice
MS-DOS Prompt (Even with WinXP; Command-Line in WinXP)


Once you have ADX Encoder, simply unzip the file adxencd.exe to a folder (any folder really, but for this tutorial use ADXTOOLS in C:\), place the said .wav file in there and open up the command-line prompt.  When the window pops up, it should have you in your "My Documents" folder, so just type cd\ and you'll be sent to the root (C:\).  To start encoding, simply type the name of the folder like this: cd ADXTOOLS.

Once there, simply type: adxencd file.wav (replace "file" with the name of the actual file *ie. CharChoose.wav*)

It will process the file into an ADX file and you're done.  You've made your first ADX file.

Now, don't pat yourself on the back just yet.  In order to get the complete desired effect (looped file), you need to loop it...but how?  Here's how:

Just type: adxencd file.wav -lps0 -lpe45000

The "-lps" stands for the loop starting point and the "-lpe" is the loop ending point.  The loop is measured in wave samples, not minutes and seconds, for perfect acuraccy.  In order to find out the loop points in wave samples, you can use CoolEdit/Adobe Audition (My Fav), SoundForge, Awave Studio, etc.

For CoolEdit/Adobe Audition , simply click View - Time Display Format - Samples, choose the loop region (even if there is music before the loop) and jot down those numbers somewhere.  CoolEdit shows the loop start and loop end in the Begin and End box where the time usually is.

For SoundForge, I've never used it, so maybe someone can shed some light on it?

For Awave Studio, simply open up the program and Open a File (said .wav file), double-click the waveform icon, find your loop and jot down the numbers located in the loop point boxes.

You have your loop points...now what?  Simply enter these values into the command-line prompt as I stated above (ie. -lps345 -lp23890).  Once you've done that, press enter so the file gets processed and encoded.  You're done!  You now have a fully-functioning ADX file that loops!  If you have any questions, don't hesitate to ask!

djDarkX
ADX Encoder Frontend - Making ADX encoding easier!
Last Edit: February 13, 2006, 02:16:42 am by djDarkX
Re: Using ADX instead of MP3 for your BGMs
#3  January 22, 2006, 08:20:21 pm
  • ****
  • Lost all his MUGEN stuff in hard disk crash. :(
  • CHIKARA TO EIKOU!!!
    • Philippines
    • Skype - o_hermanm
    • www.rotbrc.com
Nah, it's okay. You might want to be detailed in some stuff though. :P

And post those sources soon. :P
Orochi Herman: MUGEN Creator, Producer Video Editor and Web Programmer

And possibly more other shady things lol

https://www.facebook.com/OrochiHerman/
Tutorial Is Ready!
#4  January 22, 2006, 09:00:32 pm
  • **
  • ADX Encoder Frontend Developer
The tutorial (above) is ready and better explained...I think...but it shouldn't be too much trouble to figure out.  8)
ADX Encoder Frontend - Making ADX encoding easier!
Re: Using ADX instead of MP3 for your BGMs
#5  January 23, 2006, 08:17:43 am
  • ****
  • Lost all his MUGEN stuff in hard disk crash. :(
  • CHIKARA TO EIKOU!!!
    • Philippines
    • Skype - o_hermanm
    • www.rotbrc.com
Nice.

Note that the utility hosted by DJDarkX is an original app developed by CRI. So when you make ADXs, it is perfect.

For people using sound forge, like me, you need to highlight the part that you want to loop. This is the hard part. The transition in the looping points should be ABSOLUTELY perfect and that it should be completely unnoticeable. You can play the file and adjust the selection live until the loop sounds perfect. The playing part will shift to the end part everytime you adjust the selection, so this will give you an indication whether the loop is right.

Once you are satisfied with the loop selection, in Sound Forge, select "Special>Regions List>Insert" Afterwards, click OK. This should give you a nice and permanent visual guide on your looping point. Now, doubleclick the outside portion of the loop point, the later parts no longer covered by looping, and hit the Delete button. Yes, you heard me. Delete. This will result in a dramatically shorter filesize.

Now you may do enhancements to the music if desired. Its perfectly okay to set the rate at 44100khz, 16bit stereo. If you change bitrates at this point, don't worry; the loops also adjust positions as well on their own. When done, save the file now as a WAV file.

Now go back to the loop points you've marked as a region. A tooltip marking of "Sustaining Loop" or similar will appear on mouse over. Right click the beginning marker, when the mouse cursor changes, and click Edit.

A menu should appear. You'll see that the time format is in "Time." Change this to Samples, and now you have the time format in Samples! Start value is your lps value, and End value is your lpe value. Encode the file using the information, and you're done!

When you're finished converting and the test affirms that you've made the ADX file loop correctly, you may now delete the original WAV file.
Orochi Herman: MUGEN Creator, Producer Video Editor and Web Programmer

And possibly more other shady things lol

https://www.facebook.com/OrochiHerman/
Last Edit: January 23, 2006, 08:31:09 am by Midori Kasugano
Re: Using ADX instead of MP3 for your BGMs
#6  January 23, 2006, 08:26:29 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
To get loop points in Audacity:
Click View > Set Selection Format > samples (snap to samples)


Just in case I'm not the only one out there who uses this...
A Frontend? Really!?
#7  January 23, 2006, 01:26:00 pm
  • **
  • ADX Encoder Frontend Developer
Well, I like the ADX format :suttrox: and this little MUGEN add-on so much, that I'm gonna start work on an easy to use frontend for the ADX Encoder.  It will have fields to enter the loop points, filename, target directory, source directory, etc.  As soon as it is ready, I will post the program on my original post (see above).  it shouldn't take me too long.

I've already began mass production of ADX files for MUGEN, but it seems that MUGEN sometimes has a problem playing the music.  When I start up MUGEN, sometimes the music won't pay and MUGEN will lag like it's no ones business.

Also, I found out that if you are using an ADX file to play music for the the Intro (ie. title.bgm = sound/FZeroXTitle.adx) and an MP3 for the VS (ie. vs.bgm = sound/FZeroXStartDemo.mp3), the MP3 won't play at all.  It looks as if the ADX plugin takes complete priority over any other plugin (I'm guessing this has to do with the "Adove Normal" priority setting).

It's not bothersome for me, as I plan to completely convert to ADX, but it may be bothersome to others, so use "Above Normal" priority on the "in_cube.dll" plugin only if you plan to ONLY use ADX files for the Title/Select/Vs screens.  Stages seem to still play MP3's, if assigned.  I don't know if this problem occurs with cutscenes as I'm still working on my own custom ones, but as soon as I find out, I will let everyone know.

Thanks again to Midori Kasugano for letting us all know about this great plugin and audio format.  *Hell, I'm even using ADX for personal listening (ie. Super Smash Bros Melee, MegaMan X 4/5/6, Sonic CD, etc)*
ADX Encoder Frontend - Making ADX encoding easier!
Re: Using ADX instead of MP3 for your BGMs
#8  January 23, 2006, 01:30:54 pm
  • ****
  • Lost all his MUGEN stuff in hard disk crash. :(
  • CHIKARA TO EIKOU!!!
    • Philippines
    • Skype - o_hermanm
    • www.rotbrc.com
Yay for frontend. We'll be waiting. ;)

Many MP3s in my PC are disappearing already. ;) And they're being turned into ADXs.

I'm almost ready to release new ADX files, starting with the ones from dreamcast games. :P
Orochi Herman: MUGEN Creator, Producer Video Editor and Web Programmer

And possibly more other shady things lol

https://www.facebook.com/OrochiHerman/
Almost Ready...
#9  January 24, 2006, 08:59:59 pm
  • **
  • ADX Encoder Frontend Developer
Well MUGENites,

It's almost done, just working some bugs out of the frontend.  It reads the program and sends out the command, just doesn't do anything...for some odd reason, so it should hopefully be done by tonight.  Once it's ready for download and you try it out, let me know what you think!  The link will actually be on this post instead of the first one.

ADX Converter Frontend (Currently Unavailable)

I'm very happy about this project and think it will be a big success.  ADX files are sleek, easy to make (even easier with the Frontend) and loopable without any sort of loss of quality.  Also, in order for the frontend to work, it needs to be installed in the same directory as "adxencd.exe".  There will be a self-executable file (for easy install) and a zipped version for anyone else.  I'll keep everyone updated.

djDarkX
ADX Encoder Frontend - Making ADX encoding easier!
Re: Using ADX instead of MP3 for your BGMs
#10  January 25, 2006, 12:08:26 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
A little problem I encountered.

I noticed that when you make ADX files, the input WAV has to be 8-bit for a PROPER conversion. Now, if you convert a WAV that's 16-bits or higher or any other file to 8-bit WAV, the result in the made WAV file is fuzzy in some parts.... Which is bad.

There's gotta be a better way to do this.
Re: Using ADX instead of MP3 for your BGMs
#11  January 25, 2006, 12:35:02 am
  • ****
    • China
    • http://vans.trinitymugen.net/
Ehm, i don't think so, my ADX are perfect in Sound, and One has been made from an AST Mp3, and the other Ripped directly from a Cps2 Game
Re: Using ADX instead of MP3 for your BGMs
#12  January 25, 2006, 01:07:09 am
  • ****
  • Lost all his MUGEN stuff in hard disk crash. :(
  • CHIKARA TO EIKOU!!!
    • Philippines
    • Skype - o_hermanm
    • www.rotbrc.com
The default adxencd spec should not touch the bitpart. He must've done something wrong in the frontend.
Orochi Herman: MUGEN Creator, Producer Video Editor and Web Programmer

And possibly more other shady things lol

https://www.facebook.com/OrochiHerman/
Re: Using ADX instead of MP3 for your BGMs
#13  January 25, 2006, 01:34:57 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Like what?
Fuzzy Sound? Really?
#14  January 25, 2006, 01:37:27 am
  • **
  • ADX Encoder Frontend Developer
A little problem I encountered.

I noticed that when you make ADX files, the input WAV has to be 8-bit for a PROPER conversion. Now, if you convert a WAV that's 16-bits or higher or any other file to 8-bit WAV, the result in the made WAV file is fuzzy in some parts.... Which is bad.

There's gotta be a better way to do this.

Hmm...sounds to me like the WAV in question is oversampled.  With 32bit and SOME 16bit WAV files, oversampling can't be heard.  I have already convert quite a few of these suckers and even restored audio from being oversampled too much (term known as clipping) and they sound great.

On a side note, the frontend is almost finished.  I worked out most of the bugs that I had and even made the program window smaller.  The only bug I have left to fix is getting the resulted ADX file to be moved from the source directory over to the target directory and I'm getting assistance with that from the Klik Community (Don't know any programming languages, so I'm using a game maker to make the frontend *Hey, if it works...*).

To Midori Kasugano:
I have not finished or released the frontend yet.  No one but me is using/testing the frontend yet.  Besides, the front end can't make ADX files fuzzy.
ADX Encoder Frontend - Making ADX encoding easier!
Re: Using ADX instead of MP3 for your BGMs
#15  January 25, 2006, 01:59:56 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
I'm saying that when I SAVE the 8-bit WAV that it's fuzzy. The convertor has nothing to do with the fuzziness part.

What I'm getting at is that if I use a 16-/32-bit WAV to convert to ADX, the result is either white noise or the song skipping around. If I convert from an 8-bit, the ADX usually sounds just like the 8-bit WAV.

What I'm getting at is that it sucks having to convert to an 8-bit WAV in order to get a SOMEWHAT decent ADX.


EDIT: I think I get what you're saying now. Is it that I had the loop point set past what it's supposed to REALLY be?
Last Edit: January 25, 2006, 02:11:36 am by Jesuszilla
Re: Using ADX instead of MP3 for your BGMs
#16  January 25, 2006, 02:05:27 am
  • **
  • ADX Encoder Frontend Developer
Oh, okay, I see what you're saying.  That's rather weird.  Can you tell me the exact parameters you used when converting the file?  Also, did you save the WAV as an ADPCM WAV and not a Windows PCM WAV?  In fact, if you can, send over the finished ADX files and the original WAV files over to me either via email or www.yousendit.com.  My email address is [url=http://djdarkx_mod@yahoo.com]djdarkx_mod@yahoo.com[/url].  I don't mind posting this email address as it has spam coming in it everyday anyways.
ADX Encoder Frontend - Making ADX encoding easier!
Re: Using ADX instead of MP3 for your BGMs
#17  January 25, 2006, 02:39:48 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Well, before I didn't save it as ADPCM. However, I did now and now I can't convert it. It says that the end sample exceeds the total, and I've checked over and over and I specified the EXACT end sample number. What's going on?
Re: Using ADX instead of MP3 for your BGMs
#18  January 25, 2006, 02:41:25 am
  • ****
  • Lost all his MUGEN stuff in hard disk crash. :(
  • CHIKARA TO EIKOU!!!
    • Philippines
    • Skype - o_hermanm
    • www.rotbrc.com
Ah. It seems it was a misunderstanding. Nevermind then.

Oh, DjDark, this could be asking too much, but do you think you can have the app do batch conversion, recognizing looping regions, and cropping out parts that are beyond the looping region? ;) Still, I'm looking forward to this frontend.

@Jesuszilla
You'll need to resave it with windows' sound recorder.
Orochi Herman: MUGEN Creator, Producer Video Editor and Web Programmer

And possibly more other shady things lol

https://www.facebook.com/OrochiHerman/
Re: Using ADX instead of MP3 for your BGMs
#19  January 25, 2006, 02:42:13 am
  • ****
    • China
    • http://vans.trinitymugen.net/
That happens to me too, just keep decreasing in the selection bar (not a lot) until you get it right, i am using Audacity too
Re: Using ADX instead of MP3 for your BGMs
#20  January 25, 2006, 02:55:26 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
The loop end IS the end of the sound file. The cursor is EXACTLY at the end. Something's not right here.