-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Welcome to the mmlgb wiki!
Command | Description |
---|---|
; |
Comment. Remaining part of line is ignored. |
ABCD |
Defines current channel(s). A is square 1, B is square 2, C is wave channel and D is noise.Multiple channels can be used e.g. AB t120 cdef...
|
cdefgab |
Play note. Append # /+ for sharp notes and - for flat notes. |
r |
Rest. Specify length by appending number. |
o |
Followed by number to change octave. |
> ,<
|
Go one octave up or down. |
l |
Followed by number specifies default note length. Add . /.. for dotted and double dotted notes. |
v |
Followed by number 0-15 sets channel volume. Volume is not changed until note is retriggered. Channel 3 (wave) only takes values 0-3. |
t |
Set tempo in BPM. Affects all channels at once. |
w |
Wait. Specify length by appending number. Similar to r but does not mute current note. |
y |
Followed by either -1 , 0 or 1 sets channel panning. -1 is left channel only, 1 is right channel only and 0 is both. |
L |
Set loop point. |
All numbers are assumed to be decimal numbers. Use 0x
prefix for hex numbers (e.g. 0xA3
is 163) or 0b
for binary (e.g. 0b10100011
).
Specify length by appending number, e.g. c#4
is a C# quater note. Add .
/..
for dotted and double dotted notes. Supported lengths:
Value | Length | Frames |
---|---|---|
1 |
Whole note | 192 |
2 |
Half note | 96 |
3 |
Half triplet note | 64 |
4 |
Quarter note | 48 |
6 |
Quarter triplet note | 32 |
8 |
Eighth note | 24 |
12 |
Eighth triplet note | 16 |
16 |
Sixteenth note | 12 |
Use =X
to set frame specific length, e.g. c#=4
for 4 frames.
The follow notes are valid for each channel. Using notes outside of these ranges is undefined.
Channel | First note | Last note |
---|---|---|
(A) Square 1 | C2 |
B8 |
(B) Square 2 | C2 |
B8 |
(C) Wave | C2 |
B8 |
(D) Noise | C1 |
G8 |
Wave channel data is defined using the @wave
macro. It takes an identifier and 32 4-bit samples (values from 0-15).
A triangle wave can for instance be defined with:
@wave0 = {7 8 9 10 11 12 13 14 15 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7}
This data can then be loaded to the channel using @wave0
.
The volume envelope for channels 1, 2 and 4 are changed using the @ve[length]
macro, where length
is a number from -7 to 7. When length
< 0 the volume is decreasing, when length
> 0 it is increasing.
For instance @ve-3
sets a short, decreasing envelope.
Wave pattern duty for channel 1 and 2 is set using the @wd[duty]
macro, where duty
is a number from 0-3. For instance @wd2
set a 50% duty cycle.
_
0 | | | 12.5%
| |_____________|
___
1 | | | 25%
| |___________|
_______
2 | | | 50%
| |_______|
___________
3 | | | 75%
| |___|
- Dots must follow a length. This means
A l4 c.
is not allowed. UseA c4.
for now.