Skip to content
blocksdsPublic

Latest commit

 

History

247 Commits

Folders and files

Repository files navigation

Maxmod Utility

Introduction

This is a packer of songs and audio effects to be used by Maxmod.

Please, report issues here.

Usage

mmutil [options] input files ...

Input files may be MOD, S3M, XM, IT, and/or WAV.

Option Description
-o [output] Set output file (.mas, .bin, .gba, .nds).
-h [header] Set header output file (.h).
-D Add list of sample and module names to soundbank.
-m Output MAS file rather than soundbank.
-d Use for NDS projects.
-b Create test ROM. (use -d for .nds, otherwise .gba)
-i Ignore sample name flags (NDS mode only).
-v Enable verbose output (-v -v for extra verbose).
-p [0...255] Set initial panning separation for MOD/S3M.
-z Convert WAV file to raw ADPCM file (for testing).
-y Assume 'yes' in confirmation prompts.
-V Print version string and exit.

Sample flags

Sample flags are strings added to a sample name to modify the sample during conversion.

  • %o: NDS hardware mixer mode only. Used to support the Sample Offset effects when using the DS hardware channels for playback. You can use a sample offset command to start playing beyond the loop start, and then when the sample hits the loop end it'll still correctly loop back to the start.
  • %c: NDS hardware mixer mode only. Compress the sample using IMA-ADPCM.
  • #: Normally, samples of a module file don't get their own definitions in the header file generated by mmutil. If the name of a sample starts with #, a definition is generated, and its name will be added to the samples dictionary.

Resampler flags

These options control resampling behavior. By default, they are set to 'classic' values for backwards compatibility.

  • -fmin [freq]: Set minimum sampling rate (in Hz). This causes samples that are sampled below that rate to be upsampled, which can help reduce 'crunchy' aliasing when waveforms are played back at low playback rates. Note that this can increase the output file size.

  • -fmax [freq]: Set maximum sampling rate (in Hz). Downsample anything above the specified rate. This can be useful when waveforms are sampled at 44.1kHz but will be mixed at 16kHz, for example, as this will decrease the file size, as well as remove high-frequency components that would cause audible aliasing distortion on playback.

  • -resampler [method]: Set resampling algorithm. Can be any of:

    • nearest: Nearest-neighbor interpolation (1-tap)
    • linear: Linear interpolation (2-tap)
    • cubic: Cubic spline interpolation (4-tap; default)
    • sinc[,4]: Sinc interpolation (4-, 6-, ... 254-tap)

    Sinc resampling is the 'mathematically-correct' method, but the other methods may be of use for stylistic purposes.

  • -oversample [ratio]: Set oversampling ratio (default: 1.0). Multiply the sampling rate by the specified ratio, but also preserve the original low-pass cutoff. This option is most useful for simulating band-limited resampling on playback, without actually using interpolation. This will necessarily increase file size, proportional to the ratio.

    • The oversampling ratio is applied AFTER capping to the minimum/maximum rate (as specified by -fmin and -fmax), and can also be 'inverted' by using a ratio less than 1.0 (this will scale sampling rates DOWN, with a corresponding DECREASE in file size).
    • This option only works correctly with sinc resampling, as the other methods cannot apply the necessary low-pass filter.

Examples

  • Create DS soundbank file (soundbank.bin) from input1.xm and input2.it. Also, output header file (soundbank.h)

    mmutil -d input1.xm input2.it -o soundbank.bin -h soundbank.h
    
  • Create test GBA ROM from two inputs.

    mmutil -b input1.mod input2.s3m -o TEST.gba
    
  • Create test NDS ROM from three inputs.

    mmutil -d -b input1.xm input2.s3m testsound.wav -o TEST.nds
    

Releases

Contributors

Languages