Synthedit help and tutorials

Stuck with a SynthEdit project?

Page 19 of 20

SynthEdit Filters

First I’ll cover what a filter actually does, and the four modes of filtering: Low Pass, High Pass, Band Pass, and finally Notch filtering. Next will be the common types of VCF found in Synthesizers, such as Moog, Korg et al.
A subtractive synthesizer without a filter is going to be very much lacking in the soundscapes you can generate – it will be like a curry without most of the spices missing. Filters lend sounds their flavour by boosting and cutting the oscillators’ frequencies.

Generally speaking any filter that has a cut-off pitch set by a float plug is not suitable changes in frequency during operation, they tend to respond badly, produce strange noises and crash unpredictably.
Filters which have a dark blue voltage plug for pitch/frequency are safe for faster modulation speeds.

So, let’s first review the different breeds of filter.
In order of appearance: Low Pass, High Pass, Band Pass, and Notch (AKA Band Stop) filter frequency response curves are shown below.:

Characteristics of High, Low, Band-pass and Notch filters.

Most Synthesiser voltage controlled filters have a resonance control. This alters the amount of internal feedback in the filter, which causes a boost to frequencies at the filters cut-off frequency, causing “ringing” and even self oscillation in the filter.

Low pass filter with a low resonance setting:

Low pass filter with low resonance setting

Low pass filter with a high resonance setting:

Low pass filter with high resonance setting

The State Variable Filter (SVF) works in low-pass, high-pass, bandpass, and band-reject (also called notch and band-stop) modes. And all of these modes can operate at the same time, if you wish.
Low-pass and high-pass modes cut-off slopes are 12 dB per octave, and the band-pass modes is 6 dB per octave.
State variable filters are all-pole filters, meaning they boost high frequencies even when the resonance value is low. This affects band-pass and high-pass outputs more than the low-pass output, also mixing these outputs adds a touch more gain.

The next type is the Moog ladder filter, which is a Low Pass filter. This is a digital emulation of Moog’s celebrated four-pole transistor ladder filter, the Moog Filter is a has a 24 dB/octave frequency attenuation slope. Its digital programming also simulates the analogue components’ natural non-linearities. As well as responding differently to different input levels, it also (like the original) self-oscillates when resonance is turned up high. It behaves very differently to an SV filter at high resonance levels.
The Moog Filter features enhanced resonance levels for high frequencies, adding a natural high-end gloss, and moderate resonance levels for lower frequencies.
Note: At extreme resonance settings, unlike the original analogue circuit the saturation in the digital filter may cause high frequency aliasing.

SINC filters are linear phase “Brickwall” filters, Brickwall meaning that unlike normal filters where the frequencies above or below the cut-off frequency are attenuated more the further you pass the cut-off frequency these filters abruptly stop passing audio at the cut-off frequency. Linear phase meaning that across their frequency range there is as little change in phase shift as possible. These filters are an idealised design only possible in the world of DSP programming.
Due to their nature SINC filters do not have a resonance control or any feedback
High Pass SINC filter.

High pass SINC filter

Low Pass SINC filter.

Low pass SINC filter

This is a digital emulation of the OTA Low Pass filter used in the Korg MS20. This filter had a characteristic “screaming” quality when high input levels were combined with high resonance control settings. In the SynthEdit emulation this saturation can be controlled, or turned off altogether.
The effect of the saturator is shown below, as you can see the effect is to reduce slightly the main resonance peak, and introduce some new resonance peaks into the spectrum

For practical design purposes, the Sallen-Key filter is switchable from 12dB/octave lowpass to high-pass to band-pass – a versatile filter. Also, if you push a lot of volume through the Sallen-Key filter it starts to overdrive subtly and then more distinctly, which is another useful sonic option. On the Arturia Brute synths, Arturia arranges the “Steiner-Parker” style (Sallen-Key) and “Moog” style (transistor ladder) filters so they can be used either in series – one operating on the basic oscillator sound after the other – or in parallel, with the outputs from both equally audible. A Master Cut-off knob is also provided to change the basic setting of both simultaneously. Combining the various types of filter in these ways can give you a lot of options in your sonic palette.

