NRTDRV MAN EN SYNTAX HEADERS

From MSX MUSIC WIKI
Jump to: navigation, search

Headers

Header gives definition to whole song.

Header names are not case sensitive. "_" (underscore) and "-" (minus sign) are treated as same. (For example, "#OCTA_X" and "#Octa-X" are equivalent.)

Error if you define contradictory limitations at a time. (For example "#OPM_WAIT" and "#OPM_NOWAIT" cannot be fined at a time.)

If you declare more than 2 times, last one is valid.

#CAPITAL_REV

Revert meaning of capitals and small cases of MML. (T means tempo, O means octave, R means rest, CDEFGAB means music scales and p means panpot etc.)

Track name cannot be reverted.

#COMPOSER <str>

Define composer name.

#COUNT <num>

Define resolution of whole-note (absolute note value or counts). Range is 16-384 and 192 is default value. It should not be defined normally.

Smaller this value you set, lighter the load of the driver. There are lower precision and more difficult to express nuances though.

Indivisible counts, smaller than 0 are not valid. Be careful not to be synchronized when you play music.

[example] #COUNT 192(as default)

Note value Absolute note value(counts) 音楽的音長 絶対音長(カウント数) ------------------------------------ 1 #192 2 #96 4 #48 6 #32 8 #24 16 #12 24 #8 32 #6 48 #4 64 #3 96 #2 128 #1.5 ※実際の発音は1カウント Actually sounds as 1count


Actually played withhyghin 1count 192 #1

Every time you play 128th note, 0.5 counts of the gap increased.

#DETUNE_EXP

D command of OPM track enables -16384 - 16383 (if this header is not used, range of D command is limited from -128 to 127).

This command uses K command inside program with D command, K command is not available.

PSG track is not affected.

#DETUNE_OFFSET_OPM <num>

Set offset value of detune to all of OPM tracks. Range is -32 to 32 and 0 is default.

This value is valid in all tracks of OPM and internally added when you use D command.

NRTDRV uses 438Hz as default OPM pitch but if you use this header and define "5" it works with 440Hz pitch.

#DETUNE_OFFSET_PSG <num>

Set offset value of detune to all of PSG tracks. Range is -32 to 32 and 0 is default.

This value is valid in all tracks of PSG and internally added when you use D command.

#FILENAME <str>

Define file name of music data which is included in archive after compile. If you omit this header, same name of MML file are defined and you do not need it usually.

It is limited 8 characters of alphabets or numerals. This is not case sensitive and suffix cannot be defined (fixed to *.NRD).

Use it when your MML file has long file name and you want change file name to short one.

#J_TIMES <num>

Defines scale factor of fast forwarding with j command. Range is 2 to 100 and 100 is default.

If load of CPUs get higher while fast forwarding, decrease this value.

#J_KEYON

Enables key on while fast forwarding with j command. Sounds are made with big volume and check your master volume of your environment.

Key on is valid soon after fast forwarding ended as default settings and music is not played as you want at a time to start fast forwarding. Use #J_KEYON header to avoid such a situation.

#J_KEYOFF

Disables key on while fast forwarding with j command. Key on is valid soon after fast forwarding ended as default settings and music is not played as you want at a time to start fast forwarding.

You do not need it usually because #J_KEYOFF is set as default. If you want enable key on while fast forwarding, use #J_KEYON header.

#MEMO <str>

Insert 1 line memo into music data.

#MIX_ASL <num1>,<num2>,<num3>

Sets volume balances between sound sources during playing music on ASLPLAY.

<num1> is OPM#1, <num2> is OPM#2 and <num3>is PSG.

The range is from 0 to 999. 100 is default value of OPM and 160 is of PSG.

This header is only for ASLPLAY and not valid for playing on real X1 or X1 emulators.

[example]
#MIX_ASL,,100
Set 100 to PSG volume.

Actually 1/100 of this value is set with "---adjvol" option.

#MIX_HOOT <num1>,<num2>,<num3>

Sets volume balances between sound sources during playing music on hoot.

<num1> is OPM#1, <num2> is OPM#2 and <num3>is PSG.

The range is from 0 to 999. 192($C0) is default value of OPM and 288($120) is of PSG. If parameters are omitted, default value is applied.

This header is only for hoot and not valid for playing on real X1 or X1 emulators.

[example]
#MIX_HOOT ,,100
Set 100 to PSG volume.

#MIX_OPM1 <num>

Sets volume balances of OPM#1 during playing music on hoot.

This is prepared only for compatibility with old versions of NRTDRV. Use #MIX_HOOT header in ordinary case.

#MIX_OPM2 <num>

Sets volume balances of OPM#2 during playing music on hoot.

This is prepared only for compatibility with old versions of NRTDRV. Use #MIX_HOOT header in ordinary case.

#MIX_PSG <num>

Sets volume balances of PSG during playing music on hoot.

This is prepared only for compatibility with old versions of NRTDRV. Use #MIX_HOOT header in ordinary case.

#NOTE_OPTIMIZE_OFF

Does not optimize sequential strokes and outputs sound as is.

  1. NOTE_OPTIMIZE_ON is default.

#NOTE_OPTIMIZE_ON

Converts sequential strokes to repeats and reduces size of music data.

  1. NOTE_OPTIMIZE_ON is default and you do not need to define it.

Use it if you want define it explicitly.

[example]
#NOTE_OPTIMIZE_ON
A l8 ccccdeee ff4fgggg a1
Same as "A l8 [4c]d[3e] ff4f[4g] a1".

