SNESMOD Tracking Tips

Here we'll cover some specific tips for getting the most out of SNESMOD.

If you'd like to read someone else's words on this subject, check out a .txt file in your /doc/ folder named snesmod optimisation&tips.txt. I don't know who wrote this, but this person has also compiled a lot of very useful information on SNESMOD and handling samples, some of which I will cover here and in the Working with SNES Samples section.

Tip #1: Note Cuts

You are destined to experience clicking noises between notes in SNESMOD. Really. You will be surprised. Usually, this occurs when a new note is triggered without the previous note being cut off. Think of your basic melody situation where each note flows into the next. In very many situations, a click will be produced in between those notes.

You could cut off the note the row before, but that might not be the sound you want; maybe that's too early. Enter our new best friend, the SCx command (Note Cut after x Ticks). The idea here is, instead of using a Note Cut ^^ in the previous row (leaving you with a whole row of silence), an SCx command is placed the row before the new note, with x equal to song speed - 1. For example, if your song is at speed 6 (that is, 6 ticks per row), you'll be using SC5. In this way, one tick of silence is created before the new note. Optimistically this silence will be negligible to you; it's unfortunately as good as it's going to get (sorry!). SCx should be your first line of fire if you experience clicks between notes in your converted .spc.

You may prefer to track your song first – the wait and see method – without any SCx and identify where you hear clicks afterward. Probably some instruments will have them, while others won't. You could also preventatively add them as you track; it can be a bit of a pain to comb back through an entire module to add these commands. On the other hand, you may want to compromise the sound as little as possible. It's up to you, but this is bound to be an important part of your SNESMOD journey if you want to avoid the clicking noises.

Example: This song is at speed 2, so SC1 commands are placed before new notes to avoid clicking sounds.

SNESMOD SCx Example

One interesting quirk about the note-cut clicks is that echo delay applies to them, too. This may make their presence more noticeable, depending on how much echo delay you're using.

Tip #2: Rapid Volume/Panning Changes

Another likely culprit for popping noises comes from quick changes in volume or panning – especially hard shifts from faraway values, but "fades" can cause this too, particularly abrupt ones. These sound more like "crackling" than the note-cut clicks, and are not quite as loud either. However, you may notice them from time to time.

Note: You are far more likely to encounter this problem if you're using a fast song speed, like speed 1 or 2 (meaning each row lasts only 1 or 2 ticks).

Though there is no cure-all for this problem, a few steps can be taken:

  • If possible, keep volume fades confined to your Instruments' ADSR envelopes, rather than using the volume command (Vx). Keep in mind you can create multiple Instruments with different ADSR envelopes for any of your samples without needing to duplicate the sample itself.
  • Relatedly, using the Note Off == command will release your ADSR envelope if you include a sustain point, so this can be used to taper notes' volume as well.
  • If you must use several volume or panning commands in a row, set their values as close together as possible. Avoid sharp, sudden changes if you can.
  • If going for rapid panning changes, make the shifts occur during silence if possible ("prepare" for the next note). Crackles will not occur during silence.
  • If tracking at fast speeds, the sound may be less crackly if you only put volume/panning commands every other row. This may not be feasible for quicker fades; however it may be worth testing if you are having trouble. Differences of ~4 or greater seem to be problematic at high speeds.

Notably, this is not a SNESMOD-exclusive problem. This is just how the SPC700 soundchip handles this info – imperfectly. This issue exists with the C700 VST too, and again is why I recommend using envelopes as much as you can. It may even save space! Speaking of which…

Tip #3: Space-Saving

You may want to push SNESMOD to the limits and fit as much into 64KB as you can! A noble goal – in that case, you should familiarize yourself with a few space-saving tips for .it modules. These will also save space if you ever need to trim the size of any other .it module!

  • Effect "Continues": Instead of using the 00 "continue" command for effects (which tries to recall the last value used for that effect), just repeat the effect; each instance of this saves a tiny bit of space. For example, a vibrato over the course of several rows would read H55 H55 H55 H55 instead of H55 H00 H00 H00. This is, surprisingly, more efficient.
  • Volume commands: Volume commands do take up space, which can add up over time. Consider setting the "Global Volume" of your Instrument to something other than 64 (maximum) if you're frequently using it at a lower volume level.
  • Repeated effects: Repeated uses of the same command in a channel are compressed further in the module. In addition to saving space on effects, this is another way you can potentially save space with volume commands. If you are alternating between two volumes several times, it is more space-efficient to separate them into two channels – for example, one channel at volume 64 and the other at volume 32.
  • Blank rows: You may be able to halve the number of rows and double the speed value of your song to save space, if every other row is blank. If it's close but not all, you may be able to use the SDx command (Note Delay by x Ticks) to move a few things and attempt this.
  • Blank rows part 2: Blank rows can also probably be trimmed to save space if you skipped over them with Bxx or Cxx. This is to say that it's probably not maximally efficient to use those commands in the first place.
  • Duplicate pattern sections: If multiple patterns contain sections of duplicate data, the patterns can be split and the duplicate data included in the pattern order multiple times. For example: if patterns 0 and 1 both began with the same 16 rows, they could be split up after row 16, with pattern 2 containing the duplicate data, and the pattern order reading "2 0 2 1" instead of "0 1".
  • Channel muting and unmuting: If you have a section of music that is repeated verbatim with new material on top (such as a new melodic line or bass), you can use the Mxx command (set channel volume) to "mute" and later "unmute" the channel(s) containing the new material, effectively cutting your pattern data consumption in half. For example: Set M00 before this section so it's muted on the first passthrough, then at the end of the pattern, use another Mxx command (M40 is maximum) to set the new volume for the second passthrough. (Note: Mxx is repurposed for something else in the Celes driver specifically, so this will not be helpful if you use that converter option.)

