MMLReference - onitama/mucom88 GitHub Wiki

MUCOM88 Reference Manual

■ Track Structure

You can specify a track by putting it at the beginning of a line. With YM2203 (OPN) only A to F can be used, and with YM2608 (OPNA/Soundboard II) all A to K can be used. The G-track of the Rhythm Source and the K-track of the ADPCM Source differ in some ways from the other parts in how they are described in MML.

Track Details Remarks
A FM Ch.1
B FM Ch.2
C FM Ch.3
D SSG ch.1
E SSG ch.2
F SSG ch.3
G Rhythm (OPNA Feature)
H FM Ch.4 (OPNA Feature)
I FM Ch.5 (OPNA Feature)
J FM Ch.6 (OPNA Feature)
K ADPCM (OPNA Feature)

■ How to write basic MML

(Example)

A t210 @70o3v15l16 [a8>aa<]4

Note : With tone number 70 and volume 15, loop a 'A' eighth note, a 'A' sixteenth note, and a 'A' sixteenth note four times.

■ MML grammar

Grammar Function
C Clock (resolution) per whole note (default is C128)
t Tempo setting for direct value of Timer B of FM sound chip
T Tempo (the number of quarter notes played per minute)
@ Tone Number(FM/SSG/PCM) or Preset Tone Number(0 to 15) in SSG
@"..." [FM] Specifying a tone by tone name
o [FM/SSG] absolute octave (o1 to o8, default o6), [ADPCM] o1 is highest o2,o3 to lower
v [FM/SSG] absolute volume specification (0~15), [ADPCM] (0 to 255)、[Rhythm] vn1,n2,n3,n4,n5,n6,n7 (ALL,BD,SD,CY,HH,TM,RY)
q From the entire length of the sound, the number of clocks can be used to specify when to accelerate the key-off. (Staccato).
p Pan (0=none, 1=right, 2=left, 3=center)on Rhythm track bit0~3:type(0 to 5), bit4,5:Pan(1,2,3) (You can specify hexadecimal with $. Example: p$12 = cymbal to the right)
l default length specification
cdefgab Specifies the pitch of the note (if necessary, followed by the key signature (+ is sharp, - is flat), and the length of the note value. . Dotted points can be specified)
r rest
% When you want to specify the default length of sound by the clock, put a space before it.
D Detune (-32768~32767) If + is specified behind, the value is relative to the current value, not absolute.
> Octave relative specification (up)
< Octave relative specification (down)
) Relative volume specification (up) 16 steps )n can be used to specify the amount that changes at a time by a numerical value (256 steps for ADPCM).
( Relative volume specification (down) 16 steps )n can be used to specify the amount that changes at a time by a numerical value (256 steps for ADPCM).
& Tie/Legato (omitting key-off/key-on for front and rear sounds)
^ make a connection to next length
{…} Portamento. Portamento to c→b in {c2b} The number specifies the sound length. It is possible to cross octaves.
[…]n Loop start position and loop end position. Specify the number of times to repeat by putting a number behind it
/ Loop escape position specification [ ] in the loop, the last loop will escape the loop at the / position.
L Loop position of the whole song (only one position in each part can be specified)
K Absolute transposition (-128 to +128) Only one repetition in the loop.
V Specify the relative change in volume (increase or decrease in the value of subsequent v-commands, evaluation at compile time)
¥=n1,n2 Echo macro. n1(0-9) specifies the number of previous notes, n2(optional) specifies the number of volume reduction.
¥ ¥=n1,n2 Replace with the sound you set.
k (v1.7 only) transposition relative
s (v1.7 only) Change the timing of the key-on. Specify a clock unit, delay by positive and accelerate by negative direction (shuffle).
H [FM] Hardware LFO Hn1,n2,n3 n1:Speed(0-7),n2:PMS(0-7),n3:AMS(0-3)
R [FM/SSG] Reverb Rn:Volume adjustment(n can be a negative value) When keyed off, instead of keying off, set the volume to about 1/3 of the current volume to continue pronouncing
RF [FM/SSG] Reverb ON/OFF (0=off 1=on)
Rm [FM] Specify the area where the reverb effect is applied (0=including the following rests). 1=only the area cut by q)
M LFO (Mn1,n2,n3,n4) n1:delay n2:clock unit n3:amplitude n4:amount)
MF LFO ON/OFF (0=off 1=on)
MW Set LFO Delay(n1)
MC Set LFO clock unit(n2)
ML Set LFO amplitude(n3)
MD Set LFO amount(n4)
S [FM3] Slot detune in sound effect mode (Sn1,n2,n3,n4) n1=OP4 n2=OP3 n3=OP1 n4=OP2 detune(0~255)
E [SSG] Envelope(En1,n2,n3,n4,n5,n6) AL,AR,DR,SL,SR,RR
P [SSG] mixer mode Pn (0:none 1:tone 2:noise 3:tone+noise)
w [SSG] Noise Frequency (0~31)
s [SSG] SSG hardware envelope wave format (v1.5 only)
m [SSG] SSG hardware envelope amplitude(v1.5 only)
y direct register write(yn1,n2) n1=reg# n2=data
yDM [FM] DT/ML yDM,n1,n2 n1=Slot# n2=Data
yTL [FM] TL yTL,n1,n2 n1=Slot# n2=Data
yKA [FM] KS/AR yKA,n1,n2 n1=Slot# n2=Data
yDR [FM] DR yDR,n1,n2 n1=Slot# n2=Data
ySR [FM] SR ySR,n1,n2 n1=Slot# n2=Data
ySL [FM] SL/RR ySL,n1,n2 n1=Slot# n2=Data
ySE [FM] SSGEG ySE,n1,n2 n1=Slot# n2=Data
vm [ADPCM] PCM Volume mode(Added by the sound driver as a correction value for volume)
* macro call
; Comment to the end of the line after this
: No more compilation
! All rests after this part (not pronounced)
J Start playing from this position
| Not care. Same meaning as space (to improve visibility)