TD Modules Sallen Key Filter

Sallen Key filter

TD Modules Steiner-Parker filter
Note that each filter mode has its own input, so you can have each mode set at it’s own level giving you all sorts of possibilities.

A type of voltage controlled filter, originally developed by EMS in order to work around the Moog patent for the VCF.
The diode ladder works on a similar principle to the Moog transistor ladder; the diode, under the influence of an applied control voltage, permits or limits current flow to a filter capacitor, such that as the control voltage is varied, the filter’s cut-off frequency changes. A main difference between the transistor ladder and diode ladder is that in the transistor ladder circuit, each pole of the filter is electrically isolated or “buffered” from the others. In the diode ladder, this is not the case; all the poles interact electrically with each other. This makes the diode ladder much more difficult to analyze mathematically, and its distortion behaviour as resonance is increased is more non-linear and harder to predict. Performers often say that the diode ladder filter has a “dirtier” sound, which is probably the effect of the less predictable distortion behaviour.
Besides the EMS synth models, the diode ladder was used by Roland in many older analogue models of Synthesizer. The famous TB-303 filter is a diode ladder filter.

These are much like their ordinary counterparts in the SynthEdit filter selection, but are closer in sound and behaviour to their original counterpart Analogue filters. There are some comparisons below, see the difference in the frequency roll-off at the top end of the spectrum.
SV Filter:- Top Spectrum is the ordinary SV Filter, the bottom one is the VA SV Filter.
The “Normal” SV filter can start to distort at high resonance levels at the top end of the spectrum, and can start to sound distinctly “crunchy”

Comparison of Standard and VA state variable filters

Comparison between the Standard (Top) Moog Filters, and the VA (bottom)

Comparison of standard and VA Moog filters

After doing some side by side testing (on a personal level) I prefer the sound and behaviour of the VA filters, as it’s closer to how the original analogue filters behaved.
There is more to these filters than just that… if you want to go into the “geeky” stuff… read on, there’s more.

OK, so this sounds like a real contradiction in terms an ALL pass filter? What does it actually do?
An all-pass filter is a signal processing filter that passes all frequencies equally in gain, but changes the phase relationship among various frequencies. Most types of filter reduce the amplitude (i.e. the magnitude) of the signal applied to it for some values of frequency, whereas the all-pass filter allows all frequencies through without changes in level, but changes the phase of the signal dependent on the frequency. A common application in electronic music is in the design of an effects unit known as a “phaser”, where a number of all-pass filters are connected in sequence and the output mixed with the input signal to produce a notch which can be swept back and forth in frequency by modulating frequency of the filter. Read more on All pass filters here

Bi-quad filters are commonly used in digital filter design. Bi-quad is short for
Bi-quadratic, a second order filter comprising two poles and two zeros.
A bi-quad filter’s transfer function is much like a state variable’s. What sets the former apart is that it contains so-called zeros.
They do however eliminate the high-frequency ringing that State Variable filters are so well known for.
A Bi-quad filters high-frequency performance is excellent, highly stable all the way up to Nyquist. Most are faster than state variables, and much faster than Moog filters, however for reasons outlined below they are not really useful as a VCF.
Note: On the downside, a Bi-quad filter’s low frequency performance is not exactly a model of stability. At high resonance levels, low frequencies tend to destabilize with excessive gain. This can boost levels to extremes and cause clipping, especially during fast filter modulations. This makes Bi-quad filters unsuitable for fast modulation rates, as they can quickly become unstable, and prone to crashing or making strange clicking noises.

Butterworth filters are usually operated at fixed frequencies with variable gain levels for such designs as graphic or parametric equalizers, tone controls etc.
Butterworth filters have no resonance control plugs, just peak or cut-off frequency, gain, number of poles, and for bandpass/notch filters an width setting (bandwidth).