One feature of the converter is that it tells you the details of how much space is taken up by the various parts of your song, as well as how much free space is left, after creating your .spc. If you're looking to trim the file down, or if you've already passed the 64KB limit, these metrics will no doubt be helpful to you.

Tip #4: Envelopes

As mentioned before, it is helpful to use the ADSR volume envelopes of your Instruments to control volume fades, rather than using volume commands in the patterns. They will most likely sound cleaner overall. If you have never used this feature in OpenMPT, head to the Instruments tab and click the word "Vol" above the graph to enable the volume envelope – it's next to Pan, Pitch and Filter, the rest of which are not supported by SNESMOD. Immediately to the left of Vol, make sure you've selected the leftmost option "Show Volume Envelope" (this is default).

To the right of Vol and friends are three envelope features: loop, sustain, and carry. Carry is unsupported for SNESMOD, but clicking on the other two will enable a full envelope loop and a sustain point, respectively, which you can click and drag around to the nodes of your envelope. With SNESMOD, the sustain point must be on only one node. This is the point that the volume envelope holds until the note is released.

Double-click in the graph area to add a new node point. The lower the point, the lower the volume. Add points and drag them around until you've gotten the desired sound; the sample can be tested here with your keyboard or a MIDI controller.

With SNESMOD, nodes must be within 256 ticks of one another – tick numbers are displayed in the bottom-right of the screen.

Additional Instruments using the same sample can be created with different volume envelopes; this can be worthwhile even if you only use them once.

SNESMOD is going to be approximating your envelope to the best of its ability using the values you may remember from C700's volume envelope settings, so it's recommended to run the converter and check how everything sounds, too. (Attack only has 16 different values, Decay and Sustain have 8 each, Release has 32 and the special "note length" release function also has 32 values.)

Tip #5: Controlling SPC700 Features

It's best to consult with the included documentation to see the full array of SNESMOD-specific effects, particularly since several versions of the converter exist that do different things:

  • /doc/snesmod_and_pitchmod_doc.txt covers Lite and Pitchmod. All these features are available in Pitchmod, but only some are available in Lite, as indicated by whether or not the word "SNESMod" is written in the header above the effect. If it's unsupported in Lite, that space will be blank instead.
  • /doc/supernofx_doc.txt covers the SuperNoFX driver. Pretty much everything from "Echo Write Flag" onward is a new feature compared to Lite and Pitchmod. Bear in mind some features utilize existing .it effect commands that are otherwise unsupported by SNESMOD, but they are relegated to Sxx and Zxx.
  • /doc/celes_doc.txt covers the Celes driver. The layout is slightly different so its new features (compared to Lite and Pitchmod) are scattered throughout. Many more .it commands are repurposed in Celes. Both Celes and SuperNoFX have a multipurpose use of the Zxx command that is defined by a "ZMODE". Which mode you're using Zxx for in a channel is set via S9x commands.

SuperNoFX and Celes offer the widest suite of features to control, but Pitchmod also includes several features, including on/off toggles for echo delay (S01-04, also available in Lite), pitch modulation (S05-08; S92-S93), noise generation (S09-S0C; S1x-S2x), some ADSR control (M7F-MFF), and vibrato waveform choice (S30-S36). Read more about their implementation in the documentation mentioned above.

The most significant additional offering of SuperNoFX is the ability to control echo delay parameters within the song, i.e. changing delay time, feedback level, and the values that define the "FIR filter" (which emphasizes different frequency ranges). This even includes the ability to sweep through the values with specific commands. Celes offers a somewhat different, even more thorough implementation of echo delay control as well as the ability to set ADSR envelopes for a given channel… and a bunch of other stuff you may find useful!

One interesting feature of SuperNoFX and Celes which I have not personally used is the ability to enable "wavetable" synthesis on a channel, cycling through up to 8 samples rapidly without re-attacking the note. This was an infrequently-used SNES feature that allowed for things like crude PWM (pulse-width modulation) or faux filter sweeps by rapidly swapping out small samples with minute differences. Celes offers a similar FM synthesis option as well, though I have also not utilized it, and unlike the wavetable feature, no example is given in /examples/.

Notably, if you're making music for a SNES game, the SuperNoFX and Celes drivers remove support for sound effects in exchange for their wealth of control options. This won't matter unless you're making music for a game, in which case it may matter quite a lot.