Note : R command supplementary, FM case : Volume when reverb = int((current volume + reverb value +4)/2)-4, SSG case : Volume when reverb = int((current volume + reverb value)/2)

■ MMLs that were not implemented or not available

Grammar Function Remarks
MT [FM] Apply software LFO to TL (MTn1,n2) The driver is not implemented correctly and cannot be used
@n1= [SSG] Register tone @n1=n2,n3,n4,n5,n6,n7 The driver is not implemented correctly and cannot be used

■ FM sound tone definition

Note : You can use any delimiter for tone parameters other than numbers. Note : The parameter can be specified in hexadecimal number by adding $.

Method 1

In the first line, @ (tone number), (must have at least two spaces at the beginning) The next line is FB, AL, and
In the next four rows, the nine parameters are listed.
You may put a space between the parameters.

  @(Tone number)
FB,AL
AR,DR,SR,RR,SL,TL,KS,ML,DT ; op1
AR,DR,SR,RR,SL,TL,KS,ML,DT ; op2
AR,DR,SR,RR,SL,TL,KS,ML,DT ; op3
AR,DR,SR,RR,SL,TL,KS,ML,DT ; op4

Method 2

This is the format used when outputting the parameters of the voice editor with POLL V.
After @% (voice number), 25 bytes of register data are arranged directly in register order.
Since it is in register order, it is in the order of OP1/OP3/OP2/OP4, it is necessary to pay attention.

@%000
$073,$054,$073,$054 ; DT/ML
$01A,$019,$000,$000 ; TL
$01F,$01F,$01F,$01F ; KS/AR
$080,$080,$080,$080 ; AMON(OPNA)/DR
$000,$000,$001,$001 ; SR
$00F,$00F,$03F,$03F ; SL/RR
$034                ; FB/AL

■ SSG sound preset

By default, 16 preset patterns are defined from @0 to @15 as follows.
Of these, the envelope pattern is embedded in the sound driver (music), and the

The mixer settings and LFO are defined in the ssgdat file.

@0  :  E255,255,255,255,0,255 P1
@1  :  E255,255,255,200,0,10  P1
@2  :  E255,255,255,200,1,10  P1
@3  :  E255,255,255,190,0,10  P1 M16,1,25,4
@4  :  E255,255,255,190,1,10  P1 M16,1,25,4
@5  :  E255,255,255,170,0,10  P1
@6  :  E40,70,14,190,0,15     P1 M16,1,24,5
@7  :  E120,30,255,255,0,10   P1 M16,1,25,4
@8  :  E255,255,255,225,8,15  P1
@9  :  E255,255,255,1,255,255 P2
@10 :  E255,255,255,200,8,255 P2
@11 :  E255,255,255,220,20,8  P1 M1,1,300,-1
@12 :  E255,255,255,255,0,10  P1 M1,1,-400,4
@13 :  E255,255,255,255,0,10  P1 M1,1,80,-1
@14 :  E120,80,255,255,0,255  P1 M1,1,-250,1
@15 :  E255,255,255,220,0,255 P1 M1,1,3000,-1