These are often Butterworth filters that are used in equalizers or tone controls. The idea of a shelf filter is that it boosts or cuts frequencies above or below a set frequency. High shelf boosts or cuts audio above the set frequency, and Low shelf boosts or cuts audio below the set frequency (see chart below) the idea is just to cut or boost part of the spectrum without introducing any “colouration” of the audio (no resonances etc.) Much like the tone controls on a stereo.

A band shelf filter does much the same thing but will boost or cut a range of frequencies within a set pass-band, so you could set your mid-frequency to 1kHz, set the width of the filter to 400Hz then boost or cut the frequencies within the range of 800Hz to 1200Hz, again with no unwanted resonances or colouration of the audio.

Synthedit Diagnostics: Impulse and Impulse response modules

I put these two in one topic/post as they would really only be used together.
The Impulse module generates a fixed duration impulse one sample long when the input (Trigger) voltage rises above zero volts.

Impulse generator module

Plugs.
Left Hand Side:
-> Trigger:- (Voltage) Creates the impulse voltage when the input rises above zero volts.

Right Hand Side:
<- Impulse Out:- (Voltage) Impulse output voltage.

Displays how the module being tested responds to very short audio pulses.

Impulse response module

Plugs:
Left Hand Side:
-> Impulse In:- (Voltage) Triggers the display “trace”. This must be connected to the impulse to work.
-> Signal In:- (Voltage) The signal to be displayed on screen.
-> Mode:- (List) Select from two modes: Impulse response and frequency response

These modules are useful for testing the response of filters to very short impulses when used with the impulse response module as shown below.

Using the Impulse module with a Moog filter and the response module.
This screenshot shows the impulse response of the Moog filter at maximum frequency, and minimum resonance:

Moog filter impulse response


Compare this screenshot showing the impulse response of the SV filter at maximum frequency, and minimum resonance:

SV Filter Impulse response

Its clear to see that this filter is “ringing” quite a bit, normal for a Moog or SV filter at maximum resonance, but if this was a shelf filter, or a filter for an equalizer this would represent a severe problem with the filter.
You can see from this how useful these two modules can be for pinning down audio problems with filters or delay line response to impulses. Indispensable for SEM programmers, and also for Plugin designers if a filter seems to be “misbehaving”.
This module will show up issues with ringing or smearing of very short pulses, and any issues with latency.

Limiting Oscillator waveform choices in SynthEdit.

I have seen this question asked a few times in various places online, and compared to the (outdated) solution in the old SynthEdit e-book this is quite an elegant solution.
Your first move is to add a List Entry 4 module, then in the properties, enter the list of waveforms you want to have in your list (lets face it, if you have a four VCO synth, you really don’t need the White Noise and Pink Noise option on each one- you may even opt to have a separate noise source).
You need to follow this format very carefully:
Sine=0,Saw=1,Ramp=2,Triangle=3,Pulse=4,White Noise=5,Pink Noise=6
Just choose the options you want from this list, and enter them in the Item List box. Only use spaces where I have shown them, and remember the correct format name of waveform before number.
You may think having option 0 is odd, but it’s an Enumerated List and in C++ (the language of Synthedit) these always start at 0.
The actual text names you use in the list don’t have to be the names that are used in the Modules list, you can use names that are meaningful to you.
Connecting the “Hint” plug on the List Entry 4 module to the “Name” plug on the Patch Memory List3 uses the name of the list that the module is connected to as a hint when you hover the mouse cursor oven the list box.
The List to Text module supplies the list of items that will appear in the dropdown list, this needs no properties to be set.

Setting up a limited choice list

The limited choice list in action in a VCO panel.

Using the limited choice list with a VCO

