Difference between revisions of "Music Macro Language"

From Video Game Music Preservation Foundation Wiki
Jump to: navigation, search
Line 8: Line 8:
 
}}
 
}}
  
'''''Music Macro Language''''' or '''''Music Markup Language''''' is an abstract digital notation format for music. There is no standard format to MML; because it can be made for any audio hardware, it it is different for every interpreter and it differs for every device it's played on, and differs The format differs both from the device that it's played on and the program that interprets it. It can be seen in many different early computer programming languages and variations of it have been created by various game developers. It has been used by developers for pretty much every early videogame system including arcade games, home computers, and gaming consoles.
+
'''''Music Macro Language''''' or '''''Music Markup Language''''' is an abstract digital notation format for music. Because digital music can be made on numerous audio chips, each with unique capabilities, there is no standard format to MML. The format has always been dictated by the interpreting program and attempts to create a standard format have met with limited success. MML can be seen in many different early computer programming languages and variations of it have been created by various game developers. Various versions of it have been made for pretty much every early audio chip found in arcade games, home computers, and gaming consoles.
  
Companies like [[Beam Software]] and [[Color Dreams]] used a form of it for their Nintendo games, and even modern day trackers use it to send audio data to the various audio chips on the NES.
+
Specific companies like [[Beam Software]] and [[Color Dreams]] used custom forms for their Nintendo games, and even some modern day trackers use it to send audio data to the various audio chips.
 +
 
 +
==Examples==
 +
===Microsoft BASIC===
 +
This will play [[Ode to Joy]] on the [[PC Speaker]].
 +
10 PLAY "O2 T120 E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 E8 E8 E8 D12 D4"
 +
20 PLAY "E8 E8 F8 C8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4"
 +
30 PLAY "D8 D8 E8 C8 D8 E12 F12 E8 C8 D8 E12 F12 E8 D8 C8 D8 P8"
 +
40 PLAY "E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4"
 +
 
 +
 
 +
===Sharp BASIC===
 +
This plays the Japanese song "Toryanse" in MZ-731 Sharp S-BASIC 1Z-007B.
 +
 
 +
10 TEMPO 4
 +
20 A$="E5R1E3R0D3R0E3R0E1R0D1R0-G4R1"
 +
30 B$="F3R0F1R0F1R0A3R0F1R0E1R0D1R0D1R0E5R0"
 +
40 C$="C3R0C1R0C1R0E3R0C1R0-B1R0C1R0-B1R0-A1R0-A1-B5R0"
 +
50 D$="E1R0E1R0E1R0E1R0E1R0E1R0D1R0E1R0E1R0E1R0D1R0-A1R0-A1R0B3R1"
 +
60 E$="-A1R0-B1R0C1R0D1R0E1R0F1R0E1R0F3R1A3R1B1R0A1R0F3R0E3R0E1R0E4R0"
 +
70 MUSIC A$+B$+B$
 +
80 MUSIC C$+C$+B$
 +
90 MUSIC C$+D$+E$
  
===Examples===
 
====Microsoft BASIC====
 
This will play a quick scale on the [[PC Speaker]].
 
PLAY "A60 B60 C60 D60 E60 F60 G60"
 
  
 
====NES====
 
====NES====
Here is an example of a song written in MML for the NES:
+
Here is an example of a song written for the NES.
 +
 
 
  #TITLE Song Title
 
  #TITLE Song Title
 
  #COMPOSER Composer
 
  #COMPOSER Composer
Line 35: Line 54:
 
  D o0
 
  D o0
 
  D [@v2 b @v3 e @v2 b @v3 e @v2 b @v3 e @v2 b @v3 e8 @v2 b8]4
 
  D [@v2 b @v3 e @v2 b @v3 e @v2 b @v3 e @v2 b @v3 e8 @v2 b8]4
 
While it may look complicated, it is actually much easier than it looks:
 
@v# represents the instrument's envelopes.
 
@DPCM# loads the digitized samples for the NES' DPCM channel.
 
