Changes

Jump to: navigation, search

MGSDRV MML 11

6,666 bytes added, 07:26, 7 March 2018
Comments
If ";"(semicolon) are found in the lunes(including MML), it is recognized as comment from the semicolon to the end of the line(CRLF) and ignored.
 
MGSC1.1[5][en]
 
==MML==
 
When 1-H exists at the top of the line,
MML data is written to the specified track. Tracks are assigned according to #opll_value as such below.
 
;Mode 0 (FM 9 sounds mode)
 
 1-3 ... PSG
 4-8 ... SCC
 9-h ... (continues a,b,c,d...)
 
;Mode1(FM 6 sounds + rhythm mode)
 
 1-3 ... PSG
 4-8 ... SCC
 9-e ... FM
 f ... rhythm (r is available as well)
 
One or more spaces (or tabs) should be between track specification and MML data.
 
Example:
123a v15cdef ;"v15cdef" is written to track 1,2,3a
 
Length of the sound can be specified by steps with "%". Quarter note equals to 48 steps (example:a4=a%48). Steps within one note can be set up to 256.
 
Available MML are below. These are listed with small letter but, both of capital or small letters are equivalent, both are OK actually. <n> means number. Almost of all numbers cannot be omitted and it is different from that of old versions of MGSDRV. Spaces and tabs among MML are ignored.
 
;t<n>
Specifies tempo. The range is 57-2047. Effects all of tracks.
 
;l<n>
Specifies default sound length. The range is 1-192(but limited according to tempo). It can be specified with . , % or number of steps. Default is 4.
 
;^<n>
 
It means tie, to lengthen note by adding commands of note length. If <n> is omitted, length will be
 
;&
It means slur and is valid only when put immediately after notes. It is distinguished from tie.
 
;q<n>
 
It means ratio of length. The range is from 0-8. Key on continues when it is 0(only for FM). Default is 8. It is not available in rhythm track.
 
;v<n>
 
Controls volume. Volumes for all instruments are set in rhythm track. The range is 0-5. Hardware envelope is disabled for PSG. Default is 0.
 
;v+|-<n>
 
Changes volume relatively. The range is 0-15. Volumes for all instruments are set in rhythm track.
 
;)<n>
 
Increases volume. It is same effect as v+. The range of <n> is 1-15. 1 is used when it is omitted.
 
;(<n>
 
Decreases volume. It is same effect as v-. It is same as ")<n>" other than that.
 
;v<instrument><n>
 
It is valid for only rhythm track. Specifies volumes of the instruments. Select one from bsmhc as <instruments>. The range of <n> is 0-15.
 
;v<instruments>+|-<n>
 
Changes relative volume of rhythm instruments. The range is 0-15.
 
k<n>
 
It is valid for only PSG and SCC. Specifies speed of vanishing sound after key off. The range is 0-255. The fastest is 0. It is ignored(set but not effected) when using envelope set by @r or hardware envelope. Default is 0.
 
;@<n>
 
Changes sound tone. The range is0-31. It is not available for rhythm track.
 
;@e<n>
 
Copies envelope data set by @e or @r to current tone. It is valid for SCC or FM. It is same as <n> for PSG.
 
;@r<n>
It is same as @e<n>
 
;m<n>
 
It is valid only for PSG. Sets envelope cycle. The range is 1-65535.
 
;s<n>
 
It is valid only for PSG. Sets hardware envelope shape. Software envelope is reset(but still has tone number and can be reversed with V command etc.) The range is 0-15.
 
;n<n>
 
Sets noise frequency. It is valid only for PSG. The range is 0-31.
 
;o<n>
 
Sets octave. The range is 1-8. Default is 4.
 
;>
 
Moves to higher octave.
 
;<
 
Moves to lower octave.
 
;a〜g[+,-][n]
 
Makes tones. + sharps a note and - flats. Number after note means length of note(number of l command is adopted if it is omitted).
 
;_scale
(Example:a_o4c4, a_>>g, a_b%100)
 
Changes notes smoothly from previous one to specified note.
(example:a_o4c4 a_>>g a_b%100)
 
;r
 
Rest. It adopts value if l command if it is omitted and that is different from BASIC.
 
;name_of_instrument[:]
 
Makes specified rhythm sound. Default length of sound adopted if ":" is specified (example:bh4 bh:). It is not valid in other than rhythm track.
 
;¥<n>
 
Sets detune quantity. The range is -127-127. Default is 0.
 
;@¥<n>
 
Sets detune quantity in detail. The range of PSG and SCC is -32768-32767. 128 equals to half note. The range of FM is 0-255.
 
;p<n>
 
It is valid for only PSG and SCC. Sets quantity of automatically redundancy of notes. The range is 0-255. It is not available with LFO at a time. If you want effects like p command of older versions of MGSDRV, add 128(it is differently executed between 0-127 and 128-255).
 
;h<n1>,<n2>,<n3>,<n4>
 
Sets and starts tine LFO. It is only triangle wave.
 
n1:Delay(0-255)
n2:Depth(0-127)
n3:Speed(0-255)
n4:Roughness(-127-127)
 
;@p<n>
 
Sets roughness of LFO. It is valid only for PSG and SCC. The range is -32768-32767. It is used immediately after set of tone LFO.
 
;ho
 
Starts tone LFO.
 
;hf
 
Stops tone LFO.
 
;hi
 
Initialize tone LFO and return to execution if decay(LFO parameter itself is not initialized)
 
;[<number_of_loops>-]
 
Repeats playing MML from inside of braces specified times. The range of loops is 0-255. 0 means eternal loop. It is available up to 16 times nest.
 
 
;[-]<numberofloop>
 
Same as upper one. Number of repetition is written outside of braces.
 
;|
 
It is used with repeating command. When it appears in playing final loop, exits loop here.
 
;so
 
It is valid for only FM. Set on sustain.
 
;sf
 
It is valid for only FM. Set off sustain(default).
 
;ko
 
It is valid for only rhythm track. Not to turn off the sounds when rhythm sound is generated(default).
 
;kf
 
It is valid for only rhythm track. It turns off the sounds when rhythm sound is generated.
 
;/<n>
 
It forcibly key off for FM(it is valid with q0). It changes tone or noise mode for PSG. The range is 0-3. It is same as Mode in @e other than that 0 means "mute sound". It is not available in other tracks. Parameters are not available for FM.
 
;y<n1>,<n2>
 
Write data n2 to register n1. Sound source is automatically selected according current playing tracks. The ranges of n1 are, 0-56 for FM(rhythm) and 0-15 to PSG. The range of data is 0-255. It is not available for SCC.
 
;@l<n>
 
Changes total level of original tone(of FM). It is same as y2,<n>. It is not available for SCC.
 
;*<n>
 
Calls macro according to specified number. It is available 8 times nest. The range is 0-255(offset available).
 
;!
 
Ignores all of MML after this command in the track.
 
;@m<n>
 
Calls control strings. The range is 0-127. Previous number(default 0) +1 is used when it is omitted. Note that precessing of omission executed in compile time.
 
;@o<n>
 
Sets offset of control strings. For example, "@o2@m12" sets "@m14" for 2(@o2)+12(@m12). It is used for lyrics etc. which has same MML but different data during loops.
 
;@f
 
Increments [fadefg] of MIB. MGSEL starts fading out but actual behavior is different among programs(sometimes nothing occurs).
 
;$
 
It means debug command. It does fast forward automatically up to the position of "$" command when played with -p.

Navigation menu