This can be applied to any module that has a List Selection plug such as an SV Filter, or a TD_Modules LFO. All you need to do is go through the list of options, always starting the list at 0 for the first item, then select the ones you want to keep/use.
Note: As usual with PatchMemory modules, don’t copy and paste the one from this module… it WILL retain the values it took from the List Entry 4 module.
In the structure below I have adapted the list for the SV Filter to take the Band Reject option out of the list:
Low Pass=0,High Pass=1,Bandpass=2

Using the limited choice list with a filter

Creating a Supersaw in SynthEdit Part 2

The purpose of this module (as stated in Part1) is to ensure that each oscillator starts randomly out of phase with the rest of the bank. It consists of a bank of seven ED Random Volts modules, with the trigger to generate the random voltages taken from the MIDI input Trigger plug.
Note: if you don’t have the ED modules they can be found at https://www.elenadesign.eu/repo/
You must ensure that the Minimum plug is set to -5, and the maximum to 5 on each module to get the correct operation.

Here we have a Fixed Values (Volts) module to provide our bank of offset voltages. Each one is fed into its own Level Adj module on Input 1 Plug, and the Offset Level input is fed to each amplifier except for the Centre (Oscillator 4), since this is a 0 volts offset it could be left out, but it’s there for the sake of making 100% sure that there’s no offset at all on this Oscillator by holding it at 0 Volts. By this means we can increase the spacing of the offsets, while keeping the frequency ratios constant (this does make sense – honest).
The offset level works best with the range of Minimum = 0V and Maximum = 3V (OK you can go beyond 3V offset gain, but to my ears it start to sound really out of tune.)
Once again all the fixed voltages for the offsets are shown in the Properties panel on the RHS of the image.

The final part of creating a super-saw oscillator
https://synthedit-help.co.uk/supersaw-part-3/projects/

Creating a Supersaw in SynthEdit Part 1.

The oscillator prefab is shown below. It consists of seven HD Oscillators (these are included in the community modules found at http://www.synthedit.com/modules/community_modules.zip)
In the lower half you can see some plugs with numbers against them. These refer to the “Offset” Voltages.
The HD Oscillators give a brighter sound than the original Oscillator modules, each one has its own offset voltage, these are our “Offset Frequencies” as SynthEdit voltages:
-0.11002313 V
-0.06288439 V
-0.01952356 V
0.0 V which is our centre frequency.
0.01991221 V
0.06216538 V
0.10745242 V
The ratio between these voltages is always constant, but they pass through an amplifier module which controls the gain equally on each offset, preserving the voltage ratios, but increasing the spacing between them to replicate the original “Offset” control on the Supersaw synthesizer. The Phase Mod plugs are fed by another module which generates a random voltage each time a MIDI trigger pulse is received, this recreates in part the sound of the original oscillator by ensuring that each module starts at a random point the the sawtooth cycle.

Oscillator Bank (Prefab).

The Oscillator module

Internal structure of the oscillator bank.
There are four Input IO Modules:
1) The main pitch input which connects to the Detuner and the MIDI input
2) The Offset, this carries the offset voltages for the oscillators
3) The Phase Input, which carries the random phase control signals for each oscillator.
4) The Level Controls for the Detune (Supersaw) Volume, and the Centre Volume.
There is only one IO Output module this carries the Centre Frequency audio output, and the Supersaw audio output

Detailed view of the Control Inputs for the Oscillators and connections.

Oscillator control connections

Detailed view of the Audio Outputs, and Level Control inputs.

Oscillator audio output details

The next part of creating a super-saw oscillator
https://synthedit-help.co.uk/creating-a-supersaw-part-2/supersaw/

Supersaw Oscillators in SynthEdit.

What is a super-saw oscillator?