ABCDE t150 represents the channels' tempo.
 
Channel A is pulse 1, channel B is pulse 2, C is the triangle channel and D is the noise channel.
 
l# is the main length of the notes. o# is the octave number.
 
'c' to 'b' represent the note. The numbers next to the note represent the length of the note. For example: c16 would be note C as a sixteenth note.
 
The brackets ([ and ]#) represent that the song loops and how many times it will loop.
 
  
  
 
==Players==
 
==Players==
 
 
==Editors==
 
 
 
==Converters==
 
  
  

Revision as of 18:04, 14 August 2013

[[Category: Formats With {{{Header}}} Headers]] [[Category: Formats With {{{Content}}} Content]] [[Category: Formats With {{{Instruments}}} Instruments]]
Music Macro Language
MML.png
Developer: N/A
Header: {{{Header}}}
Content: {{{Content}}}
Instruments: {{{Instruments}}}
Target Output
Output - Digital Audio - No.png Output - MIDI - No.png Output - FM Synthesis - No.png Output - PSG - No.png
Released: N/A
Extensions
  • *.mml

Music Macro Language or Music Markup Language is an abstract digital notation format for music. Because digital music can be made on numerous audio chips, each with unique capabilities, there is no standard format to MML. The format has always been dictated by the interpreting program and attempts to create a standard format have met with limited success. MML can be seen in many different early computer programming languages and variations of it have been created by various game developers. Various versions of it have been made for pretty much every early audio chip found in arcade games, home computers, and gaming consoles.

Specific companies like Beam Software and Color Dreams used custom forms for their Nintendo games, and even some modern day trackers use it to send audio data to the various audio chips.

Examples

Microsoft BASIC

This will play Ode to Joy on the PC Speaker.

10 PLAY "O2 T120 E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 E8 E8 E8 D12 D4"
20 PLAY "E8 E8 F8 C8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4"
30 PLAY "D8 D8 E8 C8 D8 E12 F12 E8 C8 D8 E12 F12 E8 D8 C8 D8 P8"
40 PLAY "E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4"


Sharp BASIC

This plays the Japanese song "Toryanse" in MZ-731 Sharp S-BASIC 1Z-007B.

10 TEMPO 4
20 A$="E5R1E3R0D3R0E3R0E1R0D1R0-G4R1"
30 B$="F3R0F1R0F1R0A3R0F1R0E1R0D1R0D1R0E5R0"
40 C$="C3R0C1R0C1R0E3R0C1R0-B1R0C1R0-B1R0-A1R0-A1-B5R0"
50 D$="E1R0E1R0E1R0E1R0E1R0E1R0D1R0E1R0E1R0E1R0D1R0-A1R0-A1R0B3R1"
60 E$="-A1R0-B1R0C1R0D1R0E1R0F1R0E1R0F3R1A3R1B1R0A1R0F3R0E3R0E1R0E4R0"
70 MUSIC A$+B$+B$
80 MUSIC C$+C$+B$
90 MUSIC C$+D$+E$


NES

Here is an example of a song written for the NES.

#TITLE Song Title
#COMPOSER Composer
#PROGRAMER Copyright
@v0 = { 10 9 8 7 6 5 4 3 2 }
@v1 = { 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 }
@v2 = { 15 12 10 8 6 3 2 1 0 }
@v3 = { 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 }
@DPCM0 = { "samples\kick.dmc",15 }
@DPCM2 = { "samples\snare.dmc",15 }
ABCDE t150
A l8 o4 @01 @v0
A [c d e f @v1 g4 @v0 a16 b16 >c c d e f @v1 g4 @v0 a16 b16 >c<<]2
C l4 o3 q6
C [c e g8 g8 a16 b16 >c8 c e g8 g8 a16 b16 >c8<<]4
D o0
D [@v2 b @v3 e @v2 b @v3 e @v2 b @v3 e @v2 b @v3 e8 @v2 b8]4


Players

Games

Category:Games That Use MML.


Links