Command Reference



Standard commands:

The following is the list of all commands that can be used. Unless otherwise specified, all command parameters are assumed to be in unsigned decimal form.
Note: Unsigned decimal values must be between 0 and 255.
Signed decimal values must be between -128 and 127.
Hexadecimal values must be between 00 and FF.
Binary values must only conatin 0s and 1s.
Command Purpose Parameters Description Hex equivalent Example
a, b, c, d, e, f, g Note N/A A note. If this is followed by a +, then it is sharp. If it is followed by a -, then it is flat. The number following the note will determine the duration. 1 is a whole note, 2 is a half note, 4 is a quarter note, etc. If the number has an '=' before it, then the duration is determined by the number of ticks (192 ticks is equal to a whole note, 96 is a half note, etc.) N/A c+4 d2 e-=192
hX Note transposition X = # of semitones [Signed] Determines how the following note data should be transposed. Keep in mind that this command alters the note values themselves, and does not have an equivalent N-SPC command. N/A h12 h-2
iX Finetuning X = Tuning value How much to tune the current channel. Keep in mind that this only tunes upward. A value of 255 is about one semitone sharper. $F4 $XX i128 i255
jX Song key X = # of semitones [Signed] Transposes the entire song up or down the specified number of semitones. $E9 $XX j-12 j4
kX Channel key X = # of semitones [Signed] Transposes the current channel up or down the specified number of semitones. $EA $XX k12 k-4
lX Default note length X = Note length The default note length to use, if a note does not have one specified. N/A l4 cd.e8f
mX,Y,Z Portamento to note X = Delay;
Y = Bend length;
Z = Semitone difference [Signed]
Causes all of the following notes to bend to the pitch determined by the Z parameter. $F1 $XX $YY $ZZ m0,12,-4 c8d8 m24,12,2 c4.d4.
nX,Y,Z Portamento from note X = Delay;
Y = Bend length;
Z = Semitone difference [Signed]
Causes all of the following notes to bend from the pitch determined by the Z parameter. $F2 $XX $YY $ZZ n0,12,4 c8d8 n48,12,-2 c4.d4.
oX Set current octave X = octave Sets the octave for the following notes (Valid octave values are from 1 - 6.) N/A o4 c4g4 o5 c4g4
pX,Y Vibrato X = Frequency;
Y = Amplitude
Causes the following notes to waver in pitch. $E3 $00 $XX $YY p4,32 c1
pX,Y,Z Vibrato X = Delay;
Y = Frequency;
Z = Amplitude
Causes the following notes to waver in pitch. $E3 $XX $YY $ZZ p48,4,32 c1
qXY Note articulation X = Legato [Hexadecimal];
Y = Velocity [Hexadecimal];
Changes the articulation of the following notes. The value of the X parameter determines the legato--how long each note should play, as a fraction of the specified note lengths (Valid legato values are from 0 - 7; 7 being 100% of the note's length). The Y parameter determines the velocity--or loudness--of each note (Valid velocity values are from 0 - F; F being the loudest). N/A q7F c1 q37 d2
r Rest N/A
Creates a pause for the specified duration. N/A r2 r=192
sX,(...) Special fade command X = Duration;
(...) = Subcommand + parameters;
Depending on which subcommand this is paired with, this command can do a variety of things, such as volume fading, pan fading, tempo fading, etc. Only a few specific subcommands are valid, however.

Valid subcommands: p, t, v, w, x, y
N/A s48,v127 ; Fade volume to level 127 over a 48 tick period
s12,t41 ; Fade tempo to 41 over a 12 tick period
sX,p Vibrato fade X = Duration Fades the vibrato to full amplitude over a duration of X ticks. $F0 $XX s48,p
sX,tY Tempo fade X = Duration;
Y = Destination tempo
Fades to the destination tempo over a duration of X ticks. $E8 $XX $YY s192,t62
sX,vY Channel volume fade X = Duration;
Y = Destination volume
Fades to the destination volume over a duration of X ticks. $EE $XX $YY s96,v127
sX,wY Global volume fade X = Duration;
Y = Destination volume
Fades to the destination volume over a duration of X ticks. $E6 $XX $YY s48,w224
sX,xY,Z Echo volume fade X = Duration;
Y = Destination right volume [Signed];
Z = Destination left volume [Signed]
Fades to the destination volumes over a duration of X ticks. $F8 $XX $YY $ZZ s24,x64,-64
sX,yY Pan fade X = Duration;
Y = Destination panning
Fades to the destination panning over a duration of X ticks. $E2 $XX $YY s12,y9
tX Tempo X = Tempo value
Sets the tempo of the song. The BPM is determined by this value divided by 0.4096. $E7 $XX t41 ; 100 BPM
uX,Y Tremolo X = Frequency;
Y = Amplitude
Causes the following notes to waver in volume. $EB $00 $XX $YY u4,32 c1
uX,Y,Z Tremolo X = Delay;
Y = Frequency;
Z = Amplitude
Causes the following notes to waver in volume. $EB $XX $YY $ZZ u48,4,32 c1
vX Channel volume X = Volume level Sets the volume for the current channel. $ED $XX v255 v64 v128
wX Song volume X = Volume level Sets the overall volume for the entire song. $E5 $XX w255 w64 w128
xX,Y,Z Echo parameters 1 X = Channel flags [Binary 8-bit];
Y = Right echo volume [Signed];
Z = Left echo volume [Signed]
Enables echo on channels determined by the X parameter (Rightmost bit is #0, leftmost is #7).
Note: Negative volumes indicate an inverted waveform, which can allow for some really cool surround-sound type effects!
$F5 $XX $YY $ZZ x00101101,-32,32
yX Channel Pan X = Panning value Sets the panning value for the current channel (0 is rightmost-panning, 10 is centered, and 20 is leftmost-panning). $E1 $XX y10 y14 y9
yX,Y,Z Channel Pan X = Panning value;
Y = Invert left speaker volume [Binary 1-bit];
Z = Invert right speaker voloume [Binary 1-bit]
Sets the panning value for the current channel (0 is rightmost-panning, 10 is centered, and 20 is leftmost-panning). $E1 $XX | (Y * $40) | (Z * $80) y10,0,1
zX,Y,Z Echo parameters 2 X = Delay;
Y = Feedback [Signed];
Z = FIR index
Sets the echo properties of a song.
Note: In YI, delay values higher than 3 will overflow the echo buffer, but delay values higher than 2 will cause the SPC to crash if a MISC song is played at any point (such as the star theme, or level end music). So it's generally good practice to not use a delay value greater than 2.
$F7 $XX $YY $ZZ z2,-69,1
~ Disable a command N/A This command will disable the subcommand that is paired with it.

Valid subcommands are: m, n, p, u, x, z
N/A ~m ~n ~p ~u ~x ~z
~m Disable portamento to note N/A This command will disable the note portamento effect. $F3 m0,48,71 c4d4 ~m
~n Disable portamento from note N/A This command will disable the note portamento effect.
Note: This actually does exactly the same thing as ~m, though in some cases you may want to use this instead for readability purposes.
$F3 n0,48,71 c4d4 ~n
~p Disable vibrato N/A This command will disable the vibrato effect. $E4 p4,2 c4d4 ~p
~u Disable tremolo N/A This command will disable the tremolo effect. $EC u4,2 c4d4 ~u
~x Disable echo N/A This command will disable the echo effect. $F6 x11111111,16,16 z2,20,0 c4d4 ~x
~z Disable echo N/A This command will disable the echo effect.
Note: This does exactly the same thing as ~x.
$F6 x11111111,16,16 z2,20,0 c4d4 ~z
@X Change instrument X = Instrument number This command will change the instrument for the current channel. $E0 $XX @9 @4 @19
#X Channel definition X = Channel number This command specifies which channel the following music data will be assigned to (Valid channel values are from 0 - 7). N/A #0
$XX Raw hex XX = Hex value [Hexadecimal] This command inserts a raw hex value into the music binary data.
Note: It is advised that you don't use this command unless you absolutely have to, since just about every N-SPC command can be expressed without using this.
$XX $E0 $09
% Macro call N/A Calls a macro. See Macro Reference for more details. N/A %loop(2) {{ c4d4 }}
^ Note tie N/A Continues the previously defined note for a specified duration. N/A c1^1^=96
&X,Y,Z Pitchbend to note X = Delay;
Y = Duration;
Z = Destination note
Causes the previously defined note to ramp up or down in pitch toward the destination note (Valid note values are from 0 - 71). $F9 $XX $YY $ZZ+$80 c2 &24,48,60
*X Call previous loop X = Loop iterations Calls the previously defined loop and loops it X times. $EF $???? $XX [c4d4]4 e4f4 *2
( )[ ]X Label loop definition X = Loop iterations Defines a loop call and creates a named alias to that loop. The name is placed inside ( ) and the music data to loop goes inside [ ] (Valid label names must only contain letters, digits, or underscores).
Note: Label names are case-sensitive.
$EF $???? $XX (Crispyyoshi_sux)[cri5~py5~u~x]4
( )X Label loop call X = Loop iterations Calls a previously defined label loop. $EF $???? $XX (Crispyyoshi_sux)42
[ ]X Loop X = Loop iterations Loops the music data inside [ ]. $EF $???? $XX [ c4d4 ]8
{ } Triplet N/A For each note inside of { }, its duration will be multiplied by 2/3 (Unless the duration is specified using '='). N/A {c4d4e4}
/ Song loop point N/A Defines the point at which the song will go to after it has finished reading through the music data (By default, it goes to the beginning of the song). N/A #0 c4 / d4;
< Octave down N/A Causes the following notes to play one octave lower. N/A o4 c4<d4;
> Octave up N/A Causes the following notes to play one octave higher. N/A o4 c4>d4;
; Single line comment N/A Anything following this will be ignored by the program. N/A c4d4 ; c4d4 <-- This gets ignored.