First a little bit of history. The Roland JP-8000 synthesizer was released in the mid 1990’s as part of the first wave of virtual analogue modelling hardware synthesizers (or VA synths).
One of the types of oscillator was the so called “Supersaw Oscillator”.
This relied on one sawtooth oscillator which was fixed to the centre frequency of the note being played, say standard A or 440 Hz. There were six other oscillators which were all slightly de-tunable, however the frequency ratio between the oscillators was always a fixed proportion (except when used with no detuning or in the “unison” mode). These super-saw oscillators provided a “big” lush sound ideal for string sounds, big pads, and much loved by a lot of EDM artists.
There is no unfortunately no information easily available from Roland regarding the tuning ratios, however there have been attempts at “reverse engineering”, and there is a complex in-depth analysis on line at: Link to download Adam Szabo’s PDF analysis of how to emulate a super-saw oscillator

This is the SynthEdit “Supersaw” module we can create from what we know from this analysis:

It’s a complex beast so lets take this project stage by stage.
https://synthedit-help.co.uk/creating-a-supersaw-part-1/supersaw/

Creating a Supersaw in SynthEdit Part 3

So this is the complete Supersaw module. The buffer modules are just Level Adj modules with the Input 2 plug fixed at 10 Volts.

High pass filtering to improve.

The Anti-Alias HPF in the output is there to cut-off any frequencies below the note(s) played on the keyboard. This is included because by its very nature the Supersaw out plug is carrying a lot of harmonics, which carry the risk of creating some nasty rasping sounds due to some of to some of them clashing and causing aliasing products, this just keeps the sound nice and clean and bright with no raspy LF rumbles.

The completed super-saw module

How you construct your final Synth is down to your own preferences, such as adding an LFO, a second ADSR for the filter sweep, types of filter, whether you have another VCO to use as a Sub-Oscillator, or to give the option of a more standard VCO with the usual sine/saw/triangle/pulse choices…the list is endless. I deliberately haven’t shown any controls to keep the layout looking a bit easier to understand.
The things to remember are:
1) The Supersaw module needs the Trigger pulse to recreate the sound properly
2) The HPF tracking must be connected to the Pitch output of the MIDI-CV2.

Making the project your own.

SynthEdit Containers.

What is a SynthEdit container?

A container is a special type of module that can contain other SynthEdit modules (much like a folder contains files), they can be used to contain all the modules performing a specific function, such as a custom built control using sub controls. Using a Container keeps all the modules in use by this function grouped together making for neater, easier to understand plug in design structures.
To see all the modules and patch cords inside a container open its structure view by double clicking the top of the module.
Connections into and out of the container are handled by an IO Mod module. SynthEdit will automatically add an IO Mod module when a container is created, however you can add more if you wish so that you can keep inputs, outputs and controls separated.
Open the containers Panel View (right click- Panel Edit) to see the user controls inside the container, or you can display the controls on the module itself by enabling the Containers Controls on module in the properties panel
Using containers will not generally harm efficiency. Audio doesn’t actually travel through the IO Module, but goes directly to the correct destination.

Left Hand Side

-> Visible:- Determines if any controls inside the container will be visible in the main panel. This can be used to switch between control panels, and hide controls when they are either irrelevant, or not required (I.e. for advanced and basic control panels, or hiding a sequencer when not in use ).
Important note: if there are GUI modules in the container that are essential to the operation of your Synth/Effect this container must always be visible for the Synth/Effect to work correctly. Never, and I really do mean never put GUI and DSP modules in the same container if the Synth relies on the DSP modules!
-> Inputs:- (In this case MIDI In) – Variable – Depends on the internal structure of the module, and any external connections.

Right Hand Side:
<- Outputs:- (In this case Trigger, Gate etc.) Variable – Depends on the internal structure of the module, and any external connections.

Locking Containers (V1.4 only).
Containers are marked with an icon that also shows if the container’s structure and panel views are locked for editing. As well as the change in padlock icon to red, any “Spare” plugs will also be hidden. You can still add modules, change parameters, and use the controls in panel view, but you cannot delete anything, or change the panel layout once it’s locked.
Note: In V1.5 the lock icon never appears as only the panel view is lockable. In V1.5 the contents of a container are always editable, they are never locked.

