Skip to content

Instantly share code, notes, and snippets.

@andyvanee
Last active June 24, 2017 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyvanee/9872c31515c2f15057d2ee3732d55381 to your computer and use it in GitHub Desktop.
Save andyvanee/9872c31515c2f15057d2ee3732d55381 to your computer and use it in GitHub Desktop.

Micromod Notes

Based on my experiments with https://github.com/martincameron/micromod

To compile mt files:

java -jar micromod-20160326.jar songs/Origin.mt

To compile the micromod-c mod player (this is what worked on my Mac anyway):

brew install sdl
cd micromod-c
make CC=cc
./micromod ../songs/Origin.mod

The following are the notes generated by the java compiler:

java -jar micromod-20160326.jar -syntax
java -jar micromod-20160326.jar -notes

Module syntax

Module "Title" (Song title, maximum 20 characters.)
    Channels "4" (Number of channels. Four channel modules have fixed panning.)
    Sequence "0,1,2,..." (The order in which Patterns are played in the song.)
    Instrument "Index" (Instrument index, from 1 to 31.)
        Name "Name" (Instrument name, maximum 22 characters.)
        Volume "0" (Instrument volume, 0 to 64.)
        FineTune "0" (Fine-tuning in eighths of a semitone, from -8 to 7.)
        Waveform "Type" ('Sawtooth', 'Square', 'Sine', or 'Noise'.)
            Octave "0" (Waveform octave, from -4 to 4.)
            Chorus "Cycles[,ModRate,LfoRate,Detune,Mix]" (Phase modulation.)
                   (Cycles controls cycles of unmodulated oscillator 1.)
                   (ModRate controls cycles of osc 2 modulation. Default 1.)
                   (LfoRate controls cycles of modulator LFO. Default 0.)
                   (Detune adjusts pitch of osc 2 in eighths of a semitone.)
                   (Mix controls oscillator mix from 0 to 256. Default 128.)
            Point "X,Y" (Set a point in the time or spectral envelope.)
                  (If Sawtooth or Square waveform, set sample X from 0 to 511.)
                  (If Waveform is Sine or Noise, set harmonic X from 1 to 256.)
                  (The value of Y is an eight-bit quantity from -128 to 127.)
                  (Multiple Points with increasing X are linear interpolated.)
                  (Neighbouring values can also be set with 'X,Y0,Y1,...,Yn'.)
        WaveFile "FileName" (The relative path of the WAV file.)
            Crop "Offset,Count[,Divisions]" (Crop Count Divisions from Offset.)
                 (The Divisions parameter divides the sample into segments.)
                 (If unspecified, one division is equivalent to one sample.)
            Gain "64" (Amplification factor, divided by 64.)
            Pitch "0" (Tune the sample in eighths of a semitone.)
        LoopStart "Offset" (Offset of sustain phase in samples.)
        LoopLength "Length" (Length of sustain phase in samples.)
        PingPong "On" (Append a reversed sustain phase to the sample.)
    Macro "Index" (Macro index, from 1 to 99.)
        Scale "C#D#EF#G#A#B" (Key signature for Macro transpose.)
              (All scales are specified as 12 notes starting from C.)
              (C-Major would be 'C-D-EF-G-A-B', and C-Minor 'C-D#-F-G#-#-'.)
        Root "C-2" (No transpose will be applied when played at this key.)
        Note "C-2-1---" (A single 8-character note, as used in a Pattern.)
            Repeat "Count" (Repeat the notes from the marker Count times.)
                   (Use a value of 'Begin' to set the marker.)
    Pattern "Index" (Pattern index, from 0 to 127.)
        Row "00 C-2-1--- --------" (Specify a single row within a pattern.)
            (Row index, from 0 to 63, followed by notes for each channel.)
            (See the '-notes' command line option for more information.)

ProTracker Notes Reference

An 8-character ProTracker note takes the form 'KKOIIFPP', where:

KK = Key (One of 'C-', 'C#', 'D-', 'D#', 'E-', 'F-', 'F#', 'G-', 'G#', 'A-', 'A#', 'B-', or '--').
O  = Octave (0 to 6, or '-').
II = Instrument or macro index (Decimal, 01 to 99, or '--').
F  = Effect Command (Hexadecimal, 0 to F, or '-').
PP = Effect Parameter (Hexadecimal, 00 to FF, or '--').

For example, an empty note would be '--------', and instrument 1 played at middle-c, with no effect would be 'C-201---'. The channel volume and fine-tune are set from the instrument.

When a macro is played instead of an instrument, it will run until a note with an instrument is encountered. The transpose and volume of a macro can be adjusted by using a key or set volume (effect C) in the pattern. When the end of the pattern is reached, the macro will continue to run into the next pattern in the sequence.

The available effect/parameter combinations are:

0xy = Arpeggio, rapidly cycle through key, key + x, key + y.
1xx = Portamento up with speed xx.
1Fx = Portamento up with speed x semitones per row (Macro only).
2xx = Portamento down with speed xx.
2Fx = Portamento down with speed x semitones per row (Macro only).
3xx = Tone portamento, slide towards the current key at speed xx.
3Fx = Tone portamento with speed x semitones per row (Macro only).
4xy = Vibrato with speed x, depth y.
5xy = Continue tone portamento with volume-slide speed (x - y).
6xy = Continue vibrato with volume slide speed (x - y).
7xx = Tremolo with speed x, depth y.
8xx = Set panning 00 to 7F. Not for 4-channel modules.
9xx = Set sample offset to xx * 256 samples.
9Fx = Increase sample offset by x * length / 64 (Macro only).
Axy = Volume slide with speed (x - y).
AxF = Linear volume-slide up with speed x (Macro only).
AFx = Linear volume-slide down with speed x (Macro only).
Bxx = Pattern jump to pattern xx.
Cxx = Set volume of instrument or macro to xx (00 to 40).
CFx = Linear set volume x (Macro only).
Dnn = Pattern break, to row nn (decimal 00 to 63) of next pattern.
E1x = Fine portamento up with speed x.
E2x = Fine portamento down with speed x.
E3x = Glissando. (Not supported in Micromod).
E4x = Set vibrato waveform x (Sine 0, Saw 1, Square 2, Random 3).
E5x = Set channel fine-tune x eighths of a semitone.
E60 = Set pattern loop marker.
E6x = Pattern loop (replay from the marker x times).
E7x = Set tremolo waveform x (Sine 0, Saw 1, Square 2, Random 3).
E9x = Retrigger sample every x ticks.
EAx = Fine volume-slide up with speed x.
EBx = Fine volume-slide down with speed x.
ECx = Note cut. Set volume to zero after x ticks.
EDx = Note delay. Wait x ticks before triggering key.
EEx = Pattern delay. Add x ticks to current row.
EFx = Invert loop. (Not supported in Micromod).
Fxx = Set speed 00 to 1F (ticks per row, default 6).
Fxx = Set tempo 20 to FF (tick length 2.5/xx seconds, default 7D).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment