Mabinogi MML Syntax
From nothing to reading and writing it yourself
What MML is
MML (Music Macro Language) is a way of writing a score as plain text. Mabinogi's composition system takes exactly this kind of text — you paste a string like t120 l4 cdefg into the game's Blank Score and your character plays it.
It is neither staff notation nor numbered notation; it is closer to "write down, as commands, how each note is played". The upside is that it can be copied, pasted and processed with text tools. The downside is that nothing warns you when it is wrong — usually you find out by playing it.
Every section below can be pasted straight into the editor and played. Read it with the editor open and change things as you go: hearing the difference matters more than following the explanation.
Notes and rests
Seven letters for the seven notes, Do to Si:
| Written | Note | Written | Note |
|---|---|---|---|
c | Do | g | Sol |
d | Re | a | La |
e | Mi | b | Si |
f | Fa | r | Rest (silence) |
A sharp is + or #, a flat is -:
c+ Do sharp (the same as Re flat)
d- Re flat
Upper and lower case both work; this site treats them as the same note.
Lengths and dots
A number after the note letter is that note's length, and the number is the denominator:
| Written | Meaning |
|---|---|
c1 | Whole note |
c2 | Half note |
c4 | Quarter note |
c8 | Eighth note |
c16 | Sixteenth note |
Writing a number on every note is tedious, so l (length) sets a default length — every note after it with no number of its own uses that:
l8 cdefg exactly the same as c8 d8 e8 f8 g8
l8 cde4 fg only e is a quarter note; the rest are eighths
A dot after it is a dotted note, making it 1.5 times as long:
c4. quarter note × 1.5
c4.. quarter note × 1.75
The dot attaches to the number and does not compound. After l4., a following c. is 1.5 beats and not 2.25; a bare c is the one that gives you 1.5 beats. Plenty of people get this wrong, and it is where miscounted beats in long phrases come from.
Octaves
o followed by 1 to 7 chooses which octave the pitches sit in, and o4c is middle Do.
< drops an octave and > raises one — when a melody moves up and down, these two are far shorter than writing o every time:
o4 cde >c that last c is an octave higher
The range the game can express is o1 to o7. Notes outside it are clamped back into range with a warning in the status bar, rather than quietly playing a pitch that does not exist in the game.
Tempo: shared by the whole piece
t followed by a number sets the tempo in BPM, for example t120.
This is the easiest thing to get wrong: t does not belong to one track, it applies to the whole piece.
A t written in any track changes every track from that point on. Where several tracks write one at the same position, the lowest-numbered track wins.
The way it catches you is this: you write t100 in the first track only. If the player gave every track its own tempo, track one would run at 100 and the rest would stay at the default 120 — and it would sound progressively more wrong. This site does what the game does: it merges the t commands of every track into a single tempo map before converting, so the problem cannot arise. The Tempo field in the status bar prints the merged result, so a disagreement is visible at a glance.
To change the tempo, use the Tempo button in the toolbar. It collapses the tempo actually in force onto the melody track and clears the t commands in the others — one way out means you never end up with a score where two tracks are fighting each other.
Velocity
v followed by 0 to 15 sets the volume; higher is louder. Like l, it stays in force — once set, every note after it uses that velocity until the next v.
v12 cde v8 fga the first three notes louder, the last three softer
In an ensemble, dropping the accompaniment tracks a few steps lets the melody float to the top. The Velocity button in the toolbar adjusts a whole span at once, so you do not have to edit them one by one.
Ties and the n command
& joins two adjacent notes of the same pitch into one long one:
c1&c1 a Do two whole notes long, with no break in the middle
Notes held across a bar line, and durations that cannot be written any other way (five beats, say), both rely on it.
n followed by a number is an absolute pitch: n48 is the same as o4c. It ignores o and does not change the octave state afterwards either. You rarely need it by hand — it mostly turns up in scores produced by tools.
Tracks and the character limit
Mabinogi's Blank Score takes 4 tracks: Melody, Harmony 1, Harmony 2, Vocal. Tracks are separated by commas, with MML@ at the front and ; at the end:
MML@t120l4cdefg,l4ceg,l4egc;
That one is an instrument score, using the first three tracks (Melody / Harmony 1 / Harmony 2); a vocal score uses only the fourth.
Every track has its own character limit, set by the game. It is a hard limit: go over it and the text will not paste in. Whitespace does not count — line breaks and indentation are free, so use line breaks to separate bars and make the score easier to read.
When a track is over the game's limit the count turns red, but nothing stops you carrying on editing. For ways to bring it down, see the FAQ section on it.
Differences from other tools
Mabinogi is not the only thing that uses MML, and no two implementations agree on every detail. This site's parser follows Mabinogi, with a few accommodations for foreign spellings so that scores from elsewhere still load:
| Written | What this site does |
|---|---|
h | Treated as b. German notation; it shows up occasionally in 3MLE scores |
Instrument commands starting with @ | Read but ignored. Sound on this site is decided by the instrument dropdown on the tab |
[ceg]4 chords | Retired. [ and ] are dropped as unrecognised characters and the note letters inside are read one after another as single notes — so a chord in an old score turns into a melodic run |
| A comma inside a single track | You are prompted to use Paste instead, which is what splits the text into separate tracks properly |
The MML@ prefix and trailing ; | Harmless when pasted into a single tab; parsing and export both deal with them for you |
The four most common mistakes
- Assuming
tonly affects its own track — it affects the whole piece. Several tracks each carrying their own tempo will always come out wrong. - Miscounting compounded dots — after
l4., a followingc.is still 1.5 beats. - Assuming
[ceg]still works — chord notation has been retired, and those three letters are read as three consecutive notes. Chords have to be split across tracks (see the FAQ). - Counting characters but not tracks — the limit is per track, not per piece. One track going over is not excused by another having room to spare.
If you would rather not type it letter by letter, you can draw it with the mouse instead — see the editor quick start, and what you draw turns into exactly the text above. To convert a whole existing piece, see MIDI to MML.