Use track prefixes (MCK/MML)
Supported MML:
- CDEFGAB[<len>]: Play a note in the current octave, optionally with a length
- R[<len>]: Play a rest, optionally with a length; may also use P or ~
- + or #: Raise (sharp) the previous note by a half-step
- -: Lower (flat) the previous note by a half-step
- N<n>: Play the note n with the default note length; may also use J
- L<len>: Set the default note length (1/len)
- .: Extend the previous note or rest by half
- _: Slur the previous note into the next note
- &: Tie the previous note into the next note TODO: support C2&8
- O<n>: Set the current octave to n
- >: Increase the current octave by one
- <: Decrease the current octave by one
- T<n>: Set the tempo to n quarter notes per minute
- V<n>: Sets the velocity (attack volume) of notes; may also use K
- Q<n>: Sets how long notes are audible before release; 8 is legato, 1 is staccatissimo
- ML: Plays notes legato, equivalent to Q8
- MN: Plays notes at normal length, equivalent to Q7
- MS: Plays notes staccato, equivalent to Q6
- #: If the first character on a line, ignores the rest of the line as a comment
- :<n>: Sets the current track
- , or ;: Switches to the next track
Not Yet Implemented MML:
- I<n>: Assigns the current track to instrument n
- @<n>: Sets the waveform of the current instrument
- )<n>: Increases the velocity of notes
- (<n>: Increases the velocity of notes
- @P<n>: Sets the pan location of the current instrument (0 = left, 64 = center, 127 = right)
- @D<n>: Detunes the current instrument by n cents
- @V<n>: Sets the gain of the current instrument to n percent
- @E: Prefix for envelope control
- @M: Prefix for modulator control
- @F: Prefix for filter control
- @L: Prefix for LFO control
- @R: Prefix for ring modulator control
- @U: Prefix for portamento control
- @Q: Absolute gate control
- [<mml>][<n>]: Repeats mml a total of n times (default 2); may also use /:<mml>:/
- {<name>=<mml>}: Defines a macro named name equivalent to mml; may also use X<name>=<mml>;
- {<name>}: Plays back the macro named name; may also use X<name>;
- $<n>=<value>: Sets variable $n to value
- $<n>: Uses the value of variable $n for a numeric parameter
- ON or OL: Enables octave tracking
- /*<text>*/: Ignores text as a comment
- *: Long portamento between notes
- [@]Ns<n>: Transpose by n half-steps (@ for relative)
- #<pragma>: Interpreter pragmas (to be documented: #VELOCITY #OCTAVE #WAV)
- :: Breaks out of last iteration of loop