Stuck with a SynthEdit project?

Tag: Modulation

The SynthEdit VCA Module

A VCA, or Voltage-Controlled Amplifier module, lets you use a voltage to control the amount of an audio signal that is allowed to pass through from the input to the output of the module.
The higher the control voltage, the more signal is passed.  In SynthEdit when the control voltage reaches 10V the entire signal is let through, and when the control voltage is 0V (or below), no signal is passed and the output is silent.

VCA or Level Adj. Which should I use?

While you could use the Level Adj module in place of the VCA, there are differences between the two modules. The VCA has a slightly faster response time to its Volume plug than Input2 on the Level Adj module. Also without conversion you’ll only get a linear response to the envelope, as opposed to the choice of curves for the VCA. Strictly speaking the Level Adj module is an audio voltage multiplier. When controlling audio volume or applying an audio envelope for best results the VCA should always be used.
The Level Adj module multiplies one input by the other. It can be used for ring modulation, or for amplitude modulation, or for scaling a signal/CV by a fixed amount. The two inputs are multiplied together, then normalised. (e.g. 5V multiplied by 2 V = 1V, (5 * 2 ) / 10).

Uses for a VCA module.

Volume Control
You can use your VCA to turn just about anything into a volume/level control. 
Run your audio signal through it, then connect the CV input to a mod wheel, or any voltage source you want.
Envelope Shaping
One of the most common uses of a VCA is envelope shaping. Think about when you hit a key on a piano; the amplitude starts out pretty loud, then over time it fades away.  If you let go of the key then the volume drops off pretty quickly. You can use a VCA in conjunction with an envelope generator to achieve the same effect with notes on your synthesizer.


An envelope generator (EG) is a module or circuit that generates a voltage that is triggered by something and changes over time.  If you’re trying to mimic a piano, you can configure the EG so that it is triggered by a key being pressed on your keyboard, it sends out a strong voltage at first, then it fades down to 0 over time.
The voltage sent out by the EG matches the way you want your amplitude to change over time.  Connect the output of the EG into the CV input of your VCA and it will cause the amplitude of your note to fade out like a piano note.
The structure shown below illustrates a typical ADSR/VCA combination to trigger an audio envelope from a MIDI input

The VCA response curve modes:

The VCA Module allows you to choose from 3 different response curves via a drop down list, or a selection in the VCA module properties:
1) Linear
2) Exponential
3) Decibel
4) Decibel (Old)
The following chart shows the relationship between input and output voltages

Comparing VCA response curves

A more useful graph is the output volume in decibels for a given input voltage. This shows more accurately how loud the signal sounds in relation to the control, voltage (below).

VCA loudness curves

This graph shows that volume plug input of 10 Volts produces full volume (or 0 Decibels), and an input of 0 volts effectively gives silence (-70 decibels, very quiet).
A full-scale audio input signal is -10 to +10 Volts.
The normal output range of SynthEdit’s Oscillators is -5 to +5 Volts (about -6dB).
Note: SynthEdit’s own VU Meter module displays an averaged signal. However you can switch it to peak mode.
What do the audio envelopes look like? All these sounds have the same ADSR envelope settings, but use different VCA modes.

1) Linear Mode.
This is useful for controlling the level of LFO’s or other modulation sources.
However for audio use such as a VCA this doesn’t sound like a natural audio decay to the human ear, as it seems to become faster as the level decreases.

Linear fade out

2) Exponential Mode:
This emulates the discharge rate of a capacitor (which is how an analogue ADSR works) and so is the closest reproduction of the audio envelope produced by an analogue synthesizer.
Given a volume from 0 – 10, this formula gives the output level in volts.
volts = 10 – c1 * (1 – e^( 3 * (volume / 10 – 1)))
Where ‘c1’ is a constant that determines the amount of curve:
c1 = 10 / ( 1 – e ^-3 )
c1 =10.524

Exponential fade out

3) Decibel (dB) Mode:
The human ear hears this as a constant, natural fade.
The Decibel curve drops by 35 dB between 10 – 1 Volt.
dB = (35/9) * ( volume – 1.f )
Volts = 10 * 10.f ^ ( dB * 0.5 )
Since a perfect dB curve can never reach zero volume in reality, the Synthedit VCA is designed so that below 1 Volt the VCA dB curve fades out to silence. This mode gives the most natural sounding VCA envelopes of all.

Decibel fade out

Converting Volts to dB

