Stuck with a SynthEdit project?

Month: September 2024

Making a Saturator.

A Saturator is a good way of adding a bit of colour and “oomph” to a bass or lead synth line, but how can we make one in SynthEdit?
What we want to do is not to introduce hard clipping to the signal, that would be too noticeable we are after something more subtle that just adds a few more harmonics to the signal.

Creating a basic saturator.

The core part of this module is the waveshaper, and for saturation we use the formula 5*tanh(x). The idea is not to clip the peaks of the waveform, but to try and emulate the sound of a slightly overloaded (or saturated) valve pre-amplifier which tanh(x) does quite well.
This formula applies tanh to the input signal, and then multiplying the result of the tanh(x) calculation by 5 restores the output to the normalized +/- 5 Volts peak to peak. The VCA on the input of the waveshaper controls the level of signal passing through the waveshaper, and being applied to the output mixer.
The inverter and divider are used to keep the output level as constant as I could, this works by inverting the slider voltage from the waveshaper VCA’s volume control and applying it to the Volume control. The adjusted negative voltage then reduces the gain of the output VCA as the Waveshaper signal is increased in level . The optimum division value seems to be 2.3 Volts (but may need “tweaking” slightly). The input VCA has its response set to Exponential, and the output VCA is set for a linear response, I found this gave the best results with signal levels.
The input level control is set to have a range of 0 to 20 so that we have plenty of gain. This is the only non-standard min-max range on the controls.

A basic stereo saturator structure.

The output with no saturation applied:
The signal is passed directly to the output VCA and is a pure sine wave with no added harmonics.

No saturation

The output with maximum saturation applied:
Here you can see that once we pass the signal through the waveshaper the sine wave peaks have been reduced smoothly which increases the level of harmonics without introducing too much harshness into the output. The higher the level of signal passed through the waveshaper the more harmonics we generate.

100% Saturation.

To give a bit more control over the audio I have added a TD Stereo EQ module, that gives us the options of Low Shelf boost/cut, Band boost/cut and High Shelf boost/cut.

The whole structure…

The finished Saturator project with its panel layout and links to the 3rd party modules, prefab and VST3.

My final panel layout

I have made the finished project available as a V1.5 .seprefeab file and as a completed VST3 plug-in. However you will need some extra 3rd party modules from TD Modules, Sasha, and Davidson.

Changing the Harmonic structure.

By adding in the (highlighted) inputs to the Waveshaper modules we can offset the equation, causing the addition of odd as well as even harmonics. All it needs is for this offset Plug in the IO Module to be connected to a suitable control then we can control the amount of odd harmonics that are added to the signal by changing the offset voltage. I would suggest that a range of 0 Volts to +4 volts is a suitable range for the offset (negative voltages have the same result).
The High pass filters are added to prevent DC from the offset appearing in the output, and can be set to an appropriate frequency such as 14 Hz to minimize any changes in the output signal.
Here is a link to the Thoracious prefab version V1.5 seprefab file

Below is the spectrum with 0 volts offset.

No offset.

Compared with an offset of 1 Volt

1 volt offset.


This was a modification suggested by Thoracious Apotite, https://www.thoracius.com/ in the comments. Many thanks Thoracious! Comments such as this are always welcome.

SVG “Analogue” Knob

Customising the look of the Analogue Knob.

@Label: (Text) The text label that appears below the control. (The colour is set by the “Print” ARGB)
@ Value: (Text) This is the value or alternative text that replaces @Label when the mouse hovers over the control. (The colour is set by the “Neon” ARGB)
@Color: (Text) Controls the colour of the “skirt” and main body of the knob.
Cap: (Text) Controls the colour of the cap insert in the centre of the knob.
Neon: (Text) Sets the hover colour for the @Value text.
Pointer: (Text) Sets the colour of the dot on the body of the knob.
Print: (Text) Sets the colour of the scale markings and the @Label text.

Changing the appearance of the knob.

Changing the behaviour of the knob.

Shown below are some useful properties settings for the knob:
Offset angle: This offsets the starting position of the knob, by changing this to 90 we add 90 degrees to the starting position of the knob.
Sweep Angle: By changing this to 180 we can limit the range down from the usual 300 degree control knob sweep, to a180 degrees sweep, or any other range that might be required. Note: This will not change the scale markings!
Scale: Adjusts the size of the control knob.
Opacity Normal: By setting this to 0 we obtain the behaviour where the @Label text is swapped for the @Value text as the mouse hovers over the control. If the value is left as 1 then only the @Label text will be seen..
Setting the Min/Max Range: This is the same as any other SynthEdit knob or Slider, and is set in the Patch Memory in the Prefab properties panel.

Changing the behaviour of the knob

Changing from a continuously variable control to stepped.
It’s a simple as changing the Patch memory From Float3 to List 3, and connecting up a module with a list plug, then connecting Choice and Item List plugs. Add a List to Text module to feed the choice to @value and it’s done. The Patch Memory sets it all up for you.

Using the knob as a stepped switch control for Lists.