Stuck with a SynthEdit project?

Month: June 2024

Shelf filters what are they?

What is the difference between an ordinary low pass filter, and a low shelf filter? Why do we have the two different types of filter? What is a Butterworth Filter?

Low pass compared with low shelf filter.

Comparing the two types of filter: In the structure below I have used the Oscillator set to white noise to give us a signal with (as seen in the first Frequency Analyser screen) a fairly even output across the audio frequency range. Feeding this into the different filters we can immediately see a difference in how they change the frequency spectrum. The first noticeable difference between the two types is the Low Shelf filter has an additional Gain plug.
Filter 1;- Low pass, 4pole, 400 Hz pitch. This gives us a complete roll-off of the output above 400 Hz.
Filter 2; Low shelf, 4 pole, 400 Hz pitch +40 dB gain.
Filter 3; Low shelf, 4 pole, 400 Hz pitch -20 dB gain.
Looking at the Frequency spectrum for the two Low Shelf examples we can see that the +40 dB gain filter has boosted frequencies below 400 Hz, and the -20dB gain filter has reduced the frequencies below 400 Hz. So using the voltage on the Gain plug we can control the level of the output below 400 Hz, cutting and boosting it as needed. This makes shelf filters an ideal candidate for tone controls like you have on a Hi-Fi sound system.
Using the pitch plug voltage we can vary the frequency at which the output starts to cut or boost.
Note: This voltage must never be modulated dynamically by an LFO or ADSR. It is only suitable for relatively slow changes.

High shelf, Low Shelf, Band shelf filters.

There are three shelf filter types; Low shelf, Band shelf, and High shelf. In the image below you can see how a boost of +40dB affects the output level of each filter as regards frequency.
Important note: These filters are not suitable for use as, and must never be used as Voltage Controlled Filters. Modulating the cutoff frequency rapidly will cause very loud clicks, pops and undesirable audio artefacts!
Note: Shelf filters have no feedback, and cannot introduce any resonance effects.

Butterworth filters:

The Butterworth filter is a type of signal processing filter designed to have a frequency response that is as flat as possible in the passband.
The Butterworth filter is an IIR filter design which produces the best output response with no ripple in the pass band or the stop band resulting in a maximally flat filter response but at the expense of a relatively wide transition band.
In applications that use filters to shape the frequency spectrum of a signal such as in communications or control systems, the shape or width of the roll-off also called the “transition band”.
For simple first-order filters this transition band maybe too long or too wide, so active filters designed with more than one “order” are required. These types of filters are commonly known as “High-order” or “nth-order” filters.
The complexity or filter type is defined by the filters “order”. We also know that the rate of roll-off and therefore the width of the transition band, depends upon the order number of the filter and that for a simple first-order filter it has a standard roll-off rate of 20dB/decade or 6dB/octave.

Important Note: Butterworth filters are not intended to be used as VCF’s or have rapid changes in frequency. They are designed and intended for use as static or (manually changed) frequency equalization filters
Notes:
1) This filter is not suitable for fast changes in frequency!
2) Don’t go below 100Hz filter frequency, as the filter behaves incorrectly
3) Below 100Hz bandwidth the filter behaves incorrectly

Comparing the Low, Band and High Shelf

Plugs.
Left Hand Side:
Signal:- (Voltage) Audio input signal
Pitch Hz:- (Floating Point) Frequency set by floating point value (Note: Don’t go below 100Hz as the filter behaves incorrectly)
Width Hz:- (Floating point) Band shelf only. Controls the width of the band of frequencies which are cut or boosted.
Gain dB:- (Floating Point) Sets the level of boost or cut in dB relative to the input
-ve for a cut +ve for a boost.
Poles:- (List) Number of filtering stages, the larger the number of poles, the more efficient the filtering, and more CPU power used. 1 to 12 Poles.

Right Hand Side:
Output:- (Voltage) Cut or boost the spectrum of the filtered audio signal depending on the filter type.

Making a tone control structure.

Connecting these modules as a tone control is relatively simple: Just take your input signal and feed it through the three filters, using the sliders for cut and boost controls with minimum and maximum values of -40 and +40

Stereo Imaging- The Haas effect

What is the Haas Effect?

The Haas effect (properly known as the “Haas Precedence Effect”- there are other unrelated Haas effects) is a way to create a simulate a stereo signal in the studio even when we don’t have a stereo source – or even have access two individual sound sources to start with.
The best way to create a good stereo sound is with multiple takes. This will will provide the best sounding results when you’re looking for a nice, thick stereo sound. Usually in a recording studio we would record two mono takes of an instruments part, put each take on its own track, and pan those tracks left and right. Judicious use of reverb will also help create the sense of space.
However we may want to work from a pre-recording of an instrument or sound and widen the stereo field, in which case recording two takes isn’t an option. Maybe time and resources are limited. For all sorts of reasons two takes might not be a practical option.

