MML follows the marking philosophy of the successful HTML (which is a child language of SGML) closely. The basic structure of a MML marked song contains the following components:
<mml><head>...</head>
<title>,
<meta / >, <link /> and <style><song>...</song>
<bar>,
<instrument> and so on</mml>When marking a song, a number of the structural objects need to be declared only once. Except when they are overridden, these default declarations will be implemented throughout the song.
Some of these default objects are:
Apart from staff, these objects are declared as attributes of particularly the song element.
Details of these objects are given in the respective sections.
Nesting refers to declaring one element as the content of another. The element containing the other element is called the parent element. The contained element is called the child element. The end tag of a child element must occur before the end tag of its parent.
In this example the div and bar elements form a nested set.
In division 1 the tempo is 120BPM, in division 2 it is 130BPM
<div tempo="120"> <bar barid="1">... <bar barid="2">... ... <bar barid="n">... </div> <div tempo="130"> <bar barid="1">... <bar barid="2">... ... <bar barid="n">... </div>
The characters and symbols in this section have a special meaning in MML. They apply to simultaneous (or vertical) and sequential (or horizontal) groups of notes.
Music often consists of groups of events on two different planes. A set of events can occur simultaneously, such as a group of notes that are played together, and vertically displayed in the visual staff notation. A set of events can also occur sequentially one after another, horizontally displayed in the visual staff notation. For each of these kinds of sets different notation convention is necessary to distinguish between them.
In MML simultaneous events are grouped together inside the square brackets [ and ].
Here is an example of notes that are played simultaneously:
[A C E]
The notes A C and E form a chord group
played simultaneously.
If these notes belong to octave 3, they are marked as
3[A C E]
In MML sequential events are grouped together inside the round brackets ( and ).
Here is an example of a sequence that is repeated 5 times:
Long form:
A B C A B C A B C A B C A B C
= short form:
(A B C)5
The octave can be declared either with the octave value of the noteset attribute, or with the octave number preceding the note name, as in this long form for a series of notes in the 5th octave:
5B 5C 5B 5D
This can be written in a short form as:
5(B C B D)
If this sequence is to be repeated, it is written as:
5(B C B D)4
This sequence is repeated 4 times.
If, say note C is in the 3rd octave, the sequence is written as
5(B 3C B D)
Note
The sequences 5(B C B D)4 and 5(B C B D):4 have different
meanings.
In 5(B C B D)4 the sequence 5(B C B D) is repeated
4 times. In 5(B C B D):4 each note in the sequence is a quarter
note. A colon preceding a number inicates note length value. If the quarter
note sequence is to be repeated 4 times, the markup would be: (5(B C B
D):4)4 .
In this long form example the groups of notes to be played simultaneously are all in the 5th octave:
[5B 5D] [5C 5E] [5B 5D] [5D 5Fs]
As all the notes are in the 5th octave, the short form does not need to repeat that fact. The sequence can be declared as:
5([B D] [C E] [B D] [D Fs])
If this sequence is to be repeated 3 times, it is indicated as follows:
5([B D] [C E] [B D] [D Fs])3
In the following example the octave number 3 applies only to the note Gs.
All of the other notes are in the 4th octave (marked with the noteset
attribute). A number immediately following square brackets (which indicate simultaneous
notes) does NOT indicate multiplication.
<bar barid="6" note="4" noteset="4"> [A:8 D]3Gs:8 </bar>
This is translated as:
Bar with ID 6 consists of quarter notes. All notes occur in the noteset "octave" with a value of 4 (i.e. 4th octave). Notes A and D are played together. Note A is an eighth note. The group A and D are played simultaneously followed by an eighth G-sharp note on octave 3.
Songs may have unique names on a specific system, but names that are globally unique is a different matter, as the same song may have many different variations, performed differently by the same artist, as well as by many different artists, while different songs can have exactly the same names. A system similar to the ISBN system used for books will work better in the context of unique global names. Such a unique global song naming shceme should include the following details:
The global naming scheme will be considered at a later stage of MML development.
© 1999, 2000 Author: Jacques Steyn