Skip to content
Snippets Groups Projects
Unverified Commit 0f2fe94e authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

improve MML documentation and rendering thereof

we don’t distinguish between BSD extensions and FlopPI-Music ones
any more, given mmllint outputs BASIC MML, so drop extension note
about barline (which BSD ignores already anyway)
parent 9856d755
No related branches found
No related tags found
No related merge requests found
......@@ -8,73 +8,98 @@ the IBM BASICA “PLAY” command.
Symbols of MML
--------------
:A-G[#,+,-][length]:
A-G are notes. # or + following a note produces a sharp; - produces a
flat.
:L(n):
Sets the length of each note. L4 is a quarter note, L1 is a whole note,
and so on. n may be from 1 to 64. Length may also follow the note to
change the length for that note only. A16 is equivalent to L16A. Default
is L4.
:A-G[\ *acc*\ ][\ *n*\ ]:
``A`` to ``G`` are notes (``C``, ``D``, ``E``, ``F``, ``G``, ``A``,
``B``, corresponding to *do*, *re*, … in fixed-\ *do* systems). An
optional ``#`` or ``+`` following a note raises the note by one semitone
(musical sharp or diesis, ♯ accidental), a ``-`` lowers by one semitone
(musical flat or bemolle, ♭ accidental). An optional length (see below)
and augmentation dots may then follow.
:L\ *n*:
Sets the default length of each note to *n*. ``L4`` is a quarter note,
``L1`` a whole note, and so on. Valid values for *n* range from ``1``
to ``64``. Length may also follow a letter note to change the length
for that note only: ``A16`` is equivalent to ``L16A``. Default is ``L4``.
:ML:
Music legato. Each note plays the full period set by L. While not
explicitly specified, most implementations tie sequences of identical
pitch where all (but the last) are styled legato. Otherwise, or if
the pitch differs, the notes are played with a slur.
Music legato. Each note plays the full period set by ``L`` (length).
While not explicitly specified, most implementations tie sequences of
identical pitch where all (but the last) involved notes are styled legato.
Otherwise, or if the pitch differs, the notes are played as if notated
with a slur, with minimal rearticulation.
:MN:
Music normal. Each note plays seven-eighths of the time determined by L
(length). This is the default.
Music normal. Each note plays seven-eighths of the time determined by
``L`` (length). This is the default.
:MS:
Music staccato. Each note plays three-quarters of the time determined by
L.
:N(n):
Play note n. n may range from 0 to 84. In the 7 possible octaves, there
are 84 notes. n set to 0 (or omitted) indicates a rest.
:O(n):
Octave 0 sets the current octave. There are 7 octaves (0 through 6).
Default is 4. Middle C is at the beginning of octave 2. The special
values L and N control octave tracking. L enables octave tracking, N
disables it; with octave tracking enabled, jumps between notes are
limited to 6 half-tones, otherwise, the octave is incremented or
decremented accordingly. Octave tracking is disabled by default.
Octave tracking is suspended for one note after an octave change,
including setting the default octave at the beginning of the track,
and only applies to letter notes.
:P(n):
Pause. n may range from 1-64; the current L value is used if omitted.
:T(n):
Tempo. T sets the number of L4s in a minute. n may range from 32-255.
Default is 120.
``L`` (length).
:MF or MB:
Music foreground or background. These BASIC features are silently ignored
as they cannot be reproduced in other MML-interpreting environments.
:N\ *n*:
Play note number *n*. *n* may range from ``0`` to ``84``: in the seven
possible octaves, there are 84 notes, as an octave is comprised of twelve
semitones; ``N1`` plays ``O0C``, ``N2`` plays ``O0C#``, etc. Setting *n*
to ``0`` (or omitting it) plays a musical rest.
:OL:
Enables octave tracking. In octave tracking mode, letter notes will be
placed at an octave to minimise the distance to the previous letter note;
manually setting the octave (with O\ *n*\ , ``<`` or ``>``) temporarily
suspends octave tracking for one letter note. The N\ *n* command is not
affected by, and does not affect, octave tracking. The playlist has an
implicit ``O4`` command at the beginning to set the default octave, so
the first letter note in a track is not affected either.
:ON:
Disables octave tracking (see above). This is the default.
:O\ *n*:
Sets the current octave to *n*. There are seven octaves (numbered ``0``
through ``6``); their number corresponds to the SPN (scientific pitch
notation) octave number minus two, so that ``O2C`` plays C₄ (Middle C).
Default is ``O4``.
:P\ *n*:
Pause (a musical rest). *n* may range from ``1`` to ``64``; the current
``L`` (length) value is used if omitted.
:T\ *n*:
Tempo (“bpm”, beats per minute). Sets the number of quarter notes (``L4``)
in a minute. *n* may range from ``32`` to ``255``. Default is ``T120``.
:X\ *varptr*\ ;:
An ``X`` causes everything up to and including the next semicolon ``;``
to be skipped (ignored). The original BASIC feature cannot be replicated
in other MML-interpreting environments (such as spkr(4) or MMLlib).
:. (period):
A period after a note increases the playing time of the note by 3/2
times the period determined by L (length of note) times T (tempo).
Multiple periods can appear after a note, and the playing time is scaled
accordingly. For example, A. will cause the note A to play one and half
times the playing time determined by L (length of the note) times T (the
tempo); two periods placed after A (A..) will cause the note to be
played at 9/4 times its ascribed value; an A with three periods (A...)
at 27/8, etc. Periods may also appear after a P (pause), and increase
the pause length as described above.
Each ``.`` (augmentation dot) after a note (letter note or N\ *n* command)
or rest (P\ *n* or ``N0`` command) multiplies the length of that note or
rest by ³⁄₂. For example, ``A.`` will cause the note A (*mi*) to play one
and a half times the playing time determined by ``L`` (length) divided by
``T`` (tempo); two augmentation dots placed after A (``A..``) will cause
the note to be played at ⁹⁄₄ times its ascribed value; an A with three dots
(``A...``) at ²⁷⁄₈, etc.
:>:
A greater-than symbol raises the current octave by one.
A greater-than symbol ``>`` raises the current octave by one.
:<:
A less-than symbol lowers the current octave by one.
A less-than symbol ``<`` lowers the current octave by one.
:\|:
Optionally used as a synchronisation mark for multi-track music. This is
a proprietary extension in the Floppi-Music project.
A bar symbol ``|`` can be used as a synchronisation mark for multi-track
music, and to group notes into measures; ``mmllint``’s normalised MML output
emits a space so they can still be distinguished.
Some of these are extensions. The ``mmllint`` command’s track export
displays a BASIC MML equivalent of the input with extensions resolved.
Comments
--------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment