PR8 Synthesis

PR8's power lies in being able to treat every sound as a 5-voice multi-timbral instrument and then control that instrument's parameters via sequencer automation. The Tracks in PR8 are therefore 'virtual' in that they are not tied to any particuar NES sound-generating voice.

Because of this approach, the synthesis available to each individual Drum Voice is perhaps a bit simple compared to other NES audio engines. It has to be this way because 6 tracks multiplied by 5 voices equals 30 virtual voices to process. Combine this with the fact that PR8's synthesis runs twice per frame, that actually makes 60 virtual voices to process every refresh!

Despite this it's still possible to create complex and very rich sounds. On this page you'll find explanations of the individual synthesis types available to each Drum Patch.

This section of the manual is just intended as a discussion of the various types of synthesis available. For technical and usage details for all the Drum Parameters, see the Drum Parameters page.

Oscillator (Pitch) Settings

For Voices A, B, C and D, the output pitch can either be calculated from a note in the sequencer (relative offsets) or can be fixed regardless of the note played by the sequencer (absolute).

The relative mode is most useful for sounds that are used for melodic phrases so you can have voices in unison or octaves apart or even chords from a single note etc. Absolute pitch is useful for drums, noises or glitch type sounds where the Drum Patches use pitch for effect rather than melody and also, for example, if you have a Noise (Voice D) component in your sound and you'd like to keep the pitch of the noise fixed while the pitch of other voices is controlled by the notes in the sequencer.

You can also 'detune' individual Voices via the OSC-F parameter. This can add a bit more depth to sounds that have voices in unison.

The final aspect of the Oscillator settings is for Voices A and B only. A quirk of the NES's audio chip causes the phase of the output of the two square-wave Voices (A and B) to be reset when the upper-frequency register is written in your audio engine. It's commonly an unwanted side-effect because it causes an audible click/pop and therefore it's usual practice to only write to this register when required (i.e. if the value needs to change). However, if you constantly write to the register, especially at a higher-than-normal rate (PR8 refreshes at twice the 'normal' rate) it can produce some interesting distortion/modulation. Therefore, the OSC-D parameter gives you the option to handle the upper-frequency register normally or to constantly force it to be written. The value written to the OSC-D parameter defines the amount of time from the beginning of each note that the distortion effect is audible.

Low Frequency Oscillator (LFO)

The term 'Low Frequency Oscillator' in PR8 should be taken with a pinch of salt because there are several types of pitch modulation that are put under that label and controlled by the same set of parameters. These are: Vibrato, Pitch Sweep and Arpeggio. Because of this it's not possible to apply any of these types of pitch modulation simultaneously on the same Drum Voice. Of course though, you can use combinations of those effects in a Drum Patch by using multiple Voices.

Vibrato

Pitch can be modulated in a vibrato-like way by specifying a speed and a width (parameters LFO-S and LFO-W). The LFO-W value is added/subtracted from the pitch in a cyclic pattern. The frequency at which the polarity changes is determined by the LFO-S parameter. You can also specify a delay in the LFO-D parameter which delays the Vibrato effect for the specified number of ticks from the beginning of each new note. Vibrato Width (LFO-W) can be positive or negative, the polarity effects the starting direction of the LFO.

Vibrato works on Voices A, B and C only.

Pitch Sweep (Voices A, B and C)

Pitch Sweep adds a constant value to the current pitch of a playing note to sweep it up or down. You specify the constant via the LFO-W parameter but you need to set LFO-S to 00. Essentially, Pitch Sweep is Vibrato that never changes polarity, hence the 00 in the LFO Speed parameter.

Like Vibrato you can delay the sweeping effect by specifying a value other than 00 in the LFO-D parameter. Note though that the maximum delay is 7F because values higher than 7F tell PR8 to use the LFO parameters in a different way (see 'Arpeggio' below).

Pitch Sweep (Voice D)

You can also sweep the pitch of the Noise voice but there is a slight difference in how the parameters are used. LFO-W is used to specify the constant to add/subtract but bear in mind that the usable range is much more limited due to the fact that there are only 16 different pitches for this voice. Also, because of the limited range, the LFO-S parameter has been appropriated to provide a delay (in ticks) between adding the LFO-W value to the noise pitch. There is no 'Vibrato' mode for Voice D.

Arpeggio