To convert a level in volts to dB, use the following formula:
dB = 20 × log10 (volts ÷ 10 )
To convert a level in dB to Volts, use the following formula:
volts = 10 × 10^ (dB ÷ 20)

Tremolo

Mix a slow sine wave with 8V DC from a Fixed Value(Volts) module (to make sure the whole sine wave stays above 0V), then feed this into the Volume Plug of your VCA.  The audio signal will mostly come through to the output because of the DC bias, but you will hear the amplitude get louder and quieter in time with the sine wave you are using to modulate it. 
This effect is called tremolo (Amplitude Modulation). In the screenshot below the Yellow waveform is the modulation sinewave and the green is our audio. You can see how the peaks and troughs in the audio level follow the modulating sinewave.
The slider control changes the level of the modulating sine wave, this works best with the maximum level set as 8V.
Note: For this effect to work correctly the response curve must be set as Linear.

Amplitude Modulation

Tremolo (shown above) uses a slow (say 3Hz for example) sinewave to modulate the amplitude of your audio signal, so you can actually hear the resulting loud/quiet cycles.  If you increase the modulating frequency so that it gets up into the audio range, however, things start to get interesting. 
The modulation has become so fast that you are now changing the shape of the original audio signal’s waveform, and new frequencies appear.
In the example below I have modulated a 7kHz sine wave with a 4kHz sine wave. As you can see in the Frequency analyser, not only do we have the 7kHz audio signal, but also two new frequencies have appeared at 3kHz and 11kHz. This is where the 4kHz signal has interacted with the 7kHz. Why 3 and 11 kHz? It’s because the frequencies are added and subtracted in the modulation process:
7kHz – 4kHz = 3kHz and 7kHz + 4kHz = 11kHz. This is similar to ring modulation, but there’s one key difference, with Amplitude Modulation the carrier frequency (the 7kHz signal) is still present at the output, whereas with a true balanced ring modulator only the new 3kHz and 11kHz frequencies would be present the 7kHz carrier having been suppressed.

Complex Amplitude modulation.

However it’s not always this simple to predict the results, if we modulate the 7kHz sine wave with a 4kHz sawtooth then the mathematics becomes more complex- we get many more frequencies added, (due to the more complex harmonic structure of the sawtooth)and would need to use Fourier analysis to predict the outcome.

Using Ring Modulation in SynthEdit

What is a Ring Modulator?

A ring modulator multiplies two audio signals together to create two brand-new frequencies which are the sum and difference of the input frequencies.
What does all that mean, though? 

A ring modulator is basically a VCA with a special modulation input. On a normal VCA, you want complete silence when there is no CV, so it won’t let any carrier signal pass when the modulation signal is 0 (or below). Negative modulation signals are just ignored in a VCA. But in a ring modulator, on the other hand we want it to pass the carrier when the modulation signal goes negative as well (see below). For this reason they are also known as “Balanced Modulators”

This makes Ring Modulation different from the modulation we get from a VCA because it also has the added effect of cancelling the carrier frequency from the output signal, leaving only the sum and difference frequencies.
The frequencies from both the carrier (Input 1) and Modulator (Input 2) are not present at the output of the ring modulator, but two new signals (sidebands) will be generated at the difference and sum frequencies for the two inputs. The more complex the frequency spectrum of the modulator signal, the more sidebands that will be produced.
What does it sound like? Well just think of the classic Dalek “Exterminate” from Dr Who…that’s a normal voice passed though a ring modulator with a 30Hz sine wave, you can also create bell like sounds and some really otherworldly discordant sci-fi film type effects.

Comparison of Ring Modulation and Amplitude modulation at various frequencies.

1 kHz Modulator 3 kHz carrier.
Note how the 3 kHz signal has disappeared from the ring modulator’s output, and two new frequencies (AKA Sidebands) have appeared these are;
3 kHz – 1 kHz = 2 kHz, and 3 kHz + 1 kHz =4 kHz.
However the Amplitude modulated signal still contains the 3 kHz carrier, and more sidebands on to of the 2 kHz and 4 kHz.

2 kHz Modulator 3 kHz carrier.

3 kHz Modulator 3 kHz carrier.

4 kHz Modulator 3 kHz carrier
Note: This set of spectra looks odd, 3 kHz + 4 kHz = 7 kHz, is fine and it’s present which is OK. But where has the seemingly unrelated 1 kHz sideband come from? well 3 kHz – 4 kHz = -1 kHz, and a negative frequency just isn’t possible – so it gets “reflected” back from 0 up to 1 kHz. This always applies if the result of the
carrier- modulator equation results in a negative number.
(Well as far as we know negative frequencies don’t exist… and if they do I don’t want to think about the implications or the physics, it makes my head hurt!)

