MML stands for Music Macro Language and is used to describe sheet music on a computer. It dates back to the 70s, and saw it's big boom in the BASIC environment of Japanese microcomputers. As it evolved, players and editors also came to be, and it became one of the most common ways to create music for fun, or for commercial software.
The following is a brief syntactical explanation based off of what is seen most commonly in MML for MSX, PC-98, and PC-Engine using Squirrel. Your mileage my vary slightly, so always check your MML system's documentation.
Character | Meaning |
---|---|
cdefgab | A note of music. May optional be followed by a number representing note length |
+ or # | Sharp a note |
R | A rest |
T# | The tempo with a number |
O# | The octave (usually 1 thru 8) |
V# | The volume (usually 0-15 or 0-31) |
> or < | Shift an octave up or down one |
L#. | The default note length (One of musical significance: 1,2,4,8,16,32,64) |
& | Tie. Used to tie two notes without a retrigger. Great for legato |
Lifted from a larger MML file for Shadow of the Beast's music, redone for PCE by Arkhan
l1o1afcgafcgaal2cfcfcfcffcfcfcfffccl1afcgafcgaal2cfcfcfcffcfcfcfffccl1afcgafcg
Listen to the full song here: Shadow of the Beast Plains Theme For PCE (mp3)