NRTDRV MAN EN SYNTAX PSGTONE

From MSX MUSIC WIKI
Jump to: navigation, search

PSG tone definition

@P<inst>:<str>

Syntax is like above. Its tone is valid for the entire song, wherever it is defined.

<inst> is tone number or tone name. If you use tone name, put it in double quotations. Tone name is not case sensitive.

Put strings for the shape of envelope into <str>.

Volume is hexadecimal and then, "F" means maximum and "0" means minimum.

1 character corresponds to 1 count and is effected by tempo. Then if resolution(#COUNT header) is default 12, it means quarter note long envelope consisted with 48 character of volume data.

This is relative value which is effected by v or V commands. When it is "v15", value of <str> directly reflected.

If it is v14, volume is lesser by 1 than <str> envelope. If it is "10

[example]
@P123:FFEEDDCCBBAA9988776655443322110
;Register the sound to decrease by 2 counts from volume F(15) to volume 0 to @123

"." retains volume 1 count before.

[example]
@P1:F..D..B...A....9.....8
;Same as "FFFDDDBBBBAAAAA9999998"

When the end point of the envelope is reached, the volume at the end is retained if no loop point is specified.


If "L" is included in the definition character string, it is regarded as a loop point. After playing music data to the end, It returns to that position and loops infinitely.

[sample]
@P10:12345678L9...8...7...8...
After soft attack stepping from volume 1 to volume 8 by 1 count, tremolo is expressed cycling permanently from 9, 8, 7 to 8 by 4 count.

Noise control with N and P commands in track 3 is available. These commands are processed with 0 count and use volume data together.

[example]
@P10:P1FP3N30DCBAP2N1:9.8.7.6.5.4.3.2.1

Plays 1 count long noise disabled /tone enabled with volume f. Then plays noise enabled/tone enabled with frequency 30 and volume d-a 1 count each. Then plays noise enabled/tone disabled with frequency 1 and volume 9-1 2 counts each.

If continues value of noise and volume data, use separators such as colon, tab and space characters.

It is not case sensitive, other than @P at the top of the line.

Line feed is needed after tone number and tone name. Tone name and tone number cannot e written in one line but it is valid written all in one line from second one.

Space and tab is other than comma are available as parameter separator.

Comments with "/* - */" or semi-colon" is valid, ofcource.

If set PAN to 0, pan pot settings until that time is remained. Set 1 or more only if you want to set it appropriate value mandatory. It is convenient if you want to set localization per instrument.

If #VOICE_MODE=5, bit 1 of SY means noise switch as well. If you enable bit 1 (set 2 or 3 to SY value), noise is enabled in Ch.8/OP4.