Arpeggio in PR8 is just a general term for a few types of effects that involve toggling or cycling the playing note between two or more semitones. It can be used in a 'traditional' chipmusic way to simulate chords or to add accent notes to the start of notes, or on Voice D to add texture to single noise pitches, for example.

The effect is complicated further by having two different modes of operation: one-shot and cyclic.

For all Voices (excluding E of course), the one-shot mode is selected by specifying 80 in the LFO-D parameter and the cyclic mode is selected by specifying a LFO-D value between 81 and FF.

In cycling mode, the LFO-D value tells PR8 how many times you'd like the Arpeggio looped (81 = 1, 82 = 2, 90=16 etc.). The LFO-W parameter is used to specify the 2nd and 3rd notes of the 'chord' (the first note in the chord the original note from the Pattern). The left digit is the 2nd note and the right digit is the 3rd. The value is the number of semitones above the root note e.g. 47 will play a major triad, 37 a minor triad etc. PR8 will cycle between the 3 notes at a speed specified in the LFO-S parameter.

In one-shot mode the operation is slightly different. This time LFO-W becomes a single signed semi-tone offset. This is added to the pitch for a number of ticks specified by LFO-S

Amplitude Modulation

Voices A, B and D have variable amplitude (16 levels) and in PR8 you are able to shape the amplitude over time using simple Envelopes.

Volume and Curve

The first parameter, AMP-V, controls two aspects. The right-hand digit scales the overall output volume of the Envelope, 0 being off and F being maximum. The left-hand parameter controls the curve applied to the Attack and Release stages of the Envelope. A setting of 8 is approximately linear, values towards 0 give you an increasingly steep exponential curve (blue line on graph below) while values towards F give you an increasingly steep logarithmic curve (red line on graph below). The numbers on the graph bear no relevance to PR8, it's merely to illustrate the curve shapes.

Exponential (blue) and logarithmic (red) curves


Envelope

The second parameter, AMP-E, sets the Attack and Release speed for the amplitude envelope. The Envelopes in PR8 only have 3 phases Attack, Sustain and Release. Attack is the time taken for the Envelope to go from 0 amplitude to maximum (F). Sustain is the time that the Envelope is held at maximum level (actually controlled by the LFO-T parameter, see next section). Release is the time taken for the Envelope to go from maximum (F) to 0.

The left-hand digit specifies the Attack (1 is slowest, F is fastest) while the right-hand digit specifies the Release (again, 1 is slowest, F is fastest). For both Attack and Release, a value of 0 effectively means to bypass this phase of the Envelope immediately. So, for example, a value of 0 for Attack causes the Envelope to start at maximum volume.

Hold Time

The parameter AMP-H sets the Hold Time. For Voices A, B and D this controls the number of ticks that the Sustain phase of the Envelope lasts for before going into the Release phase. For Voice C, this defines the number of ticks that the Voice is audible from the beginning of a new note.

Voice C 'Pulse'

Voice C has a parameter that is unique to itself. The parameter is named 'AMP-P' and stands for Amplitude Pulse. The left and right digits control the amount of time the Voice is turned on and off, respectively, for the duration of a note. It can produce an odd warbling effect when using higher values (0 is slowest, F is fastest for both digits).

Duty Modulation

Voices A and B have Duty Modulation. 'Duty' is the term used for one of the 4 pulse widths that can be set for each of these two voices. In PR8 you can either specify a fixed Duty or you can modulate the Duty by using both the DTY-P0 and DTY-P1 (Pulsewidth 0 and Pulsewidth 1) parameters.

Fixed Duty

To use a fixed Duty simply specify either 00, 40, 80 or C0 in the P0 parameter. In this case P1 is not used.

Modulated Duty

Modulation is achieved by specifying both the Duty value and a time to hold that Duty for before moving onto the other Duty setting. For example, a value of 08 in DTY-P0 will hold a Duty value of 00 for 8 ticks before moving to the DTY-P1 setting. A value of 14 will hold a value of 00 for 20 ticks (14 is hexadecimal for 20 decimal). The range of delay for each Duty value is: 00-3F, 40-7F, 80-BF and C0-FF.

You can therefore have the Duty value start at P0 and then hold at P1 (by specifying 00, 40, 80 or C0 in P1) or have the modulation cycle between the P0 and P1 values. For example, if P0 = 04 and P1 = 86, the Duty will be set to 00 for 4 ticks, then 80 for 6 ticks and then loop back to P0, continuing to do so until the end of the note.