1) Allows the grouping of a synthesizer’s functions into easy to manage groups of modules. For example, separating the Filter and LFO sections of a synthesizer.
2) Containers are used for controlling SynthEdit’s polyphonic behaviour. The default number of voices for a container is 6.
Note: A container is only made Polyphonic if it connected directly or indirectly to a MIDI To CV 2 module.
3) Keeping things neater and more manageable: If you containerize the various synthesizer modules in your project, you’ll be able to understand the signal flow, patching, and which module does what a lot easier than one big sprawling mess of modules and patch cables!

Containerizing existing modules.
You don’t need to add an IO Module to the structure SE does this for you as soon as you “containerize” your modules. (Unless of course you want to add more)

Creating an empty Container.
Just create the Container as you would any other module, when you open it you’ll find one IO module inside, you can add others for outputs, controls etc.

NOTE: If you intend to use several independent synths in a project, each one must be inside its own container.

NOTE: If you use modules that have a default value internally set to one of the plugs, such as the Level Adj module inside a container, and connect these to an IO Module the IO Module’s Plugs will then take on this default value, which in the case of control voltages can cause unwanted offsets. (See below)


The internal structure of the Container is above, and as you can see the Rectifier and Inverter inputs read 0 volts in the properties, whereas the Level Adj1/2 inputs read 8 volts. In some structures this could lead to you ending up with an unwanted 8 Volts offset on a control voltage.

SynthEdit Sub Controls are only active when the control panel window is open. When you close the control panel, the sub-controls become inactive.
Note: GUI pins will only communicate with modules visible in the same window.
This behaviour is to support the new VST3 standards.

Example: – You have a Knob image which is inside a Container, connected to Patch Memory which is outside the container. The knob cannot respond to mouse movements and is ‘frozen’. It’s usually only the structure view that experiences the issue, if the knob’s container has ‘Controls on Parent’ set it will work fine on the Panel view.
The reason is – With ‘Control on Parent’ set, the knob is displayed on it’s parent container’s window, the same container the Patch Memory is in.
This can be confusing – So whenever possible, confine your GUI connections within the same container.

TIP: Remember to name your containers so you know what they do. Renaming as things like VCO, VCF, Modulation routing etc. will help you when revisiting older projects to make changes, or fix bugs.

Sub Controls function only while their Container’s Panel is open. i.e. if you close you synthesiser’s control panel, those sub controls become inactive. Therefore you must never rely on GUI modules to process audio signals (there are other very good reasons too). The exception is hybrid modules such as Patch Memory which continue to provide patch-selection and automation functions via their DSP plugs.

Due to a design mistake, SynthEdit 1.0 had the Container’s ‘Control on Parent’ pin on the wrong side. This made it impossible to connect it to a Patch Memory module (needed for save/recall of paged panel settings). The ‘Bool Splitter’ was introduced to fix this problem, but the bool splitter causes problems of it’s own. The bool splitter ‘reflects’ any one input signal back out it’s other inputs, this is a bad design because it is not clear which module is in control of the others. The result is modules ‘fighting’ each other for control. Symptoms include ‘flaky’ inconsistent behaviour and patches not saved/recalled correctly.
3rd party module developers have sometimes copied SynthEdit’s example and released modules that rely on the use of splitters. If at all possible avoid using splitters.

Don’t cut and paste them from another part of the structure, as they will retain their old values, and it may be extremely difficult to remove these values, or you’ll get unpredictable behaviour. Patch Memory modules retain the last lot of values they received from the connections they had to the modules in question. Well after all they are called memory modules.