■ Rhythm track

In the rhythm track of part G, some notation is different from the other parts.
Specify the rhythm to be pronounced using the tone number 6bit of @.
Each bit corresponds to the following. The sum (0 to 63) of the numbers in parentheses is specified by @.

bit sound
bit5 (+32) Rimshot
bit4 (+16) Tom
bit3 (+ 8) Hihat
bit2 (+ 4) Ryde-Symbal
bit1 (+ 2) Snare
bit0 (+ 1) Bass Drum

Example : The bass drum, snare drum, and hi-hat are pronounced simultaneously = 1+2+8 = @11. In MML, one of the dummy intervals (cdefgab) and the rest (r) are used to indicate the pronunciation.
The volume is specified by vn1,n2,n3,n4,n5,n6,n7.

Parameter Details
n1 Total volume (0~63)
n2 Bass Drum volume (0~31)
n3 Snare volume (0~31)
n4 Ryde-Symbal volume (0~31)
n5 Hihat volume (0~31)
n6 Tom volume (0~31)
n7 Rimshot volume (0~31)

■ ADPCM track

On the K-part ADPCM track, it is played in the original pitch at o1c, with the
The higher the scale designation, the lower the actual pitch that is pronounced.
The octaves and <, > are also reversed from the normal parts.
In addition, the range of volume specification by the V command is from 0 to 255.

ADPCM is loaded with the following tones.

Number Name
@1 kick
@2 snare
@3 kick+snare
@4 crashcymbal
@5 kick+c.cymbal
@6 ac.tam
@7 e.tam
@8 snare2
@9 o.hit
@10 909kick
@11 909snare
@12 808openhihat
@13 timbal
@14 hand clap
@15 timpani
@16 chorus

To capture the original sound on your own, use the included 'voiceeditor.d88'.

■ MML example

How to write MML for rhythm track

(Example)

G t210 v63,31,31,31,31,31,31l16 @1c4@3c4@1c4@3c@2ccc

Note : @1 is the bass drum, @2 is the snare drum, and @3 is the bass drum + snare drum.

How to write MML for ADPCM track

(Example)

K t210 o1v50l16 @1c4@2c4@1c4@2cccc

Note : The octave of ADPCM is based on 1, with o2 playing one octave down.

How to write an LFO

(Example)

A t210 @90o4v10l2 M30,1,6,4 cdefgab>c

How to write a envelope for SSG track

(Example)

D t210 E255,255,255,190,0,10 o4v10l2 cdefgab>c

Note : Envelope comes with presets.

The idea of a clock

(Example1)

A C128 t210 @90o4v10 c4

(Example2)

A C128 t210 @90o4v10 c%32

Note : The two MMLs have the same meaning.
Note : For 128 clocks of whole notes, 32 clocks will be the same note length as a quarter note.
Note : In the case of 128 whole note clocks, the 12th note cannot be specified because it cannot be divided.

The idea of echo macro

(Example)

A t210 @93o5v13l4 \=1,4 c\d\e\f\g\a\b\

(Example)

A t210 @93o4v13l4 c(4c)4d(4d)4e(4e)4f(4f)4g(4g)4a(4a)4b(4b)4

Note : The two MMLs have the same meaning.

(Example)

A t210 @93o5v13l4 \=2,4 c\d\e\f\g\a\b\

(Example)

A t210 @93o4v13l4 c(4o1c)4o4d(4c)4e(4d)4f(4e)4g(4f)4a(4g)4b(4a)4

Note : The two MMLs have the same meaning.
Note : The o1c sounds o1c because there are no two previous sounds.

■ Macro

This is a function to define frequently used patterns and call them in MML.
The macro definition uses the graphic VRAM (blue) area for the work at compile time.
Macro nesting is also possible. There is no limit to the number of layers of nesting and it depends on the capacity of the macro buffer.

macro definition

# *(Macro number){Macro definition} You can include spaces in the macro definition.

macro call

Writing a *(macro number) in MML

(Example)

# *1{cdefg}
A t200 @90v15o5*1 @91v15o5*1