AGI Sound Tutorial - Converting from Other Formats

From AGI Wiki
Jump to: navigation, search

Tutorials and Guides Table of Contents
AGI Sound Tutorial Index

Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12

Converting From Other Formats

by Nick Sonneveld

Last Updated 4th March, 2002


At the moment there are three main converters available for converting other formats to the AGI sound format. They are MIDI2ROL, ROL2AGI and IT2AGI. This section will quickly describe each utility and how they are used.


There isn't an actual tool for converting MIDI files to the AGI format. People who want to use MIDI files have to go through two stages: converting a MIDI to a ROL file and then converting that file to the AGI format. This process can get fiddly because MIDI supports different instruments. However, because AGI just plays tones, you don't have to worry about this. The tool used to convert MIDI to ROL is MF2ROL by Alejandro Kapauan.

To convert a MIDI to a ROL file, the correct command to type in at the command prompt is:

MF2ROL <name>.mid

The program will create a rol file with the name "<name>.rol"


ROL is an old format used by some AdLib card programs. Lance Ewing produced the ROL2SND tool which can be used to convert ROL files to the AGI sound format. It is also the final step for converting MIDI files to AGI sound files. The command for converting ROL to SND is slightly different from the MIDI tool however:

ROL2SND <input name>.ROL <output name>.ASO

After this you should have a fully working AGI sound.


Nat Budin wrote the tool "it2agi" to convert ImpulseTracker files to the AGI sound format. I'm assuming he used it to create the music for the excellent Operation Recon demo. You will need ImpulseTracker to create the music and the Perl runtime to run the Perl script that this converter is written in (see the Tool Locations section).

To convert music, try typing this from the command line:

perl it2agi <name>.it

The script will produce a file called "<name>.ags".


There are a few annoying problems to keep in mind when converting other file formats to AGI however:

  • All the converters do not support the noise channel.
  • Some converters ignore volume, frequency shifts, tempo changes and other niceties. Most of these things can actually be implemented in the AGI sound format, it's just a bit tricky and most people don't have the time/resources to implement it.
  • The size of the converted file can actually get quite big. This isn't a problem when playing in Winamp but when you play it in the actual game, it will take up a lot of space and the amount of memory the interpreter has is limited.
  • Some converted files create really long silent sections at the end of the converted file.
  • MIDI and ROL files can define frequencies that are out of range in the ordinary AGI file. The converters will give up and you won't have a sound file. You could try editing the MIDI file in a MIDI editor first.


It's handy to convert to a script (see the Scripting section) after the conversion and manually edit the song. Things you could change are:

  • Add in percussion via the noise channel
  • Crop the song to save space


Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12


Tutorials and Guides Table of Contents
AGI Sound Tutorial Index

< Previous: Extracting SoundsNext: Merging >