It may seem like a good idea to use a Patch Memory Text Out module, and a Text Entry4 module to allow you to change the name on a control held inside a container.
After all you can just edit the text in the containers properties, and it will them be retained for all time can’t you?
Trap: Well yes it will work, but you’ll find that the text will not display if the audio engine isn’t running, it will be OK in the VST, but not in Synthedit.
Also if the Prefab in the container was given text labels when it was created and you want to change them it may well give you a hard time updating them (see above). It’s a little unpredictable, and if you copy and paste the modules the text in the labels can get you into quite a tangle trying to sort it out.
You have been warned.
TRAP: Another method is to put a Text Entry4 module in the container with no connections, untick the “Writeable” property and when you want to label the control open the container and edit the text from there, it will still be retained until you change it.
Recommended method of adding control labels and Panel labels:
The best method is to use use either a stock or third party Text Entry module, and take the Text output to an IO module so you can edit the text label. This means no reliance on Patch Memory and the Audio Engine Running. Just make sure the Container properties are set to “Visible
TIP: Most third party Text Entry modules (Elena Novaretti’s for example) also have Text and Background ARGB colour plugs you can link to an IO module for editing too.

Synthedit Modules: The Comparator.

This is a useful but sometimes misunderstood module (unless you have a background in electronics. I’m (hopefully) going to try and make it simpler to understand what they do and how to use them.

What a comparator actually does.

The comparator has one simple function. The name sort of gives it away really.
It has two inputs; Input A and Input B. We are basically comparing A with B and changing the output when A is greater than B.
Input A is normally a variable voltage, and Input B is a fixed or reference voltage. Say our reference (B) is 5 Volts, when Input A is greater than our reference of 5 volts the comparator will change its output from Low to High, if the value falls below the reference of 5 volts the output will change from High to Low.
Often these high and low values will be something like Low = 0 Volts, High = 5 Volts in line with hardware logic voltages.
With the SynthEdit Comparator module we have two further input plugs Hi Out Val, and Lo Out Val. with these we can set the High Value, and Low value that will be output. So if you wanted you could specify that when the comparator was triggered (or High) the output would be 3 Volts, and when it was not triggered (or Low) the output would be 6 volts. This makes the comparator quite a versatile tool for controlling signal flow and other modules.

What a comparator does not do.

It does not act as an amplifier or attenuator.
It does not change the frequency of audio.

The comparator module

Here’s some layouts to demonstrate what I’m talking about.

Demonstration 1 of a comparator. What it does.

Below you can see a more visual demonstration with a Sinewave input.

Demonstration 2 of a comparator. Sine wave input and fixed levels

Changing the reference value only changes the point at which we switch from low to high. The only effect on the output is the point at which we switch. To change the output levels we change the Hi out and Lo out values.

Demonstration 3 of a comparator. Sine wave input and changed fixed levels

It’s quite easy using a comparator to create a variable width pulse from a waveform such as sine or triangle. Any time you want to compare two voltages to control another module, the comparator is your go-to module.

As the comparator itself doesn’t strictly pass audio through (unchanged anyway-it would be very distorted as it will just create a massively clipped version of the audio input) we can’t use it to pass audio through when the level exceeds the threshold voltage, but there’s an easy way to fix this, by creating a quite versatile gated amplifier by using a few extra modules.
The idea of this structure is to take an audio input, use the peak follower to calculate the maximum level of the audio input, and use this to compare to our threshold voltage, as soon as the level exceeds the threshold + 10 volts is sent to Input 2 of the Level Adj module (that’s our gate, 0 Volts on input 2 = no output, and 10 Volts on input 2 = Full volume.
The Attack and Decay sliders set how quickly the Peak Follower and thus the Comparator will respond to changes in level of the signal, and thus how quickly the gate will open after you exceed the threshold, and how quickly the gate will close after the input drops below the threshold. Attack/Decay times that are too fast will result in low frequencies becoming “glitchy” and sounding distorted.
Note-Audio Levels and Threshold voltage: Audio in Synthedit is at a default of -5 to +5 V volts peak to peak, so we only need a maximum of 5 Volts for the Maximum value on the slider (In reality you’ll probably want to set the threshold quite a bit lower than this).
Note-Threshold polarity: Although the audio input is -5 to +5V peak to peak, the output from our peak level detector is always positive, so the Threshold voltage should only be positive (-ve threshold voltage = permanent silence).
Of course you might want to reverse this and only pass signals below a threshold, to do this just reverse the values on the Hi/Lo Out Val plugs (Hi = 0V, Lo= 10V).

Gated Amplifier

Synthedit Sub Controls Part 4: The Joystick.

This is another good module to gain an understanding of how sub controls work, and how the various modules interact.

The Stock Joystick module

It’s all fairly standard stuff in this prefab, apart from introducing the Spring Module. The Joystick Image module reports both of the Joystick control image X and Y positions as floating point values in the normal default range of 0 to 1 (Position X and Position Y plugs).
A static Bitmap Image provides the background for the joystick control. Scaled from 0 to 1,
the X and Y Positions plugs are connected to the Animation Position input plugs of the respective PatchMemory Float 3 modules.
The PatchMemory Float3 Low Value and High Value are set to −5 and +5, respectively, which are set in the Properties panel.

The Joystick properties panel.

These modules scale the Animation Position to float values within this range, and the Floating Point values are then converted to Voltages by the Float to Volts modules, and the voltages are fed to the X and Y output plugs.
When the user releases the left mouse button after clicking or dragging the joystick knob, the Mouse Down value changes from True to False, this value is then input to both of the Spring Modules which sets the Animation Positions to the default value of 0.5, thereby centering the joystick knob as soon as the left mouse button is released.
The default return value is set in the Properties Panel (see below).
For the X axis: 0 = Left, 0.5 = Centre, 1.0 = Right.
For the X axis: 0 = Bottom, 0.5 = Centre, 1.0 = Top.

Reset value

Creating a custom slider control from a joystick control.

Its suggested in the SE help file that using the stock Joystick Image GUI control is a good place to start creating your own slider control.
You can, but I find a much better option is the third party ED Joystick Image control, as this allows you to “constrain” the movement of the control in the X or Y axis, whereas the native SE control doesn’t, meaning you can still move the control horizontally…not ideal. By constrain we mean that you can set limits on how far the joystick’s knob can be moved in the X or Y axis, so if we set a minimum of 0.5 and a maximum of 0.5 for the Constrain X Min, and Constrain X Max, and leave the Constrain Y values at their default of 0 for the Minimum, and 1.0 for the Maximum, then we will get a vertical slider control, with no possibility of horizontal movement.

The structure of our new slider control prefab.
There’s nothing too unusual in here, just a few things need explaining.
Module names:
Slider = ED Joystick Image.
Scale = Image2 (SE Sub-Controls)
Title = Text Entry4
Value = Text Entry4
I have just renamed these to make it easier to see what’s going on.
You won’t find the Slider knob image or the Scale image in SE, you would need to create these yourself. This can be done in Paintshop Pro, Photoshop or similar editing software by cropping the scale off the VSlider_Med.png image and saving the knob as Slider-Knob.png (for example)
and copying and pasting the scale into a new image V-Slider-Scale.png (for example). Don’t use the existing file names as this will mess up the SE controls! Don’t forget to save them as .png to preserve the transparency. You can now modify the new slider scale to the length you can require, and stretch your new slider control to fit.
Note: you cannot “stretch” or resize the images used by the SE Image2 Sub-control.
The Patch Memory modules on the Title and Decimal point are to enable you to set your values for the control without opening it, and editing, however the values you set will no show until you run the audio engine.
The CTRL Scaling Factor sets how finely you can control the slider when the CTRL key is held down. For most purposes the default of 0.1 is fine.

Our new slider control

The finished prefab control.
I have put in output plugs for GUI as well as DSP controls, including the animation position, whether you do so is entirely up to you.
As the DSP Float output is taken from the Patch Memory Float3 it’s already normalized, and suitable for DSP usage.

« Older posts Newer posts »