#OCTA_X

Changes relative octave sign to popular way in X1/X680x0. "<" is increase octave and ">" decrease.

#OCTAVE_REV

It is equivalent to #OCTA_X

#OPM_WAIT

Makes appropriate wait while writing to OPM register. Use it when you need certain register access for example playing on real machines e.g.

Never use it with OPM16 unsupported hoot. It might cause freezing OS.

#OPM_NOWAIT

Does not make any waits while writing to OPM register.

Use it with OPM16 unsupported hoot. It might avoid freezing OS.

  1. OPM_NOWAIT is default and you do not need to define it.

Use #OPM_WAIT if you want define it when you need wait.

#OPM_REV

Exchanges first and second tracks of OPM. Track A-H are OPM#2 and I-P are OPM#1.

#OPM8

Selects "X1 general driver" (OPM8 + PSG3).

Use it when you do not use second OPM or OPM16 unsupported version of hoot.

This header is only for hoot and not valid for playing on real X1 or X1 emulators.

#OP_REV

Reverts operator mask, VOP command, operator 2 and operator 3 when OPM tone parameters are directly set. M1/C1/M2/C2 are set when this header is defined, M1/M2/C1/C2 is set when omitted. Note that OPM tone setting syntax is not changed.

#PROGRAMMER <str>

Defines the name of MML programmer.

#PSG_CORE <num>

Select PSG core when hoot plays music. 0 means fmgen and other than 0 means MAME's AY-3-8910 core.

Output volumes are different between cores and modify with #MIX_PSG if you need.

This header is only for hoot and not valid for playing on real X1 or X1 emulators.

#P_REV

Exchange "p" command and "P" command. And changes pn command to capital character ("PN") and change PP command to small character ("pp").

It is useful when porting MML from other music driver.

#Q_MODE <num>

Define execution of q command and Q command.

Values are listed below. Default value is 0.

0:Calculation is executed on driver. 1:Exchange dined length of q command with rest on compiler. 2:Exchange dined length of Q command with rest on compiler. 3:Exchange dined length of q and Q command with rest on compiler.

Specifying anything other than 0 decreases the amount of computation by the driver. It is useful when the load at the real machine is high.

File size of the music data increases. It makes return to "q8Q0" at the top of each driver macros.

Key on processing is changed to light wait mode on driver when 1 or 3 is set.

Enforced legato with Q command cannot be valid when 2 or 3 is set.

[example]
#Q_MODE 1
A q4c8q8d8q4e8
Same as "A q8c16r16d8e16r16"
[example]
#Q_MODE 2
A Q1c4d4Q5e4f4Q9g4
Same as "A Q0c4-#1r#1d4-#1r#1e4-#5r#5f4-#5r#5g4-#9r#9"

#Q_MAX <num>

Defines maximum (denominator) value of q command. 8 is default.

Changes to special mode which can be set gate time count with q command when it is 255.

1 or 3 must be set with #Q_MODE header.

If you want define another value to certain track, use QM command.

Denominator for whole song is defined with #Q_MAX header and define only track which you want to change denominator with QM command.

[example]
#Q_MODE 1
#Q_MAX 32

A q32 cdef
Lengthen sound till the end of specified length.

A q16 gab>c 
Lengthen sound half of specified length.
[example]
#Q_MODE 1
#Q_MAX 255

Makes key off at 10 count irrespective to the length of note.

#Q_REV

Exchange "q" command and "Q" command. And change QM command to small character ("qm"). It is useful when porting MML from other music driver.

#REPLACE_TRACK <str>,<str>

Exchanges track <str> and <str>. If you want exchanges multi-tracks define with multiple line.

It is convenient when you want to play OPM16 music on OPM8 environment. Move unremarkable part to track in OPM#2.

[example]
#REPLACEb I _TRACK A,O
#REPLACE_TRACK B,P
Exchanges track A and O. Exchanges track B and P.

#TEMPO <num>

Defines tempo. The range is from 1 to 999. Default value is 120.

Set number of quarter note in a minute (BPM:Beats Per Minute).

It is almost same as t command of MML and this header is needed when you use j command.

#TITLE <str>

Defines title of the song.

This title is written to hoot.xml but it is effected after hoot window is once closed.

"&", "<", ">", """, and "'" are changed to character reference and tab is changed to 4 space characters.

#TITLE_ANK <str>

Define music name in ANK characters (Alphabet, Number and Kana i.e).

This header is for displaying on real X1 which has no Kanji ROM. Define music name which contains Kanji character with #TITLE header.

If this header is omitted, content same as #TITLE is defined.

#V_STEP <num>

Define number of steps of v command. Range is 1-255 and 15 is default value. PSG track is not effected.

[example1] Enables v0 - 20 [example2] Enables v0 - 127 (same as V command)

#VOLMAX <num>

Define V command value when v commands specifies maximum value. Range is 64-127 and 125 is default value. PSG track is not effected.

[sample]
#V_STEP 15
#VOLMAX 125
Same as "v15=V125"

#VOLMIN <num>

Define V command value when v commands specifies 0. Range is 0-127 and 85 is default value. PSG track is not effected.

[example]
#VOLMIN 85
Same as "v0=V85"

#VOICE_MODE <num>

Define order of tone parameters on OPM tone define track. Refer "OPM tone define track" for details.

#Y_REV

Capitalize y command. It is useful when you port MML from other music drivers.