Skip to content
toyoshim edited this page Oct 12, 2014 · 7 revisions

T'SoundSystem MML Manual

See also old manual.

Spec

Modules

ID Name Description
0 PSG Generates a simple square wave. The sound is very simple, but very fast to process.
1 FC Generates a square wave with duty ratio. It sounds like a NES sounds
2 NOISE Generates a noise sound.
3 SIN Generates a sine wave. With frequency modulation, it generates a FM sound.
4 SCC Generates a table wave sound, like a Konami's SCC sound.
5 OSC Generates a fixed wave form, e.g., triangle wave, saw wave, and so on. (TODO: Only implemented in C++)
13 GB SQUARE Generates a square wave being compatible with GameBoy. (TODO: Only implemented in C++)
14 GB WAVE Generates a table wave being compatible with GameBoy. (TODO: Only implemented in C++)
15 MIDI Controls an external MIDI device.
ID Name Description
0 Hz Frequency will be controlled precisely.
1 MSX Frequency will be controlled as like MSX. The frequency is not precise in higher notes.
2 FM Frequency will be controlled as like YAMAHA's FM chip. Exponential 64 steps between each note.
3 (reserved)

Use x command to specify a mode for each channel.

ID Name Description
0 Liner Each specified volume value N is used as an index N * 16 to refer a liner volume table.
1 Non-liner Each specified volume value N is used as an index N * 16 to refer an exponential table.
16 Liner 2 Each specified volume value N is used as an index 128 + N * 8 to refer a liner table.
17 Non-liner Each specified volume value N is used as an index 128 + N * 8 to refer an exponential table.

Use x command to specify a mode for each channel.

Name Abbreviation Mode
N Normal Mode (default)
GAMEBOY G GameBoy Mode
FAMICOM F NES Mode
Use #PRAGMA to set the compiler mode.

MML Manual

Declaration Key Description
#TITLE<{title}>
#CHANNEL {n}
#PRAGMA FAMICOM / GAMEBOY Changes the compiler mode.
#WAV {n},<{table}>
#TABLE {n},<{table}>
#OCTAVE {key}
#VOLUME {key}
#FINESS {n}
#A-#Z
#AA - #ZZ
#END

TBW

Table Format

TBW

MML Command

Control

MML Range Description Support
t{n}
$
[({n}) ... | ]
/:({n}) ... / ... :/
{ ... }

TBW

MML Range Description Support
s{n}
s{n},{m}
%{n} 0≦n≦15 Changes module. The parameter should be a module ID. (deprecated: range 0-255, If the ID is greater than 128, bit7 is interpreted as frequency mode, and bit6:0 is a module ID. Or if the ID is greater than 16, bit7-4 is interpreted as frequency mode, and bit3:0 is a module ID.) N
@{n} 0≦n≦255 Changes voice program. Valid range is different from module types, but not checked on compiling. This is interpreted as program change in MIDI. N/G/F
@p{n},{m} 0≦n≦3, 0≦m≦127 Changes MIDI device ID, and channel. N
x{n},{m} 0≦n≦1 or 16≦n≦17, 0≦m≦2 Sets volume and frequency mode. See Volume Mode and Frequency Mode N

TBW

Note

MML Range Description Support
o{n} 0≦n(4)≦10 Specifies octave. N/G/F
>
<
a{n} - g{n}
+(#)/-
r{n}
k{n} -128≦n(0)≦127 Detune. Send pitch bend if a module type is MIDI. N/G/F
mp{a},{b},{c},{d},{e}
nt{n},{m}
p{n} 0≦n(0)≦3 Panpot. This parameter affects only if a volume is specified by v{n}. N/G/F

TBW

Note Length

MML Range Description Support

TBW

Volume

MML Range Description Support
v{n} 0≦n(10)≦15 Specifies volume by mono. N/G/F
v{n},{m} 0≦n≦15, 0≦m≦15 Specifies volume by stereo. Panpot is ignored if specified. N/G/F
) N/G/F
( N/G/F

TBW

Modulation

MML Range Description Support
@c{n},{m} 0≦n≦127,0≦m≦127 Sends control change if module type is MIDI. Otherwise, do nothing. (WIP) N

TBW