Music Macro Language
From Wikipedia, the free encyclopedia
Music Macro Language (MML) is a music description language used in sequencing music on a number of computer and video game system platforms.
MML is also sometimes known as Music Markup Language, by conflation with the XML musical notation markup language of that name. For instance, what the video game Mabinogi refers to as "Music Markup Language" is actually a typical implementation of Music Macro Language.
Contents |
[edit] History
MML originally appeared in Microsoft BASIC and was common in the early 1980s on 16-bit era Japanese personal computers. It was especially popular on NEC's personal computers, such as the NEC PC-8801.[1] With the 2001 release of the mck (Music Creation Kit) software for compiling MML to play music on the Nintendo Entertainment System[2], awareness and use of MML has seen some revitalization.[3] MML is presently popular among Japanese electronic musicians[1] and musicians who create chiptunes[4] as a way to write music for the Nintendo Entertainment System.
[edit] Syntax
Where present, MML originally usually took the form of a specialized sub-language of a computer's dialect of BASIC, used as an argument to a PLAY
statement. This usage appears to originate with Microsoft BASIC, which forms the basis of many BASIC implementations.
MML code takes a simple textual format, whereby letters and numbers are used to describe a series of musical notes to be played by the computer's sound hardware.[1] In addition, various implementations of MML add system extensions allowing specific parameters of the audio synthesis to be altered with specialized commands, or to simplify the entry of common musical features such as arpeggios.
Though many platforms feature custom extensions to MML, and letter case requirements and other minor syntactical features vary slightly in some implementations, the fundamental set of syntax rules, commands, and features which defines MML and is present in whole or in part in all implementations is as follows:[1][5]
cdefgab
— The lettersa
throughg
correspond to the musical pitches and cause the corresponding note to be played. Sharp notes are produced by appending a+
or#
, and flat notes by appending a-
. The length of a note is specified by appending a number representing its length as a fraction of a whole note — for example,c8
represents a C eighth note, andf+2
an F♯ half note.r
— A rest. The length of the rest is specified in the same manner as the length of a note — for example,r1
produces a whole rest.o
— Followed by a number,o
selects the octave the instrument will play in.>
,<
— Used to step up or down one octave.l
— Followed by a number, specifies the default length used by notes or rests which do not explicitly define one. For example,l8 g a b g l16 g a b g
produces a series of four eighth notes followed by a series of four sixteenth notes.v
— Followed by a number, sets the volume of the instrument. The range of values allowed is dependent upon the specific sound hardware being used. Some implementations also allow an ADSR envelope to be applied to the amplitude of each note.t
— Followed by a number, sets the tempo in beats per minute. On hardware with more than one sound channel, it is often possible to set each channel to a different tempo.
In addition to these, most implementations add their own keywords and symbols for system-specific enhancements or extensions.
[edit] Programming languages, platforms, and software which use MML
Among others, MML appears in the following programming languages, platforms, and software applications:
- Microsoft's QBASIC, BASICA, and GW-BASIC all feature a
PLAY
statement which takes a string argument in the MML format.[6][7][8] The name "Music Macro Language" may originate with GW-BASIC, which provided a facility "to play music by embedding a music macro language into the string data type."[9] - The NEC PC-8801's BASIC dialect, N88-BASIC, used MML in its
PLAY
statement, as did several other implementations of BASIC produced or sold by NEC.[10][1] - The mck, pmck, and ppmck utilities for creating Nintendo Entertainment System music, and a number of other tools for creating music for other hardware, such as the Bandai WonderSwan, the TurboGrafx-16, and the Sega Genesis.[3]
- Some cellular phones utilize MML as a ringtone format.[11] The RTTTL ringtone language exhibits many of the characteristics of MML.
[edit] See also
- Chiptune
- Microsoft BASIC
- Nullsleep, a musician who uses MML
[edit] References
- ^ a b c d e Selfridge-Field, Eleanor (1997). Beyond Midi: The Handbook of Musical Codes. Cambridge: MIT Press. ISBN 0262193949.
- ^ VORC Internet Chiptune Encyclopedia - mck. Retrieved on 2008-02-13.
- ^ a b VORC Internet Chiptune Encyclopedia - MML. Retrieved on 2008-02-13.
- ^ VORC: VGM or Chiptune of The Year 2001 (2001-12-31).
- ^ Johnson, Jeremiah. MCK/MML Beginners Guide. Retrieved on 2008-02-13.
- ^ QBasic manual, Microsoft Corporation, 1991
- ^ IBM Personal Computer BASIC manual, IBM Corporation, 1982
- ^ BASICA manual, Microsoft Corporation, 1982
- ^ GW-BASIC manual, Microsoft Corporation, 1987
- ^ Koshiro, Yuzo. Interview with Kikizo Games. (Interview). Retrieved on 2008-02-13.
- ^ 着信メロディは再び自分で作る時代に?──MIDIファイルやWAVファイルを着メロに変換. ITmedia, Inc. (2001-04-03). Retrieved on 2008-02-13.
[edit] External links
- Mabinogi Web Composer is an example of MML usage, from Nexon's MMORPG, Mabinogi.
- 3ML Editor, MML editor for Mabinogi with MIDI import/export ability.
- mck compiler utility, which turns MML into Nintendo Entertainment System assembly language which can then be assembled into an NES program
- (Japanese) ppmck, an advanced patched version of mck with added features
- (Japanese) mml2mid, a utility for converting MML to MIDI sequences
- Ultimate PPMCK MML Reference