Music Macro Language

Music Macro Language

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.



MML originally appeared in Microsoft BASIC and was common in the early 1970s and 1980s on 8-bit and 16-bit era Japanese personal computers.The NEC PC-6001 installed on the Microsoft BASIC and hardware included the Programmable Sound Generator, made to 1981. The MML 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.


MML originated as a sub-language of BASIC, then generally included in ROM on micro-computers. A PLAY statement uses an argument to define a string of tones that the sound-chip played. MML code has a simple text format whereby letters and numbers are used to describe the musical notes to be played.[1] In addition, various implementations of MML add system extensions allowing parameters of audio synthesis to be altered with specialized commands or to simplify the entry of common musical figures 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 letters a to g 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, and f+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.

Languages, platforms and software

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 SBasic compiler from the German magazine DOS Extra, produced by DMV Widuch, offers the same PLAY command, and a few-line BASIC programme could be compiled into a small (few KiB) tool to play any MML files (often called *.PLY) given on the command line.
  • 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.[1][10]
  • 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]
  • The xpmck utility for creating music for various systems, including the Sega Master System, Sega Game Gear, Sega Genesis, Nintendo Gameboy and Commodore 64.
  • Some cellular phones utilize MML as a ringtone format.[11] The RTTTL ringtone language exhibits many of the characteristics of MML.
  • An escape sequence was defined to allow terminal programs play music encoded in MML. Because of this music in MML is sometimes called ANSI Music.[12]
  • On MSX computer system built in MSX BASIC also uses MML with PLAY-command. Comma separated strings represent separate voice channels. Music hardware expansions such as MSX-Music, MSX-Audio and MSX-MIDI expand PLAY-command so that also FM-chips and external MIDI devices can be controlled through MML.
  • OpenBSD and MirOS BSD offer /dev/speaker[13] in a GW-BASIC-compatible format

See also


  1. ^ a b c d e Selfridge-Field, Eleanor (1997). Beyond Midi: The Handbook of Musical Codes. Cambridge: MIT Press. ISBN 0262193949. 
  2. ^ "VORC Internet Chiptune Encyclopedia - mck". Archived from the original on 2008-01-03. Retrieved 2008-02-13. 
  3. ^ a b "VORC Internet Chiptune Encyclopedia - MML". Archived from the original on 2007-11-23. Retrieved 2008-02-13. 
  4. ^ "VORC: VGM or Chiptune of The Year 2001". 2001-12-31. 
  5. ^ Johnson, Jeremiah. "MCK/MML Beginners Guide". Retrieved 2008-02-13. 
  6. ^ QBasic manual. Microsoft Corporation. 1991 
  7. ^ IBM Personal Computer BASIC manual. IBM Corporation. 1982 
  8. ^ BASICA manual. Microsoft Corporation. 1982 
  9. ^ GW-BASIC manual. Microsoft Corporation. 1987 
  10. ^ Koshiro, Yūzō. Interview with Kikizo Games. Retrieved 2008-02-13. 
  11. ^ "着信メロディは再び自分で作る時代に?──MIDIファイルやWAVファイルを着メロに変換". ITmedia, Inc.. 2001-04-03. Retrieved 2008-02-13. 
  12. ^ "ANSI Music - The Technical Details". Retrieved 2009-01-16. 
  13. ^ speaker(4) manual page

External links

Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Music Markup Language — Not to be confused with Music Macro Language, a computer music notation format which is not an application of XML. Music Markup Language (MML) is an XML application to describe music objects and events, using different modules and markup. MML can …   Wikipedia

  • Audio programming language — An audio programming language is a programming language specifically optimized for sound and music production or sound synthesis. Some of the languages below are optimized more for music composition, and some are optimized more for synthesis. For …   Wikipedia

  • Computer music — is a term that was originally used within academia to describe a field of study relating to the applications of computing technology in music composition; particularly that stemming from the Western art music tradition. It includes the theory and …   Wikipedia

  • Ring Tone Transfer Language — Ring Tone Text Transfer Language (RTTTL) was developed by Nokia[citation needed] to be used to transfer ringtones to cellphone by Nokia. The RTTTL format is a string divided into three sections: name, default value, and data. The name section… …   Wikipedia

  • English language — Language belonging to the Germanic languages branch of the Indo European language family, widely spoken on six continents. The primary language of the U.S., Britain, Canada, Australia, Ireland, New Zealand, and various Caribbean and Pacific… …   Universalium

  • Mouse (programming language) — The Mouse programming language is a small computer programming language developed by Dr. Peter Grogono in the late 1970s and early 1980s.[1][2] It was developed as an extension of an earlier language called MUSYS, which was used to control… …   Wikipedia

  • Chord (music) — Instruments and voices playing and singing different notes create chords. This article describes pitch simultaneity and harmony in music. For other meanings of the word, see Chord. A chord in music is any harmonic set of two–three or more notes… …   Wikipedia

  • Domain-specific language — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • Common Lisp the Language — is an influential book by Guy L. Steele about Common Lisp. Contents 1 History 1.1 Before standardization 1.2 During standardization 1.3 A …   Wikipedia

  • History of the Dylan programming language — Dylan programming language history first introduces the history with a continuous text. The second section gives a timeline overview of the history and present several milestones and watersheds. The third section presents quotations related to… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”