Skip to main content

Synthesizer diagram

The DSP diagram below shows the overall digital signal processing (DSP) flow for the Jamdac synthesizer:

ReverbWave AWave BWave CEnvelope #0Envelope #1Envelope #2Envelope #3Envelope #4DDleftrightAPPLY_EFFECTChannel Block (there are six of them)RIGHT_LEVEL*REVERB_LEVEL*LEFT_LEVEL*APPLY_WIDENER80 samples (3.6ms)DelayEffectDDsignifies that enabling Wave B’s digitar will disable the channel effect.)(The dotted

Important points:

  • On the left side of the diagram, each "wave" box contains an oscillator that generates a primitive signal such as a square wave.
  • The signals flow through the diagram, following the arrows. Each stage transforms the sound in different ways.
  • On the right side of the diagram, the left/right arrows go out to the digital to analog converters (DACs) that drive your speaker or earphones.
  • There are actually six channels. For readability, the above diagram only depicts one of them (in the dashed rectangle). A given channel can play one note from one instrument at a time.
  • The instrument sounds from the six channels are mixed together before applying reverb: the outputs of the six channels are simply added together. These additions are depicted as triple arrows.
  • Each channel gets its own three envelopes: Envelope #0, Envelope #1, and Envelope #2. Envelopes #3 and #4 are shared by all channels. Thus, the total number of envelopes is 20=63+220 = 6 * 3 + 2.
  • If a parameter name has an asterisk (REVERB_LEVEL*), this means it is controllable using a dynamic.
  • Although the diagram is a bit complicated, many of the DSP components are optional and not actually needed for basic instruments. In fact, you can play "chiptune" music using just one oscillator from Wave A.

Legend

Some common symbols used in the DSP diagrams in this book:

clip signal to between -1.0 and 1.0delay buffersubcomponent (detailed separately)amplifier that multiplies samplesmix two signals by adding samplesswitch between two routes

Clip operator

The clip operator (depicted as a small hexagon) prevents the signal from exceeding the 16-bit range. Depending on our notation:

CLIPPED_SAMPLE <-- MATH::MIN(MATH::MAX(SAMPLE, -32767), 32767)

c=min(max(s,1.0),1.0)c = \min(\max(s, -1.0), 1.0)

Clipping can flatten the top/bottom of a signal's waveform. If you intentionally over-amplify your signal to cause significant clipping, it will produce "distortion" similar to an electric guitar.

Delay buffer

In the diagram, the delay buffer (a large hexagon) is an integer array that remembers recent samples, useful for making echoes and feedback loops as well as allpass filters.

Important points:

  • The delay units share a memory pool that is 64 kilobytes total. Thus, the delay amount typically will not exceed 100 ms. 100 ms is 2,205 samples or 4,410 bytes.
  • Each of the six channels has 2 delay buffers: one for Wave A's digitar, and one for Wave B's digitar or the channel effect.
  • The stereo widener has a hardwired delay of 80 samples.
  • The reverb block contains 6 more delay units, each with relatively small sizes.