DMC Synthesis

DMC (Voice E) doesn't really have synthesis but there are parameters to manipulate the playback of the samples.

Sample Number

The DCM-S parameter sets the sample number to use. 00 is silent. The range of this parameter depends on how many samples you have in the PR8 ROM (you can patch the ROM with your own samples with the PR8 ROM Patcher tool).

Start Offset

Using the DCM parameter you can offset the start of the playback of the current sample. The value is not checked for error/range and will depend on the length of the sample. It is possible to specify 'invalid' values which most often results in garbage playback.

End Offset

Using the DCM parameter you can offset the end of the current sample. Like the DCM parameter, it is possible to set 'invalid' values which will result in garbage playback.

DCM 'Pitch'

The DCM-P parameter controls the playback speed of the sample. The range is 0 to F with F being the fastest (and most used) setting.

DCM Looping

The DCM-L parameter turns looping of the sample on or off. A value of 00 means that looping is off while any other value causes the sample to be looped. The looping occurs between the start and end of the sample and is also affected by the Start Offset and End Offset parameters.

Patching The PR8 ROM With Your Own Samples - 'DCM2PR8'

Included with PR8 is a ROM-patching tool that enables you to replace the preset DCM samples. I've included a folder full of pretty usable samples (the 'DPCM' folder that is created when you unzip the PR8 zip file) or there are plenty of 'ripped' DCM samples floating around the internet. Alternatively, you can create your own.

If you want to create your own DCM samples (i.e. convert WAV files) then you'll need a tool to do so. There are a couple of good ones knocking about the internet, personally I use Damien Yerrick's '81ex' which is a command-line tool. You can get the source and Windows executable from his website. I've included a Mac binary of this program with PR8 because that's what I use and it's not included in the 81ex release package.

If you're a Windows user and prefer a graphical interface, I can recommend RushJet's RJDMC. There's information and a download link on the Chipmusic.org website

Patching

Once you have a bunch of samples you'd like to patch into the PR8 ROM - and please note that ALL the samples will be replaced, you can't add samples to the ROM - you need to prepare a text file which will tell the ROM patcher the file/folder name of each sample and will also determine the numerical order that you'll access them in PR8.

For example, from the PR8 folder you might create a text file like this, named something like PATCH.TXT;

DPCM/kick01.dcm
DPCM/snare01.dcm

Important: the text file needs to be plain text and contain no lines (including blank lines) other than sample file names.

Then with the text file and the PR8 ROM in the same folder, run the patcher. I've included a Windows and a Mac executable with PR8, as well as the source code in case you need to build it yourself. To run the patcher (on Mac):

DCM2PR8 PATCH.TXT PR8_PATCHED.NES

This will patch the ROM with the samples in your text file and create a new ROM called 'PR8_PATCHED.NES'. If you create a ROM with a new name, as in my example, don't forget that NES emulators create/load .sav files with the same name as the ROM. This is also true when using PowerPak but with PowerPak you can load any .sav file you like on boot-up. You can of course specify 'PR8.NES' as the output name for the patcher and the original ROM will be overwritten. I've included a text file with PR8 ('pr8_dcm.txt') which contains a sample list for restoring the preset samples.

So, in the patched ROM, using my example sample list, 'kick01' will be sample 01 and 'snare01' will be sample 02 - the numerical order is determined by the order in text file used with the patcher. Note: there is no sample 00 as that's used to play silence on the DCM voice.

There's a limit to how much sample data you can include. The maximum number of samples is 64 and you have about 13k of space in the ROM. DCM2PR8 will give you an error message if you go over these limits and your ROM won't be patched.

Samples

Source file formats for converters tend to be 16bit mono WAV files (no looping is supported in the samples themselves - looping control is done in the Drum Patches). RushJet's RJDMC will resample the source file to a rate supported by the NES but if you're using '81ex' you're better off resampling the source samples yourself. Here's a list of (approximate) supported rates and the DCM playback speed value for each rate.

Sample RateDCM Speed Value
33140Hz0F
24860Hz0E
21300Hz0D
16880Hz0C
13980Hz0B
12600Hz0A
11180Hz09
9420Hz08
8360Hz07
7920Hz06
7050Hz05
6260Hz04
5590Hz03
5260Hz02
4710Hz01
4180Hz00