|
|
intro | getting started | conv2aas | example | faq api : index | general | sfx | mod | misc | mixer |
Conv2AAS is a simple tool that reads in all the files in a specified directory and converts them into a single data file (with an associated header file) which can then be used in your project. Any redundancy in the data will be removed. For example, if two MODs in your project use the same samples then those samples will only be included once to save space.
Currently, Conv2AAS supports the following file formats:
Format Extension Restrictions MOD .mod Protracker/Noisetracker/FastTracker/Falcon/TakeTracker 1-16 channel MODs are supported. The following effects are implemented:
0: ArpeggioConv2AAS will produce warnings if a MOD uses unsupported effects, is in the wrong format or if it has too many channels. However, even if a MOD does use unsupported effects, it will often still play almost perfectly.
1: Slide Up
2: Slide Down
3: Tone Portamento
4: Vibrato
5: Tone Portamento + Volume Slide
6: Vibrato + Volume Slide
7: Tremolo
9: Set Sample Offset
A: Volume Slide
B: Position Jump
C: Set Volume
D: Pattern Break
E0: Set Filter (*)
E1: Fine Slide Up
E2: Fine Slide Down
E6: Set/Jump to Loop
E9: Retrigger Note
EA: Fine Volume Slide Up
EB: Fine Volume Slide Down
EC: Note Cut
ED: Note Delay
EE: Pattern Delay
F: Set Speed
(*) The GBA has no hardware filter so this effect does not change the audio output. However, the most recent value set by this effect can be read in your code via the AAS_MOD_GetLastFilterValue function. This can be used to sychronise your code with the music.
RAW .raw Data must be 8-bit signed mono PCM with no header. WAV .wav Must be in 8-bit unsigned mono PCM format. (Automatically converted to signed format by Conv2AAS.)
These days, the most popular MOD trackers seem to be Milkytracker and OpenMPT. For more info, read a short summary on modarchive. If you prefer an Impulse Tracker-like interface, there's Propulse.
For converting samples into the appropriate RAW and WAV formats, I recommend SoX.
To convert to the appropriate formats using sox, use the following command:
sox [source_filename] -s -b -c 1 [destination_filename][source_filename] is the name of the sound you wish to convert (e.g. "source.wav"). [destination_filename] is the name of the file you wish to create (e.g. "dest.raw") - it should end with ".wav" or ".raw" to be compatible with Conv2AAS. Note that sox will give a warning when converting to .wav format that it has converted the data to unsigned - this is normal. Also make sure that [source_filename] and [destination_filename] are different. It is even possible to use sox to automatically convert all your sound files as part of your project's makefile.
Conv2AAS includes versions compiled for DOS/Windows and Linux. Both are named conv2aas. It should be called from the command line and only needs one parameter, which is the name of the folder that contains the data files. All the files in that folder will be processed so it is recommended that you create a subfolder for your project that contains all the sound files. Conv2AAS always creates two files in the current directory:
AAS_Data.h : This is the header file that you should include in your main code whenever you want access the AAS sound data.
AAS_Data.s : This is the raw data itself, stored as an assembly file suitable for the GBA. It should be assembled to produce an object file that can then be linked with your project.
The example code included with AAS comes with a makefile that will automatically run Conv2AAS each time your program is compiled. It is highly recommended that you use a similar system in your project.