How the Haas Precedence effect works.
The Haas Effect is a psycho-acoustic phenomena, resulting from the way our brains work when trying to make sense of the world around us.
If two separate versions of a sound occur in rapid succession – separated by say 5-10 milliseconds, when we hear this our brain “fuses” these two sounds into one.
This merging of the sounds continues to occur until we reach a separation time of about 30 milliseconds, but, when we get to a separation of 50 milliseconds upwards, we will interpret this as two distinctly separate sounds (depending to some extent on what kind of sound we’re talking about). There are some curios things regarding how our brains give priority to the first perceived sound – even ignoring the the second sound, which is covered in detail in research into the the Haas effect and it’s effect on our perception of sounds. For more information have a look at this Wikipedia article about The Precedence Effect.

Using this effect.
What we are really interested in though is that if you take a single audio source, split off a copy to create a second version of it, and delay that second version by about 25 to 40 ms – your brain will still not hear the sound as two distinct sounds, it’s already reinforced and sounding like there’s more than on instrument playing. Now comes the good bit: if you pan the two sounds left and right, your ears and brain will interpret the two sounds as being more spread out, that is a wider sound than the your original single point-source of our original mono sound.

Creating a Haas Precedence stereo effect for SynthEdit.

With these few (stock) modules shown below we can create a simple Haas stereo effect. The values for the Delay2 module are shown on the Fixed Values (Volts) module I find a delay of 40 milliseconds (0.04 V) works well, you don’t want any feed back so this is held at 0 V The Level Adj module on the input is just a buffer.
With the default values on the Width slider you get a progression from a mono signal at 5 V through to a wide stereo image at -5 V.
Note: Due to the delay time inherent in this method of imaging you will probably notice some “phasing” effects between the original and the delayed signal when you reach 50% of the mix. This IS a normal artefact with Haas Precedence widening.

Dual delay Haas stereo effect.

Shown below is a an improved version, with two Delay modules for improved separation along with high pass filters. The two Delay modules have different delay times, 30 milliseconds and 40 milliseconds.

Dual delay Haas stereo effect

Haas effect with pitch shifter.

Another variation is to add a small pitch shift into one channel along with the delay which add slightly to the amount of separation between the channels.
This also gives the impression that the pitch shifted channel is another separate instrument being played.
You don’t want too much pitch shift, otherwise you can get some unpleasant beating and dissonant effects due to the frequency difference. I found that about 0.02V On the Pitch plug was plenty. It’s also best to enable the Anti-Aliasing option in the properties panel, and increase the Block size to 4096.

Chorus effects

What is chorus and how does it work?

Frequency or pitch.
Before we jump into understanding how chorus works, and creating chorus effects, it’s handy to have a basic idea what makes an audio signal sound like its does. One characteristic of a musical sound is that it is more or less cyclical.
This means that the sound waves repeat a regular pattern moving between positive and negative cycles of the signal. The amount of time it takes for this signal to complete one cycle is the signal’s frequency in Hertz (Hz).

Components of a sine wave

Another characteristic of all the components making up a sound wave is the phase between these components.
What is Phase?
Phase in audio is the position of a sound wave at a particular point in time, and our interested will be in the amplitude of the signal at that point.
Think of our sound wave on a graph. The phase of a wave is its position along the x-axis (time) relative to the start of the wave’s cycle.
When discussing the phase of a sound wave, we refer to it in of degrees (similar to how we think about a position the circumference of a circle). One full wave cycle is defined as 360º and each multiple of 360º marks the beginning of a new wave cycle. To keep things simple, we’ll use a sine wave to illustrate this concept.

Phase

Phase difference.
When looking at phase relationship between two or more waveforms of the same frequency, we can say that these signals are either in-phase (0 degrees), out-of-phase (180 degrees), or anything in between. It’s these phase relationships between audio signals that creates the audio effects that we call chorus, flanging, and phasing.
In the diagram below we have two audio sine waves of the same frequency, that are out of phase by 90 degrees.

Showing a 90 degree phase shift

How phase affects sounds.
There are two phase relationships to keep in mind:
a) Constructive (in-phase)
b) Destructive (out-of-phase) interference which is more likely to occur when identical signals are layered together, as is the case with chorus, flangers, and phasers.

Constructive interference: in-phase
When two signals of the same pitch are in-phase, it means that they are perfectly aligned in time, and if they are the same amplitude we will have a voltage difference of 0 volts between them.
Think of when you record a track and then you duplicate it without making any changes to differentiate them from one another.
This is an example of constructive interference: the identical waveforms will add together to produce a signal with amplitude equal to the sum of the individual waveforms (+6 dB of gain on a meter).

