# Sound Effects

## How to insert

Like Romi's Addmusic (and its successors), AddmusicK can insert custom sound effects. The method for doing so is very similar to adding custom songs; add your custom sound effect file to either the "1DF9" or "1DFC" folder, and add its filename to Addmusic_sound effects.txt (if you added the file to "1DF9", then you'd add the filename under the "SFX1DF9" section. Likewise for the "1DFC" folder. (The difference between the two is which SPC channel it plays on; 1DF9 plays on channel #6, and 1DFC plays on channel #7).

## How to create

Sound effects use almost the same syntax as normal music, and for information on how that works, read here. The following are the available commands:

- c, d, e, f, g, a, b, r, ^ (notes, rests, and ties)

- oX, <, > (Switch to octave X, lower the octave, raise the octave)

- lXX (Specify the default note length as XX)

- @XX (Switch to instrument XX. SFX instruments are different than music instruments)

- @XX,YY (Switch to instrument XX, but use noise instead of the instrument's sample. The noise's pitch will be the hex value YY.)

- vXXX (Set the volume to XXX. Maximum is 127, not 255!)

- vXXX, YYY (Set the left volume to XXX and the right volume to YYY.)

- & (Pitch slide)

- $XX (Insert the hex value XX directly. Unlike music, SFX hex commands are not validated. $FF will repeat the last note, and $FE will repeat the sound effect, $DD $WW $XX $YY $ZZ is a pitch slide command ($WW is the starting note, $XX is the delay, $YY is the duration, and $ZZ is the final note), and $EB $XX $YY $ZZ is another pitch slide command, which works exactly the same as $DD but without the first argument.

- #asm and #jsr . #asm will insert some assembled SPC-700 code into this sound effect and give it the name you specify. The ASM code is delimited by curly braces and may use labels and defines in main.asm, commands.asm, etc. #jsr will execute the code with the given name. For a specific example of how to use this, see "11 Pause.txt" and "12 Unpause.txt", as they use this command to pause and unpause the music. You can use this to easily run SPC code on command from the SNES.

Return to the main page