We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Music Macro Language: Difference between revisions

From SnesLab
Jump to: navigation, search
(Initial commit)
 
(added audio category)
 
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:
MML has many variations, but the majority of those languages share a similar syntax.
MML has many variations, but the majority of those languages share a similar syntax.


TODO: Info about globally-shared MML syntax
{| class="wikitable"
|-
! Syntax !! Description
|-
| <code>oX</code> || Set octave for the rest of notes before the next <code>&lt;</code>, <code>></code> and <code>oX</code>.<br>For example, <code>o6</code> will set the octave to 6.<br>The range is depending on platform.
|-
| <code>c</code>, <code>d</code>, <code>e</code>, <code>f</code>, <code>g</code>, <code>a</code>, <code>b</code> || Play a note. Use <code>+</code> or <code>-</code> after the letter to specify a sharp or flat, respectively.<br>A number should appear after the note; this number should denote the note's duration. 1 is a whole note, 2 is a half note, 4 a quarter note, 8 an eighth note, etc.<br>If no duration is specified, then the duration will be the value specified by the <code>l</code> command.
|-
| <code>r</code> || Play a rest. Similar to a normal note, the number after it defines its length.
|-
| <code>^</code> || Play a tie (extending pervious note, rest or tie). Similar to a normal note, the number after it defines its length.
|-
| <code>&lt;</code>, <code>></code> || Decrease or increase octave by 1. The direction is depending on platform, but both of them should be opposite each other.
|-
| <code>lXX</code> || Defining the default length of a note when the length is not specified.<br>For example, <code>l4</code> will set the default length to a quarter note.
|-
| <code>@</code> || Set instrument for a channel. The range is depending on platform.
|-
| <code>v</code> || Set channel volume. The range is depending on platform.
|}
 
== Convert to MML ==
There are a handful of tools help you convert other sequence formats to MML:
* [https://github.com/loveemu/petitemm PetiteMM], MIDI to MML command-line converter. [https://www.java.com/en/download/ Java] is required to use this tool.
 
== MML usage in SNES ROM hacking ==
There are a handful of tools known to incorporate MML syntax into editing the music for existing SNES games:
 
* [[ZScream Magic]], for [[The Legend of Zelda - A Link to the Past]]
* [[AddMusicY]], for [[Yoshi's Island]]
* [[AddMusic]], for [[Super Mario World]]
* [[LazyShell]], for [[Super Mario RPG]]
 
== See Also ==
* [http://gocha.hatenablog.com/entry/2013/09/02/Midi2MML_Comparison I Compared Various MIDI to MML Programs (Japanese)]
 
[[Category:Audio]]

Latest revision as of 09:30, 20 May 2023

Music Macro Language (MML) is a method of transcribing musical notation as sequence data, which then gets processed into binary performance data, akin to MIDI, for a computer to playback. Most popularly, this syntax can be used to create chiptune music.

Syntax

MML has many variations, but the majority of those languages share a similar syntax.

Syntax Description
oX Set octave for the rest of notes before the next <, > and oX.
For example, o6 will set the octave to 6.
The range is depending on platform.
c, d, e, f, g, a, b Play a note. Use + or - after the letter to specify a sharp or flat, respectively.
A number should appear after the note; this number should denote the note's duration. 1 is a whole note, 2 is a half note, 4 a quarter note, 8 an eighth note, etc.
If no duration is specified, then the duration will be the value specified by the l command.
r Play a rest. Similar to a normal note, the number after it defines its length.
^ Play a tie (extending pervious note, rest or tie). Similar to a normal note, the number after it defines its length.
<, > Decrease or increase octave by 1. The direction is depending on platform, but both of them should be opposite each other.
lXX Defining the default length of a note when the length is not specified.
For example, l4 will set the default length to a quarter note.
@ Set instrument for a channel. The range is depending on platform.
v Set channel volume. The range is depending on platform.

Convert to MML

There are a handful of tools help you convert other sequence formats to MML:

  • PetiteMM, MIDI to MML command-line converter. Java is required to use this tool.

MML usage in SNES ROM hacking

There are a handful of tools known to incorporate MML syntax into editing the music for existing SNES games:

See Also