-
Notifications
You must be signed in to change notification settings - Fork 53
Music Macro Language
HASUMI Hitoshi edited this page Aug 31, 2022
·
4 revisions
Feature | Version |
---|---|
Music Macro Language | 0.9.18+ |
MML (Music Macro Language) is a DSL to describe music. PRK supports an MSX-like MML.
See also Sounder.
All instructions are case insensitive.
Instruction | Effect | Values | Example |
---|---|---|---|
T<tempo> | Specifies tempo of the song | tempo: 1 to any(default: 120 ) |
T200 , T60
|
O<octave> | Specifies octave of the notes after this instruction. Each octave starts from C and ends at B
|
octave: 0 to 9 (default: 4 ) |
O5 , O8
|
L<fraction>[<dot>] | Specifies the length of the notes after this instruction | fraction: 1 to anydot: . (multiple dots allowed)
|
L2. , L16
|
A to G[<semitone>][<fraction>][<dot>] | Specifies a note from the scale, optionally with a semitone and/or fraction and/or dot(s) |
C D E F G A B semitone: + - fraction: 1 to anydot: . (multiple dots allowed)
|
C+8.. |
R[<fraction>][<dot>] | Specifies a rest | fraction: 1 to anydot: . (multiple dots allowed)
|
R , R1.
|
< | Increases one octave after this instruction |
O4 A < A is equivalent to O4 A O5 A
|
|
> | Decreases one octave after this instruction |
O4 A > A is equivalent to O4 A O3 A
|
|
Q<sustain> | Specifies the ratio of the actual sounding length of the note length derived from the <fraction> value. Formula: <sustain> / 8
|
sustain: 1 to 8 (default: 8 ) |
Q4 A4 A4 is equivalent to Q8 A8 R8 A8 A8 Q8 A4 A4 is equivalent to Q8 A2
|
Operand | Effect | Default | Example |
---|---|---|---|
<fraction> | Represents a fraction of a whole note to specify the length of a note or a rest. For example, 4 is a quarter note |
4 |
L8 , C1 , R3
|
<semitone> | Optionally raises or lowers by a semitone the note just before it |
C- , A+
|
|
<dot> | Optionally adds a half of the length to the note or rest just before it. Multiple periods are also valid |
L2. , C.. , R8.
|
- Getting started
- Keyboard features
- Keycodes (ja)
- Mouse (ja)
- Layers and mode key (ja)
- Debounce
- Composite key
- Split-type keyboard
- Keyscan matrix
- Num Lock, Caps Lock and Scroll Lock
- Useful methods that make you free
- BIOS mode
- Other features
- Examples
- Development
- Contribute to the Wiki
- FAQ