Stuck with a SynthEdit project?

Tag: Using the Waveshaper Module

DH-Wshape2 Third party waveshaper module.

Hands up all those who love the sound of “Digital” Synthesizers? If you do then one of this module is for you. Especially if you want to be able to control the amount of Waveshaping by using a control voltage.
It’s a “Third Party” module courtesy of RH Modules http://www.rhmodules.nl/downloads/dspgui/
The basics are quite straightforward. The ‘Scope and 1kHz Oscillator modules are included just to show the effect of the DH-Waveshaper. The default for the Shape control voltage is +/- 5 Volts, but this can be increased to +/- 20 Volts to give a wider range of shapes. See the screenshots below…
The only waveforms that aren’t worth putting through the waveshaper are a pulse (you’ll get some wild amplitude changes and some very large spikes on the leading and trailing edges), or noise. Unlike the SynthEdit stock Waveshapers there are no formulae to set up, just a control voltage

The effect of +20 Volts Shape CV
This gives and extreme foldback effect on the positive and negative peaks of the audio input.

Output of the waveshaper with +20V gain CV

The effect of 0Volts Shape CV
Here we get a slight flattening of the sine wave peaks which gives a very subtle distortion, almost like a slightly overdriven valve PA.

Output of the waveshaper with 0V gain CV

The effect of -5 Volts Shape CV
This gives us a “crossover distortion” effect where the audio input doesn’t start to appear at the output a until the audio input has risen slightly above 0 volts.

Output of the waveshaper with -5V gain CV

The effect of -20 Volts Shape CV.
Starts folding back the 0 volts crossover portion of the audio input.

Output of the waveshaper with -20V gain CV

Modulating with an ADSR module.
Just as a basic “bare bones” idea of what’s possible, you could have the waveshaper modulated by an ADSR2 triggered by the keyboard so the peak level of the audio is the most distorted.

Control the waveshaper with an ADSR module

Modulating with an LFO Module.
Or a free running LFO so that the distortion varies slowly (or rapidly) over time

Control the waveshaper with a LFO module

A SynthEdit Waveshaper Prefab.

This design uses some pre-defined mathematical functions to shape the input waveform. The Formulae for the shaping are all held in a Fixed Values (Text) module from where they can be selected.
These values are sent to a Switch > Text module. From there they are fed to the Waveshaper2B module where the mathematical function is applied to the input waveform. The 1 Pole HP filter is to block any DC component that the Waveshaper might introduce. From there the X-Mix module sets the balance between the unaltered input, and the shaped signal.

Notes:
All the Slider controls are left at their default values.
Formula 12 (Folding) is purely a foldback distortion, the Sin and Cos formulae add some 2nd/3rd/4th harmonics giving a formant like sound to a sine or triangle input.
Using Sqrt (Square Root) formulae can give some quite spiky waveforms.
Formulas used:
1) Sin: 6sin((x+2/PI)+(x+2/PI))
2) Cos: 5cos((x+5/PI)+(x+5/PI)) 3) ASin 2asin((x/PI)+(x/PI))
4) Acos: 2acos((x/PI)+(x/PI)) 5) Sqrt 5 sqrt((x/PI)+(x/PI))
5) Sqrt: 5*sqrt((x/PI)+(x/PI))
6) -Sqrt: -5*sqrt((x/PI)+(x/PI))
7) Sin Cos: 6*sin((x+2/PI)+cos(x+2/PI))
8) Cos Sin: 6*cos((x+2/PI)+sin(x+2/PI))
9) Default: 5*sin(x/PI)
10) 3*Sin: 6*sin((x+2/PI)+(x+2/PI)+(x+2/PI))
11) 4*Sin 6*sin((x+2/PI)+(x+2/PI)+(x+2/PI)+(x+2/PI))
12) Folding: 3 *(abs(-abs(-abs(x+1.25)+2.5)+2.5)-1.25)
Other functions can be used, although some may result in outputs with a very high amplitude, or nothing at all, feel free to experiment.

Structure of the waveshaper prefab

Adding a Butterworth High Pass filter will also greatly reduce any unwanted low frequency “rumbles” which can be introduced.
As you can see in the Frequency Spectrums below the layout with the Butterworth High Pass filter in circuit, a lot of the “noise” below 200Hz is drastically reduced. The filter was set to a cut-off frequency of 200Hz, and the number of filter Poles to 12.

Adding a better high pass filter to the prefab

Unfiltered output:

Filtered output (about 200Hz High-Pass):