5 kHz Modulator 3 kHz carrier.

As you can see from the frequency spectrums above, the 3 kHz carrier is never present in the ring modulators output signal, but is always present in the amplitude modulators output.
Note: When the carrier and modulator are at the identical 3 kHz frequency there is only one 6kHz signal present in the spectrum, this is because 3 kHz + 3 kHz = 6kHz, however (you can probably guess this) 3 kHz – 3 kHz = 0 Hz. This is obviously DC so we can ignore this in fact we really don’t want it, so to prevent any DC in the output, not to mention any LF growls, rumbles or cross-mod it’s a good idea to put a high pass filter in the output at say 100 Hz cut-off frequency.

Using the Synthedit Ring Modulator.

There are already a choice of some Ring Modulator SEM’s. This is a complete module using the stock SynthEdit SEM.
We can make a quite good Ring Modulator unit with just a few other modules added on.
1) The standard container module with an Input IO Mod and an Output IO Mod.
2) Add an internal Modulation oscillator using an Oscillator with a Tuner Module. Connect the Pitch control Plug to a Spare plug on the Input IO Mod.
This is so we can control the modulation oscillator using either the keyboard, or some other control voltage source.
3) We switch the Modulation source from internal to external using a Switch Many ->1 module
4) In the properties panel rename the Two Input plugs, we have used “Internal” and “External” so we get a meaningful choice in the List Box.
5) Feed this to the Input 2 of the Ring Modulator, and connect Input 1 of the Ring Modulator to the Spare plug on the Input IO Module.
6) Connect a Level Adj module to the Output plug of the Ring Modulator using Input 1, and a Slider Control to the Input 2 of the Level Adj Module.
7) Select the Slider Control, and in the Properties panel give it the name “Output level”, and a Maximum value of 20. This is to compensate for the output of the Ring Modulator being a lower signal level (±5 volts, instead of the usual ± 10 volts).

Comparing the SE Ring mod and the TD Diode Ring Mod.

As you can see below there’s a noticeable difference in the frequency spectrum from the two Ring Modulators, the standard SE gives a cleaner harmonic spectrum of the sort you would get from a modern Balanced Modulator chip, and the TD_RingmodDiode module has a “dirtier” frequency spectrum like you would get from a diode modulator with it’s inherent distortion. For those with an electronics background the diode modulator will have a region of voltage where the diodes are not conducting (0 to +0.3 Volts for Germanium diodes, and 0 to +0.7 volts for Silicon diodes) so there will always be a small portion of the audio that is not passed through the modulator causing a small amount of a “crossover” type harmonic distortion.

FM synthesis in SynthEdit

FM synthesis has been around for a while now and although the basic idea of using an audio frequency sine wave to frequency modulate an audio frequency carrier sine wave is (on first glance) quite simple, the end result can be a harmonically complex audio tone.
One point to note is that it may be tempting to think “If two sine waves can sound that good, how good would two sawtooth signals sound if one modulated the other?” The answer to this is, very often not that good I’m afraid. Why is this?
When you’re using two sine waves the results are fairly simple carrier + modulator and carrier – modulator because with a pure sine wave we have just two frequencies to deal with. However if we put sawtooth into the picture then things quickly get very complex and messy. Just imagine the calculations to predict the results of these two signals at 1.5 kHz and 1.6 kHz…

The results of this would be as shown below, and even with 0.1% FM its getting very messy. Note that on the low frequency end there’s a lot of noise generated…I’ll explain this later.

If we go up to just 1% as shown below this is just a total inharmonic mess with lots of aliasing. It’s no good trying to filter out the inharmonic noise once it’s been generate either.
So sum up: When designing an FM Synthesizer we need the carrier and modulator(s) to be sine waves for the results to be a) musical and b) predictable>
What we really don’t want is for any of the oscillators in the signal chain to have fast rise and fall times.

This is why FM synthesis is traditionally done with sine waves. Even when we use multiple modulators on the carrier signal, the results will still be fairly predictable. So how does the carrier and modulation produce these sounds from a sine wave?
If you take the basic sine wave (which is a pure tone) as soon as you modulate the sine wave with other audio frequency sine waves, then you’re introducing lots of new frequencies known as “Sidebands” which put (very) simply are the products of all the combined frequencies involved.

