View Single Post
minmay

JCF Member

Joined: Aug 2002

Posts: 1,184

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Aug 31, 2013, 01:45 PM
minmay is offline
Reply With Quote
Module music resources

JJ2 supports the following file formats for music: MOD, S3M, XM, IT, MTM, 669, and J2B. JJ2+ comes with BASS, which adds support for MP3, MP2, MP1, OGG, WAV, AIFF, UMX, and MO3, and greatly improves support of the existing formats (except J2B and 669).

This thread is not concerned with MP3, MP2, MP1, OGG, WAV, or AIFF - only MP3 and OGG are really useful in JJ2 levels, and there are plenty of other places for you to learn about those.

The difference between module formats and streaming formats
Streaming formats such as WAV, MP3 and OGG simply consist of a stream of audio data, which is played directly. By contrast, module formats consist of a collection of samples and patterns.
Samples are streams of audio data, usually very short, and usually consisting of only a single note.
Patterns are sets of rows. Each row contains instructions for playing notes, as well as effects, arbitrary instructions that cover everything from applying vibrato to a note, to jumping straight to a different pattern. Usually, more than one note is played from a single sample - to generate higher or lower notes, the sample is simply played back faster or slower. Every module file has a certain number of channels; each channel can play only one sample at a time.
When a module file plays, the player traverses through the patterns in order; to traverse a pattern, it traverses through that pattern's rows in order, executing each row's instructions as it passes through. The speed at which rows are traversed can be arbitrarily set by the module, and can even change partway through.
A visual demonstration.
Pattern data is very small and compresses well; it's rare for it to take up a significant amount of space. Most of a module's file size comes from the samples, and due to how short samples can be, modules frequently end up much smaller than even low-quality MP3/OGG conversions. Also, they tend to use less CPU time than compressed formats like MP3 and OGG.
It should be an obvious conclusion from this that you can't reasonably convert a streaming format into a module format - you can put the entire streaming song in a sample and have your module just play that, but the result is no smaller than the original streaming song.
Unlike with, say, MP3, there is no standard for how module formats should be written or played. This, combined with the large number of formats and their wide range of capabilities, means that most programs don't play module formats very accurately.
Programs used to compose modules are called trackers. Player accuracy is normally determined by comparing it to the output of the original tracker that created the format.
I won't go further into the details of module formats in general here.

Individual formats and their JJ2(+) support

MOD
The original module format (the extension stands for MODule), originating on the Amiga in 1987. Only supports 8-bit samples, and no more than 31 of them. The original format was also limited to 4 channels, but after a few years a lot of MODs started popping up with 8 channels. Rarely you'll see a MOD with more channels, but those won't even play on an Amiga without fairly obscure software.
Originated with Ultimate Soundtracker, but the standard for playback is usually ProTracker, a later and much more flexible program.
Support:
JJ2: Some inaccuracies
BASS: Almost perfectly accurate

S3M
Originated with ScreamTracker 3; the extension stands for ScreamTracker 3 Module. Supports 16 channels, and unlike MOD (which played channels either entirely on the left speaker or entirely on the right speaker), allows arbitrary stereo panning. The file format allows 16-bit samples, but ScreamTracker 3 itself didn't, so most S3Ms have only 8-bit samples. Of all the formats used by unmodified JJ2, this one is played the most accurately aside from J2B.
JJ2: Almost perfectly accurate
BASS: Slightly more almost perfectly accurate

669
Originated with Composer 669, nobody uses it.
JJ2: Never tried more than a couple, not sure.
BASS: N/A

PSM
Supported by neither JJ2 nor BASS, but notable for being used in many of Epic's older releases, including the original Jazz Jackrabbit. Converts well to S3M provided you use the correct program to do it.
JJ2: N/A
BASS: N/A

MTM
MultiTracker Module. Similar to S3M, and not nearly as popular.
JJ2: Reasonably accurate
BASS: Almost perfectly accurate

XM
Originated with FastTracker 2. Extremely popular. Up to 32 channels, full support for 16-bit samples. Also introduced instruments, which are basically extra instructions applied when playing a sample, mostly in the form of volume or panning envelopes, curves that are applied to the volume (panning, etc) of a sample over the time it's played.
JJ2: Somewhat inaccurate - poor support for many effects
BASS: Perfectly accurate, never found one single difference between this and FT2's playback.

