PPMCK Reference

Warning! Under construction — not even in alpha phase!

NOTE: Remember that although compiler instructions and macro definitions are case-insensitive, commands (including macro evocation!) are case sensitive.

Global Options/Compiler Instructions
NSF Header Information
#TITLE <string> Title of the NSF
#COMPOSER <string> Name of the person who composed the music of the NSF
#MAKER <string> Copyright information for the MML
#PROGRAMER <string> Name of the person who wrote the MML itself (does not usually show up in NSF players)
#EX-DISKFM Enables the FDS channel (F)
#EX-NAMCO106 <num> Enables up to 8 NAMCO163 channels (P-Q-R-S-T-U-V-W)
#EX-VRC6 Enables VRC-VI channels (M-N-O)
#EX-VRC7 Enables VRC-VII channels (G-H-I-J-K-L)
#EX-MMC5 Enables MMC5 channels and its DAC (a-b)
#EX-FME7 Enables Sunsoft-5B channels (X-Y-Z)
Bankswitching Options
#BANK-CHANGE <num> Enables bankswitching for a given track
#BANK-CHANGE <num1> <num2> A specific usage of the option above (?)
#AUTO-BANKSWITCH <num> Enables auto-bankswitching
#NO-BANKSWITCH Disables bankswitching
#SETBANK <letter>,<num> Move a track to a bank
#SETBANK <num1>,<num2> Move banks
Other Options/Instructions
#INCLUDE <filename> Include a file
#EFFECT-INCLUDE <filename> Replace effect.h supplied with PPMCK with one of your own (not recommended for most users)
#OCTAVE-REV <num> Reverses > and <
#DPCM-RESTSTOP Rests in DPCM track halt playback
#PITCH-CORRECTION Fix pitch in vibratos, and enables pitch macros for NAMCO163 channels
#GATE-DENOM Change the denominator value in the quantize formula
Macro Definitions
(Almost) Global
@<num> = { ~ | ~ } Timbre macro definition
@v<num> = { ~ | ~ } Volume macro definition
@EP<num> = { ~ | ~ } Pitch macro definition
@EN<num> = { ~ | ~ } Arpeggio macro definition
@MP<num> = { <param1> <param2> <param3> } Vibrato definition
@DPCM<num> = { <filename>, ...} DPCM sample definition
@FM<num> = { ~ } FDS waveform definition (Example FDS Waveforms)
@MW<num> = { ~ } FDS modulation setup
@MH<num> = { <param1>, ... } FDS modulation definition
@OP<num> = { ~ } VRC-VII custom FM patch definition (Example VRC-VII Instruments)
@OT<num> = { ~ } similar to @OP but the order was based on MGSDRV (Example VRC-VII Instruments)
@N<num> = { <param1>, ~ } NAMCO163 waveform definition (Example N163 Instruments)
Commenting methods
/* ~ */ Group Comment
; and / Line Comment
$ or x this before a number will cause it to be read as hexadecimal instead of decimal default
Musical Notation
<note><accidental(s)><len> Note input
. Dotted note
- or ~ Staccato
r<len> Rest
w<len> Wait
k<len> Key-off
n<num>,<len> Direct notation
x<num>,<len> “Data thru”
@n<num>,<len> “Super direct notation”
{ ~ }<len> Tuplets
Tempo and Note Length
t<num> Sets the tempo for the current track
@t<num> Another notation for tempo
l<len> Sets the default note length
q<num1>,<num2> Quantize note
@q<num> A specific notation of “Quantize note”
^ Note tie
& Note tie with potential slide (ppmck9ex2 onward)
Octave and Transpose
o<num> Set octave
octave > and < Octave Raise/Lower
K<num> Transpose
Volume commands
v<num> Set static volume
v+<num> and v-<num> Volume increase/decrease
@v<num> Recall volume macro
EH<fade>,<num> Hardware envelope (not the same as M<num>)
EHOF Turn off hardware envelope
S<num> Sunsoft-5B hardware envelope setting (Sunsoft-5B only)
M<num> Sunsoft-5B hardware envelope speed (Sunsoft-5B only)
Tone commands
@<num> Set tone/mixer bits
@@<num> Recall tone macro / set instrument (VRC-VII) / set waveform (NAMCO163 / FDS)
OP<num> Alternative to “set instrument” (VRC-VII)
Release commands
@vr<num> Recall volume macro at key-off
@@r<num> Recall tone macro/instrument/waveform at key-off
Loop and Repeat
L Set loop position
(link) [ ~ | ~ ]<num> Repeat loop
|: ~ \ ~ :|<num> Multi repeat loop
EP<num> Recall pitch macro
EPOF Turn off pitch effect
EN<num> Recall arpeggio macro
ENOF Turn off arpeggio
MP<num> Use vibrato effect
MPOF Turn off vibrato effect
PS Perform pitch slide between two notes (ppmck9ex2 onward)
SD<num> Self delay effect
SDQR Self delay queue reset
SDOF Self delay off
s<num>,<num> Harware sweep
MH<num> Use FDS modulation (FDS only)
MHOF Turn off FDS modulation (FDS only)
! break data after it
!! break data before it
D<num> Detune
N<num> Sunsoft-5B noise value (Sunsoft-5B only)
SM Smoothes pitch transitions on tracks A, B and C
SMOF Stops smooth pitch transitions
SA<num> Shift amount, emphasize pitch changes (NAMCO163 only)
NB<num> New bank select
y<address>,<value> Directly POKE value in memory
$<alias> <mml> defines a character as a macro

Quick track table

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.