Changes

Jump to: navigation, search

MGSDRV MML 11

4,058 bytes added, 23:08, 6 March 2018
Macro definition
Characters written after escape code are capitalized. ¥@ cannot be used because it is internal code for terminating strings.
Strings are written to track 0. If you want define many strings, allocate track buffers previously with #alloc or others. Refer to manuals for control strings.
 
 
==Tone definition==
 
Tine definition has "@" at the top of the line. All of <number> means tone number. The range are 0-31.
 
;@e<number> = { Mode,Noise,data...data }
 
Defines envelope data. It is the same format as _ESET in old versions of MGSDRV(which means MGSDRV ver2.xx).
 
(1) Mode
Specifies tone/noise mode for PSG. The range is 0-3 and 1 is used when it is omitted.
 
0 - no specification (and nothing changed)
1 - only tone
2 - only noise
3 - tone and noise
 
(2) Noise
 
Specifies noise frequency for PSG. It is ignored if it is used for tracks other than PSG. It is valid when mide is more than 2. The range is 0-31. 0 is used when it is omitted.
 
Mode and Noise are set only when @ commands are executed.
 
(3) Data
Specifies envelope data. It is allowed up to about 255 characters (depends on contents)
 
;0〜f(hexadecimal)
Sets hexadecimal number as volume and waits one count. It is written as <volume> below.
 
;<volume>:<counts>
Sets volume and waits counts.
 
;<volume>=<counts>
Changes current volume automatically to specified volume within a time specified by counts.
 
;n<noise frequency>
Changes noise frequency of PSG. It is same as Noise of (2).
 
;/<mode> or *<mode>
Changes Mode of PSG. It is same as Mode of (1).
 
;[
 
Defines start position of repetition.
 
;]
 
Defines emd position of repetition.
 
;@<tone_number>
Changes tone data. It is valid only for SCC and FM. It changes only tone data, not envelope. It should be defined tone data previously with @v(@s).
 
;y<r>,<d>
 
Writes data<d> to register<r>, which actually uses envelope. It is ignored for SCC.
 
¥<n>
 
Adds <n> to current frequency. The range is -127 to 127. It rises frequency with positive number. Unit is the same as "¥" MML command.
 
;.,
 
Separator. Place between numerics (example:n4.456789)
 
The range of the <count> is 2-239.
 
;@r<number> = { Mode,Noise,AL,AR,DR,SL,SR,RR }
 
Defines envelope data.
 
 Mode ... same as@e.
 Noise ... same as@e.
 
 
These are brief explanations below. The range of these values are 0-255.
 
;AL
Volume at the moment of the key on. Bigger number, bigger volume.
 
;AR
 
Speed of reaching to maximum volume(255) from key on. AR is added to AL every moment and DR processing starts when sum exceeds 255 in real processing.
 
;DR
 
Speed of reaching to next SL from maximum point. DR is reduced from maximum point at every moment and SR processing starts when sum is less than or equal to SL real processing.
 
;SL
Moving point from DR to SR.
 
;SR
 
Speed of reducing volume. This value is reduced from SL at every moment. This processing continues until if volume become zero or key off.
 
Up to about 10 is appropriate because if you set huge number to this parameter, sound ends in a moment (if you wish it on some purpose).
 
RR
 
Speed of reducing volume from key off. RE is reduced from envelope volume which currently holded.
 
;@r and @e
 
@r and @e shares working are to define, so both of them cannot be defined simultaneously. Latter one is valid, in such case.
 
;@s<number> = { data1 .... data32 }
 
Defines tone data fir SCC. Data are hexadecimal(00-ff). Data should be 32 units and cannot be omitted.
 
Example:@s02 = { 7f7f7f7f 7f7f7f7f 7f7f7f7f 7f7f7f7f ;PSG
80808080 80808080 80808080 80808080 }
 
;@v<number> = { data ... }
 
Defines original tone of FM.
 
Example:@v15 = { ;BRASS
; TL FB
25, 7,
; AR DR SL RR KL MT AM VB EG KR DT
8, 8, 1, 2, 0, 0, 0, 1, 0, 0, 0,
8, 2, 1, 1, 1, 1, 0, 1, 0, 0, 0 }
 
Parameter format is same as _VSETC of the old versions of MGSDRV.
 
;@#<number> = <n>
Changes assigned ROM tone number of the tone. MGSC assigns 1-15 of ROM tone to @0-14. Tones after @15 is assigned 0(original tone) and definition of tone is valid when <number> is more than 15. @# changes ROM tone number assigned to each tones. The range of <n> is 0-15 and 0 means original tone(refer about other numbers).
 
 
==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.

Navigation menu