IT
Originated with Impulse Tracker. Also extremely popular. Supports up to 64 channels, as well as allowing stereo samples. Instruments additionally have what are called New Note Actions, or NNAs, which allow notes to continue sounding even if interrupted by another note in the same channel; the abilitiy to play multiple notes concurrently in a single channel is known as virtual channels; they behave both internally and externally very much like additional channels, except they're invisible and don't carry any row instructions.
Later versions of Impulse Tracker introduced an additional instrument envelope that applies resonant or cutoff filters (of varying strength) to the sample. A warning: songs with heavy use of filters and/or very many channels actually manage to get more CPU-intensive than MP3 files.
Impulse Tracker 2.14 and up also support lossless sample compression, which usually has a compression ratio of around 50% - significantly worse than FLAC, the most popular lossless audio compression today, but keep in mind that Impulse Tracker also predates FLAC by around 5 years.
JJ2: Very poor support. Compressed samples and filters crash the game. More than 32 channels will either fail to work properly, or crash the game. NNAs don't work.
BASS: Almost perfectly accurate

J2B
The music format made for JJ2. Kind of like XM with some IT effects added - note that there are no filters and no NNAs. Compressed, with similar ratios to IT2.14. If you use or have used this format at any time after BASS' inclusion in JJ2+, I hate you and sincerely hope you die.
JJ2: Perfectly accurate, by definition.
BASS: N/A

UMX
Container format used in Unreal, wraps around a MOD, S3M, XM, or IT. I think. I don't own Unreal and intellectual property theft is bad!!!
JJ2: N/A
BASS: Don't know

MO3
The ultimate module format, conceived by the author of BASS. Wraps around a MOD, S3M, MTM, XM, or IT module, retaining the original format perfectly...except for compressing the samples, patterns, comments, everything. Sample compression is either MP3, OGG, or lossless...chosen completely independently for every sample, so you can mix them any way you want. You can even mix different MP3/OGG quality levels.
Due to the nature of the format, it is guaranteed that BASS will play an MO3 exactly like it plays the original song (except for any lossy sample compression). The big disadvantage is that almost nobody actually supports MO3 aside from BASS.
Note: I recommend using Ogg over MP3 when making MO3 files, because Ogg retains sample shape significantly better, and deviating from the original shape can cause "clicks" in looping samples.
JJ2: N/A
BASS: See the entry for the appropriate original format

Where to find modules
You are responsible for obeying license agreements when downloading, modifying, converting, or using any songs.

Modland
Enormous collection spanning a couple hundred formats, but there's a lot of crap and no way to filter it out.

The Mod Archive
Much, much smaller than Modland but has a rating system.

modules.pl
Lots of different formats and well sorted, not very large though (about 7400 files at time of writing).

scene.org
If you're looking for songs from a specific party or competition, they might be here.

All modules uploaded to J2O

Useful programs (all are free)

Module players

XMPlay
This is the BASS audio player, and it's probably the one you should use, even if you have to run it under Wine; if it plays right in XMPlay, it's basically guaranteed to play right in JJ2+. Extremely accurate for all the formats it supports (and it supports all the important ones), and it even has a pattern viewer.

ModPlug Player
Less accurate than XMPlay but supports a wider range of formats.

Audacious, Xmp
If you want a native module player for a non-Windows system these are probably your best options. Audacious supports non-module formats but Xmp supports a wider range of module formats and seems a bit more accurate. Xmp has a very good Android version.

Winamp

Trackers

OpenMPT
The most intuitive interface of any of the trackers here, and supports a lot of formats, however, it has some inaccuracies; songs composed with OpenMPT will likely sound a bit different if you play them with BASS or the original trackers. Most accurate player for J2B aside from JJ2 itself but that's not saying very much. Can also convert PSM to other formats; there used to be more accurate programs for this but as of 1.22.07 it seems to be the best.

SchismTracker
Modern version of Impulse Tracker. Very accurate, but only for IT.

MilkyTracker
Modern version of FastTracker 2. Very accurate, but only for XM.

BeRoTracker
A tracker that can load MIDI files.

Other

MO3
Programs for converting to and from MO3.

What to take away from all this
If you don't care about working without BASS, and don't mind converting to it, you should use MO3 for module music in JJ2 levels. If you want your song to play on unmodified JJ2 then you are probably best off looking for XMs or S3Ms; it's rather inconvenient to pick out an IT then find out that JJ2 crashes or plays it badly.

Last edited by minmay; Feb 21, 2014 at 11:54 AM. Reason: remove cronos, correct some stuff