Let’s define the carrier’s frequency as C, and the modulator’s as M. The
modulator introduces harmonics to the carrier frequency. The upper
sidebands always appear at the following frequencies:
C + M, C + 2M, C + 3M, C + 4M, and so on
And the lower sidebands will appear at these frequencies:
C − M, C − 2M, C − 3M, C − 4M, and so on
Say the carrier is a 1,000-Hz sine wave, and the modulator is a 200 Hz
sine wave. The carrier’s ascending sideband frequencies are 1,200 Hz,
1,400 Hz, 1,600 Hz, and so on. Its descending sidebands are 800 Hz,
600 Hz, 400 Hz, eventually reaching 0.

In the Illustrations below we have the spectrum from various setups:
1st is a single unmodulated sine wave
2nd is a sine wave with 10% PM by a sine wave of the same frequency
3rd is a sine wave with 90% PM by a sine wave of the same frequency

Sidebands and modulation levels.

In the illustration below we have
1st a sine wave 90% modulated by two sine waves of double the carrier frequency
2nd a sine wave 90% modulated by three sine waves of double the carrier frequency

In the two illustrations below it shows the effect of reducing the modulator frequency below the carrier frequency
1st shows the modulator one octave below the carrier frequency
2nd shows the modulator 2 octaves below the carrier frequency

Effect of changing the modulation frequency

So you can see how things start to get complex very quickly. Just have a look at the setup below (And this is without any complex routing of signals, or adding feedback)

In the spectrum below we can see the effect when we have a chain of modulators with different frequencies:
1st Mod +2 Octaves, 2nd Mod +1 Octave, 3rd Mod -1Octave all modulating the carrier oscillator.

Spectrum with complex modulation
Basic FM structure without feedback

This will hopefully illustrate what happens during FM synthesis, how complex the results can be, and why we really don’t need anything other than sine waves thrown into the equation (things really will start to go out of control). The image below is created by the 440Hz sawtooth carrier, being 90% phase modulated by a 440Hz sawtooth modulator, it really is a messy spectrum with lots of aliasing thrown in. Notice how it’s got really messy down around the 20Hz region! The abrupt changes in modulation with the sawtooth means that the sidebands generated have got extremely complex, and we are generating something very un-musical with lots of Inharmonics and aliasing.

Using a sawtooth as a carrier.

Sidebands that mathematically would be negative frequencies are obviously just not physically possible, so these are “reflected”, that is, they just become normal audio frequencies that appear above 0Hz, so if one of the sidebands should mathematically be -200Hz, it will just become a 200Hz sideband.
Therefore in our calculations we can treat them as normal positive numbers and represent them as such.
For example, if C = 1 and M = 2, the first sideband is at: |C − M| = |1 − 2| = |−1| = 1.

A carrier and a modulator signal sharing the same frequency will generate a harmonic at 0 Hz, which will appear as a constant DC offset that is visible on a frequency analyser.
A simple one-pole high-pass filter with a cut-off of about 20 Hz will remove this unwanted DC offset quite effectively. It’s important to do this as it will be added to any audio signals, which could easily cause distortion through clipping.
We often express carrier and modulator frequencies as C:M or M:C
ratio, because they define the sidebands. Lower sidebands do not occur
when the C:M ratio is 1:M (the carrier is the fundamental frequency),
provided that M ≥2 or M = 1. If M = 1, then the first lower sideband is
1 − 1 = 0 Hz, which is a DC offset. The second lower sideband is
|1 − 2 ∗ 1| = |−1| = 1, or a frequency identical to the carrier’s. If M is
greater than 2, then all lower sidebands lie above the carrier frequency,
which rules out lower sidebands. Table 3.3 lists some C : M ratios and
their first ten sideband frequencies.

If a sideband’s frequency lies above the Nyquist frequency, it is mirrored—
that is, aliased, right back into the 0-to-Nyquist range. This effect
increases with the FM depth setting. You can confine it somewhat by
limiting the FM depth amount. Waveforms other than a sine will normally cause substantial amounts of aliasing.
The sidebands’ amplitude hinges all on modulation depth. They are absent without any frequency modulation, leaving only the sine wave carrier. Ever more sidebands appear as FM depth increases. The FM depth amount determines the
number and amplitude of the audible sidebands and thus the modulated signal’s overall audio bandwidth.
Vary the FM amount over time using an envelope, and you can
shape the modulated sound’s spectral component. Put simply, the carrier
envelope will determine the sound’s amplitude over time, and the
modulator envelope determines the harmonic content (timbre) over
time, behaving much like a filter envelope.