2A03/2A07 internal channels

About

This is the sound generator found inside the NES CPU. The NTSC version (america/japan) is named 2A03 and the PAL version (europe) is named 2A07. The difference between the chips is that NTSC version runs at 1.79 MHz and 60 FPS while PAL runs at 1.66 MHz and 50 FPS.

The audio refresh rate is normally tied to the video refresh rate, where each video frame corresponds to one audio tick, but the NSF format allows any refresh rate and is customizable from the Tracker menu

There is five sound channels available:

- Pulse 1 and 2
  Produces pulse waves with four duty lengths (12.5%, 25%, 50% and 25% inverted). These channels have a hardware sweep unit that can be accessed by H and I effects.
  Note: There is a bug that resets the duty phase when switching between certain frequencies, this can be heard as a pop and might be noticable when using vibrato or pitch slides across those frequencies.
- Triangle
  Triangle shaped waveform. There is no volume control for this channel, so it will always be either on or off. The triangle cycle period is twice as long as for square channels so triangle notes will be one octave lower than square notes.
- Noise
  White noise generator.
  Can produce 32k-bit and 93-bit sequences, selectable from the instruments duty/noise setting. There are only 16 different pitches available, so a pitch value instead of notes & octaves is displayed.
- DPCM (Delta PCM)
  Also known as DMC.
  Used to play delta modulated samples. Channel effects (volume, arpeggio & pitch slides) does not work on this channel. The volume column has no effect on this channel.

Note: The volume level of triangle and noise channels will be affected by the DPCM channel, due to the way the sound is mixed in the hardware. More info is available on the bottom of this page.

Instruments

The 2A03 instruments contains a combination of parameters for the waveform channels and a set of samples for the DPCM channel.

2A03 settings

This part of the instrument is only used by the wave channels of 2A03 (pulse, triangle and noise). The idea is based on the MML style, where a set of sequences are used to program the channels. A sequence is a list of values that are applied to the channel at the same rate as the NSF refresh rate, shown in the main window. As shown in the example above, 30 steps take 500 ms to run when using the default rate of 60 FPS.

These effects are available

- Volume
  Controls channel amplitude. The triangle channel has no volume control, but a volume of zero will make it silent.
  Range: 0 to 15.
- Arpeggio
  Used for rapid note shifting, commonly used to simulate chords. This sequence has three separate modes: absolute, relative and fixed.
  - Absolute:
  adds to the base note (default).
  - Relative:
  adds to the base note and saves the result as new base note.
  - Fixed:
  does not add to the base note, instead it's used after the sequence is done. Adding a loop prevents the base note from being used at all.
- Pitch bend / high-speed pitch bend
  Affects the pitch, Hi-pitch multiplies the value by 16.
  Range: -127 to 126 (pitch units)
- Duty cycle / noise mode
  Sets the duty cycle period and noise mode, the triangle channel is unaffected.
  - Pulse:
  0 = 12.5%, 1 = 25%, 2 = 50%, 3 = 75% (pulse width)
  - Noise:
  0 = 32k-bit mode, 1 = 93-bit mode

Sequences are defined in the graphical sequence editor, where you can draw with the mouse (right-click to draw lines) or directly edit the values in the text box. Left click the bottom part to set a loop point and right click to set a release point. The text box accepts '$' and 'x' for hexadecimal notation.

A loop point causes the sequence to loop and a release points will hold the sequence until a release command. The loop point is defined as a '|' and release point as '/' in the text string.

Any key can be pressed inside the instrument editor to preview the instrument. Press ESC to close the instrument editor.

DPCM samples

This tab is used to assign samples for the DPCM channel, it does not affect any other channel. Assigned samples are samples assigned in the selected instrument while loaded samples are global for all instruments.

- Load
  Load samples from files, the default file extension for DPCM files is '.dmc'. The format must be 1-bit delta PCM and max size is 4081 bytes. The size should be a multiple of 16 + 1 bytes, otherwise the sample will be padded.
- Unload
  Remove selected sample.
- Save
  Saves selected sample to a file.
- Import
  Load and convert PCM files to delta PCM. See more info about importing PCM.
- Edit
  Open the DPCM editor.
- Preview
  Plays the sample (at pitch 15).

The available space for DPCM samples is 256 kB with bankswitching (16 kB without bankswitching). Select a key in "Assigned samples"-box and select the sample from the drop-down box below (or right click in the list). The pitch box sets the pitch for the sample (15 - 0). The "<-"-button can also be used to assign samples, and "->"-button to remove assigned samples.

The loop setting will enable the DPCM loop mode, where the entire sample is looped from start to end.

The D-counter (delta counter) setting is used to force the delta counter to an initial value before the sample is played (equivalent to a Zxx-command in the pattern). Set it to Off to start playing the sample without resetting the delta counter.

The pitch setting translates to a frequency according to the following table:

Key | Frequency
0 | 4181.71 Hz
1 | 4709.93 Hz
2 | 5264.04 Hz
3 | 5593.04 Hz
4 | 6257.95 Hz
5 | 7046.35 Hz
6 | 7919.35 Hz
7 | 8363.42 Hz
8 | 9419.86 Hz
9 | 11,186.08 Hz
10 | 12,604.03 Hz
11 | 13,982.60 Hz
12 | 16,884.65 Hz
13 | 21,306.82 Hz
14 | 24,857.95 Hz
15 | 33,143.94 Hz

This is equivalent to the quality setting when converting WAV files to DPCM samples.

Note: Playing a DPCM sample may decrease the volume level of triangle and noise. If full volume isn't restored after the sample is finished, use a note stop or a Z00-effect in the DPCM channel to restore it. You can use the Tracker/Display DPCM option to display the current value of the DPCM delta counter, a higher value results in lower volume output. Likewise, you can use the Zxx effect to get some additional control of volume on the triangle and noise channels.

Back to sound hardware · main index