2A03/2A07 internal channels

About

This is the sound generator found inside the NES CPU. The NTSC version (america/japan) was called 2A03 and the PAL version (europe) was called 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 NSF format allows any frame rate, so it is customizable from the Tracker menu.

There are five channels available: two square waves, one triangle wave, one noise generator and one digital sample (DPCM) channel.

Square 1 and 2

Produces pulse waves with four duty settings (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)

Used to play delta modulated samples. Channel effects (volume, arpeggio & pitch slides) do not operate on this channel. The volume column has no effect on this channel.

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


Instruments

The 2A03 instruments contains a combination of parameters for the waveform channels and a set of samples for the DPCM channel. Press ESC to close the instrument editor.

2A03 settings

This part of the instrument is only used by the wave channels of 2A03 (square, 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 frame rate, shown in the main window. Default for NTSC is 60 FPS and PAL is 50 FPS. As shown in the example, 30 items takes 500 ms to run when using 60 FPS.

These effects are available (none applies to the DPCM channel)

Volume Channel amplitude. is not possible to change triangle volume, but a zero will disable the channel and non-zero will enable it.
Range: 0 to 15 (volume units)
Arpeggio Used for note-shifting, commonly used to simulate chords.
Range: -79 to +79 (notes)

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.
Square: 0 = 12.5%, 1 = 25%, 2 = 50%, 3 = 75% (pulse width)
Noise: 0 = 32k-bit mode, 1 = 93-bit mode
Triangle channel is unaffected.

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.

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.

DPCM samples

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

First load the samples, either directly from "Load sample" where the format must be 1-bit delta PCM, or "Import sample" to import wave-files. (The quality of wave files will decrease significantly when converted to DPCM.) There are 16 kB available for DPCM samples. Then 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 "<-" can also be used to assign samples, and "->" to remove assigned samples. Loop is used to loop the sample from beginning.

See more info about importing PCM.

There are a simple DPCM editor available, read about it here.

Note: Playing a DPCM sample may decrease the volume level of triangle and noise. If full volume isn't regained after a sample is finished, use a note stop or the Z-effect in the DPCM channel to restore it. You can check the Tracker/Display DPCM state menu item to display the current value of the DPCM delta counter, a high value results in lower volume output.