Skip to content

Music Macro Language

A score written as text, played by a driver

MML describes notes and performance settings with text commands. A language implementation turns that score into timed sound operations; MSX BASIC’s PLAY and Japanese game-music tools use related ideas with different dialects.

A music program need not present a grid of notes. Music Macro Language, or MML, writes a score as text: note letters, durations and commands for settings such as octave and tempo. Another part of the system interprets or compiles that description and arranges the sound operations at the right times.

The distinction is between the score and the player. MML text does not itself generate an electrical waveform. A sound driver and the machine’s audio hardware do that work.

One documented dialect: MSX PLAY

Sony’s MSX-BASIC Programming Reference Manual describes music strings for the PLAY statement. Letters identify notes; commands including O, L and T set octave, default note length and tempo. Variables can hold strings, allowing a phrase to be reused rather than typed into every occurrence.

PLAY can take up to three strings for simultaneous parts. That fits the AY sound generator used in the MSX system. The strings describe musical intentions; BASIC’s music machinery schedules the corresponding work. The manual’s examples also distinguish a musical rest from the length of the note before it.

An MML score passes through a parser or compiler, then a timed sound driver, then sound-chip registers. The text score and the hardware waveform are different stages.
Original Code198x diagram. Implementations may combine stages or compile the score in advance. The notation must match the driver’s dialect.

The tool can change with its composer

Yuzo Koshiro described using a PC-88 and a heavily modified MML-derived language for his work. He called his system Music Love. His account connects the notation to a composer’s own tools; it does not imply that an MSX PLAY string can be sent unchanged to a Mega Drive sound chip.

Different MML implementations add different instruments, effects and control commands. A score needs the correct language rules and a compatible player. Its destination might use a programmable tone generator, FM synthesis or another arrangement.

The contrast with tracker music is a useful one: a tracker exposes rows, channels and effect columns visually, while MML makes similar sequencing decisions through text. Both still depend on an implementation that turns musical events into timed updates. The sound drivers entry explains that next layer.

Sources

  • Sony, MSX-BASIC Programming Reference Manual, music and PLAY sections: the concrete dialect described here. MSX documentation archive.
  • Yuzo Koshiro, Kikizo interview, 14 October 2005: retrospective account of his PC-88 and Music Love workflow. Original interview.

Checked. Verified against primary sources and signed off by a person.