MGSDRV MML 11

From MSX MUSIC WIKI
Revision as of 06:47, 6 March 2018 by Kumokosi (talk | contribs)
Jump to: navigation, search

MGSC1.1[1][en]

MGSC MML compiler version 1.11 Copyright(c) 1992-93 by Ain

MGSC MML Compiler converts MML (text file) to MGS formatted play data.

Usage

SyntaxMGSC <Source file[.MUS]> [<Object file>] [Option]

<Source file>

Specifies the file name of MML source. If extension is omitted, .MUS is used.


[<Object file>]

Specifies the name of data file after compile. If it is omitted, same name as <Source file> is used.

Path can be included as file name in DOS2 environment.

[Option]

Specifies options. These are available below.

-p

Starts playing music after compilation. Error occurs if MGSDRV does not exist. During playing music, you can do forwarding with SELECT (if you use turboR, fast forwarding is available with SHIFT + SELECT) and exiting with ESC. When MGSDRV resides in memory you can continue to playing music after exiting with SHIFT + ESC. Replaying or volume control is available with ten keys in MGSDRV v3.13 or after.

-q

Reterns to dos immediately. Compare to -p option which returns DOS only when ESC is pressed or playing is finished. If MGSDRV does not reside in memory, returns to DOS after playing music instantly. It is not valid without -p option.

-t

Shows status of usage in every tracks after compile. Numerics in parens mean below (left to right) Allocated bytes (with #alloc etc) Used bytes Available bytes Final line shows sums of these bytes.

-s

Ignores #no_mgs and forces data to be saved.

-n

Does not save data. It is recommended to use with -p option while debugging.

-e

Uses only CP/M functions (see appendix).

Control functions

#opll_mode <0|1>

Specifies OPLL modes. 0 means FM 9 sound mode and 1 means FM 6 sounds + rhythm mode. If this command is not executed, all if other control commands(including MML) are not valid. Execute this first definitely.

#machine_id <0〜7>

Specifies vendor codes which the data made (compiled) for. When programs uses this vendor codes, volume balances are adjusted on every MSX vendors models. Vendor codes are preserved like below.

1:SONY 2:Panasonic 3:SANYO

Numerics other than these are invalid and should not be used. Use 0 (same as omitted) for other vendors.

#lfo_mode <0|1>

LFO mode. 1 makes fast LFO speed little bit. Default is 0.

#title <"string">

Specifies title name of the data. Multiple lines are valid if you use with "{" and "}". Maximum length is 1k byte, including comments or others.

Example:#title { "Falcom Ys morning grow" "SCC is needed" }

If you want to use double quotation in strings, repeat twice. If "Object too big" error occurs when exceed 80 characters in the title, usually it can be avoided with allocating track buffer (and reduce it lesser than automatic allocated bytes) with #alloc.

#alloc <track no. = bytes>

Allocates track buffers. Usually, track buffer is automatically allocated (16k/ all tracks(=16 or 18) bytes) when the track is used first time. If you use many tracks to write MML in, allocate bytes with this command.

Example:#alloc 0=100; Allocates 100 bytes to track 0

    #alloc {	3=100,

5=256 }

Allocates multiple track buffers at once

Sums of track buffers are limited upto 16k bytes. Track 0 is not used for MML, but tone settings or others. It is enough to use with default settings.

#psg_tune { notes data for c, c# ... b}

Change data for defining notes for PSG and SCC. Each data define for octave 1( range is from 0 to 4095 and needed for every 12 notes.) Commonly, it is not needed to set up.

#opll_tune { notes data for c, c# ... b}

Change data for defining notes for FM. Each data define for octave 1( range is from 0 to 511 and needed for every 12 notes.) Block information is not included. Commonly, it is not needed to set up. This command destroys parameters of @¥ command of MML(as a specification).

#tempo <57〜2047>

Sets tempo. It us valid in the source codes only once. It is recommended to use this rather than t command in MML when setting tempo at the first time as far as possible. Default is 120.

#macro_offset <definition_character = no>

Sets offset number of macro to a character from alphabet(A-Z). Commonly, definition of macros uses numeric 0-255, and this command makes purpose clearly recognizable by assigning offset number to characters.

Example:#macro_offset a = 32

    *48 = { cdefgab }

It is same as macro number 48, called with *a16.

    #macro_offset { a = 32,
                    c = 16 }
    *20 = { t150 }
    *40 = { v15 }
    *42 = { l16 }
    1 *c4*a8*a10

"t150v15l16" is written to track 1.

These definitions, such as *a16 etc are available in commands and MML which deals macro number. Be care full sums of offsets and value not to exceed 255 or duplication, because it translate simply these strings to macro number.

#play_start

Starts playing music after compiling. It is same as -p option of command line.

#no_mgs

Does not generate .MGS files. It is same as -n option of command line.

#track_status

Shows usage status of every tracks after compiling. It is same as -t option of command line.

#play_track

Plays only tracks specified when starts playing. It is valid only with MGSC. If it is omitted all tracks are played.

Example:#play_track 367ABR

It plays only track 3,6,7,A,B and R.

Note: this command only specifies tracks and does not play actually.

#end

Specifies the end of the source. MGSC stops to compile when it appears on the line. Actually <EOF> is recognized as the end if the source and this command can be omitted.

#disenable_mgsrc

Sets protection attribute not to be discompiled with mgsrc.com. It is not recommend to use this thoughtlessly ...