How to make xa file

At making DTXMania song data, I think you'll feel "sound files are too large."
Usually, normal wave file (44kHz 16bit stereo) has about 10Mbyte per 1 minute. It's too hard to distribute to others.
(In these days, it is not so "big", you feel??)

Therefore, to reduce file size, "compress" is used in usual case. images and sounds are not compressed well? in general comression way (zip etc). Accordingly, sound-specific compression (mp3, xa or ogg) is used.
(If you are interested in "how special these compressions are", study yourself about "lossy compression".)

Well, DTXMania can handle 3 sound compression ways ... mp3, xa and ogg.(*1) Here I describe how to convert from raw WAVE file to xa file.

(*1)You can make the wave file which has compressed data. So this description is not correct in a strict sense.

  • Using "XaWrapper"?
  • Using CUI directly?
  • In case "not PCM format." error occurs and failed to convert?

 *? Using "XaWrapper"

In case you use xa.exe dierctly, you must use CUI operations.? It is a little harder than using GUI. However, maruru made XaWrapper (GUI front-end wrapper for xa.exe) and you can easily use it.

Here I describe the way to convert wave files to xa files using XaWrapper.

First of all, prepare "XaWrapper" and "WAV to XA"

    • WAV to XA? (original files are archived by LZH. I re-archive them by ZIP)
    • XaWrapper? (original one is for Japanese. I made English version and get permission from original author maruru to distribute here)

Please extract these two archives and place them in the same folder. (See right figure, for example)

Moreover, prepare WAVE files (you want to convert) in some folder.

Now you're ready to convert.

Start XaWrapper_e. The window opens.
Notice: "XaWrapper.exe" is in Japanese. "XaWrapper_e.exe" is in English.

Next, click [Browse] at "Target file directory" to choose folder where WAVE files exists. Then the WAVE files in that folder are shown in "Target file list".

If there are files you don't want to convert to xa, select them and click [Delete].

Moreover, click [Browse] at 'quot;Output directory" to choose the folder where you want to output converted xa files.

Then, click [Start convert] to start converting. While converting, DOS window appears. Don't care. At the last, you have to hit any key in DOS window to terminate converting. After finishing converting, see the folder where you specified at "Output directory". XA files would be output.

(In some cases, XA files are not made. It depends on the kind of WAVE format.? So I recommend you to check whether XA files are made or not at any time.)

In case you encount the error "Xa.exe isn't found.", the file xa(.exe) is not in the same folder where XaWrapper(.exe) is.

If you caught "Output directory is not specified.", specify the output directory.

There is a case you seems no error occured, but some wave files are not converted. See In case "not PCM format." error occurs and failed to convert? to solve.

You can decode XA to WAV by using "Decode to WAV".

*? BTW, check the "Convert type" at the right on the window. Though its intial configure is "Encode to XA", you can change it to "Decode to WAV". It means you can de-convert from XA files to WAV files.
So you can edit XA file by decoding to wave file, editing wave file and encoding to XA file.

Moreover, "Comress bits" in "Conversion settings" is "8Bit" at first. You can make XA file smaller by choosing 6Bit or 4Bit. The smaller "Compress bits" is, the smaller XA file is, but the lower the sound quality is. So, for example, you can choose the bitrates like below;

  • Hi-hat sounds should be converted with "8Bit". Because hi-hat sounds contain much amount of high-frequency signals, You'll feel bad if you cut them by using low-bitrate compression. Moreover, hi-hat suonds have short-length, so you don't have to compress them so much.
  • Bass-drums, snares and tom-toms should be converted to "4Bit". Because you'll not care that sound qualities so much.
  • Midium "6Bit" for the crash cymbals.
  • (If you want to convert BGM to XA,) You should use "4Bit" as the size of BGM file is very large.

(But, I...always uses "6Bit" only....too troublesome :-)


 *? Using CUI directly

Open Command Prompt, and type xa and [Enter] to show usages.

WAV to XA v1.22 Copyright 2000-2001 bandjam.net
Usage  : xa.exe  [filename<.wav/.xa>]
Option : -e[n]    Encode[WAV->XA](Default) / n:BitCount(4/6/8)
         -d       Decode[XA->WAV]
         -p       Play File
         -o[dir]  Output Directory
         -u       Update

I believe this help is quite enough to use xa.exe. But I add a little explanations.

In case you wanto to convert wav to xa, type

xa.exe -e targetwav

to convert targetwav.wav to targetwav.xa. You can use wildcard to specify filenames like

xa.exe -e *.wav

You can add bitrate option like

xa.exe -e6 targetwav

to apply bitrate [6bits/1sample(16bit)]. You can specify 4, 6 or 8 for the bitrate. The default bitrate is -e6.

In the same way, if you want to decode xa to wav, type

xa.exe -d targetxa

to convert targetxa.xa to targetxa.wav.

You can play xa file directly by typing

xa.exe -p somwaxafile.xa

I explains some practical usage in other page, by applying file extension association.|?

last update: February 16th, 2009

 *? In case "not PCM format." error occurs and failed to convert

Though you 'll hardly recognize that error in case you use XaWrapper, you may experience "I did convert certainly, but no converted xa file found".

In that case, check the convert log in the DOS screen. You'll probably see **"not PCM format."** in it.

It happens in case that WAVE file is not raw wave file (RIFF chunked MP3 file etc).

You have to prepare raw wave file to convert to xa file. If you have RIFF chunked MP3 file, you can decode to raw wave file by using SCMPX... [CONVERT] - [Single file] - [Decode to wav].