Destructive interference: out-of-phase
When two waveforms are perfectly out-of-phase (180 degrees), it means one waveform’s peak (highest point) is being subtracted from the other waveform. If the two are of identical volume and pitch they will cancel each other out.
We can see the results of in Phase and Out of phase signals below. The signals of the left are in phase and add to each other, the signals of the right are out of phase and are cancelling each other.

How phase can add to and cancel out signals

Destructive interference: comb filtering
Comb filtering is using destructive interference in a complex audio signal where an identical copy of the signal is time shifted slightly. This delay can be anywhere from 0.1ms to 10ms. Depending on the time delay, this will result in a frequency response that looks like a comb when the two signals are mixed together. The teeth the “comb” represent the cancellation of certain parts of the spectrum, resulting in the “whooshing” sound we hear sweeping back and forth in flangers.
The diagram below shows how we achieve the flanging effect:

Flanger diagram

And this is what the end result is in terms of our output frequency spectrum.

Comb spectrum

What does all this have to do with Chorus?
“Chorusing” is meant to recreate the (usually) subtle differences in pitch and timing that occur when a number musicians or vocalists create the same note, but there are natural variations in pitch and timing.
We can describe the sound of “chorus as a sort of doubling effect that adds thickness, shimmer, and helps to create an instrument sound “larger” than it would on its own.

How does the chorus effect work?

You create a ‘chorus’ effect by creating a copy (or better, multiple copies) of a signal, the slightly varying the pitch, introducing a small delay to each copy, and then mixing these copies with the original signal.
Rather than using pitch modulation to modulate the pitch, like a vibrato effect, a chorus achieves subtle changes in pitch by modulating the delay time of the waveform with a low frequency oscillator (LFO).
These moderate differences in time and pitch cause a constantly changing
phase-shift between the original signal and the copied signals.
Timing is important.
A chorus effect will use typically use time delays in the order of 15 to 35 mS so that the ear is tricked into perceiving these delayed copies a separate instruments, and the small pitch shifts will add the rich “shimmering” sound.
We don’t want to use a delay that’s too short otherwise we are going to get more of a comb filter effect, or a delay that’s too long as then we are starting to get a “reverb” effect.

Creating a simple chorus effect in SynthEdit:

In this structure I’m using four of the stock Delay2 modules with the delay times set in the properties panel as;
15 ms (0.015), 18 ms (0.018), 20 ms (0.02) and 25 ms (0.025).
I have used two TD LFO_A_ST “stereo” LFOs with their phase plugs set to;
1.0 V and 2.5 V for the top LFO and -1.0 V and -2.5 V for the bottom LFO so that the modulation of each delay is always always slightly shifted in time. The feedback on each delay module can be left set to 0, or you could add a slider control common to all modules feedback plugs so that you can set a small amount.
Converting the design to stereo is just a matter of doubling up on the modules for left and right channels, though you’ll probably want to have the controls common to both channels. The modulation depth doesn’t need to be very great, setting the Max value on the slider to 3 V will give more than enough of a pitch variation.
Note: You will need to set the Interpolate Out setting to “On” for all the delay modules as we are modulating the delay time.

Sub Controls – Modifying the Knob

Have you Ever wished that the Moog style Knob control was just a little more versatile? Well it can be and it’s not “rocket science”. If we take the original Knob Sub-control prefab that comes with SynthEdit then its a matter of adding a few extra modules.

With some extra modules (as shown below) we can create a Knob which can be easily re-named, have a value readout, which has a suffix to indicate the type of value (Hz, Volts, dB etc.).
I have used the following ED modules:
GUI String Append, Fixed_string, and Text Entry (I like this module as it’s easy to control the appearance of the text, and set the background to transparent)
We also need to convert DSP Float values to GUI float values for the Hue switching so the QTN Float2GUIFloat is ideal here. The Bool to float modules are used so you can switch the Saturation from colour to mono, and the Brightness from light to dark using a simple tick/untick option.
With some basic maths we can re-scale the voltage to give us readouts such as; Volts->Hz, Volts->kHz, Volts->dB etc.
The switch with the fixed values allows us to easily select a text colour, or by unchecking the colour/mono option just to have black or white text.
The Text and BG (Background) ARGB values are standard, and using 00 for the A value on the BG ARGB setting gives us a fully transparent background.
The string Append module allows us to add mode text after the Float To Text value, so there’s a single space in the Fixed String module, and then the third value is set by you for the appropriate Volts, Hz whatever for the control.
You can also change the number of decimal places that are used for the value readout using an integer value.

The finished control is shown below, and you can download the prefab (for V1.5) from here
Note: You must have the correct 3rd party modules installed!.

How the finished prefab looks