Waveforms Revisited – AM and FM Modulation using Synthmaker
As I am doing a synth programming module at college, that covers the basics of sound wave modification, I thought a general re-cap on general wave theory would not hurt, as it applies to sound synthesis. A prior Post covers these and other aspects of waveforms here:
There are 2 main categories of wave synthesis in electronic music – Additive and Subtractive.
Additive synthesis is basically, the combination of two or more waveforms using various types of modulation, mainly Amplitude and Frequency modulation, though others such as Pulse Code and Ring Modulation exist. The theory is that all waveforms are composed of multiple sine waves added together in various ways to create the composite. This has been shown mathematically, using Fourier analysis, for example resolving a theoretically perfect square wave, or other complex waves, into their component sine wave harmonics series:
Subtractive synthesis involves the concept of taking already more complex waveforms and subtracting higher or lower order harmonics from them using frequency filtering – tone control in a nutshell.
If you accept that each sound that is identifiable by the human ear has a specific timbre, or tonal quality, such as that of a violin compared to a harp, it can be shown that these sounds contain a fundamental or dominant frequency, as well as higher and/or lower harmonic frequencies that have a specific mathematical relationship to the fundamental, mainly even and/or odd integer fractions of the fundamental, mixed together at particular volumes, to produce the overall tone that the brain recognises. The initial attack of a sound is also important in the psycho-acoustic effect it has on the brains recognition process.
In electronic synthesis, this means that different sounds can be created by using circuitry that modifies electronic signals, to generate new sounds that don’t exist in nature, or mimic reasonably closely, natural sounds. How well synthesisers do this without sampling is a matter of opinion. So what are the basic ways synthesisers create sound? They use oscillators.
As the fundamental building block of sound creation is the sine wave, and it is called that, as it has a specific mathematical relationship to the circle, nicely described for me by the Good Ol’ BBC Engineers Training manual on Harmonic Distortion of 1950:
That is why a revolving magnetic device like your car alternator or a water turbine produces electricity pulsing in the shape of a sine wave.
They can also be produced by resonant electrical circuits that contain capacitors and inductors, which are energy storage devices, that create resonant “tank” (from water tank wave experiments) circuits that periodically charge and discharge each other (magnetic field to electric field and back) in a way that produces sine waves when the current/voltages oscillate between each other:
Quartz crystal (piezo-electric) is used in many electrical circuits, which has a characteristic oscillation frequency when exposed to a voltage. It can be miniaturised, then housed as a component in electronic circuits, as a high frequency clock for example:
AM – Amplitude Modulation
Two or more oscillatory sine wave circuit’s outputs can now be added together to produce a third “Resultant” wave form from the original “carrier” and “modulator” that created it.
This concept can be shown using the Synthmaker circuit for the Test Tone I showed in the previous Post, and adding a second oscillator:
This shows two sine waves – identical in frequency AND phase – being added together at the Storage Scope input, producing a third identical wave that is the sum of the two identical left and right channel waves. This is Amplitude Modulation in its simplest form. This amplitude summing can be proved by placing a phase inverter on one channel, so Wave Candy now shows the waves peaks and troughs in opposition to each other, so cancelling out completely at the Scope input i.e. a flat line.
If I remove the phase inverter then change the frequency of one wave to half that of other, then the resultant becomes a composite of both still, and shows characteristics of both.
You can see the where extra amplitude comes where parts of both waves are in phase and adding, with the trough where both waves are at minimum at the start and end of their respective cycles. The dip in the middle is where the higher 1kHz tone is at the minimum of its half cycle, but the lower frequency is at its maximum of its cycle, so the two together add up to half the total amplitude.
The same basic addition and subtraction occurs for any mixed wave, like two triangle waves of different frequencies:
Or two squares:
Or noise and a square:
This is the basic principle used in AM radio transmission, where the high frequency radio carrier wave is amplitude modulated by the audio frequency. For our purposes, this is Additive Synthesis. The radio frequency is then filtered out by a tuned LC (inductor/capacitor) circuit inside the receiver, leaving only the audio component to be passed on to the speaker. For our purposes, this is Subtractive Synthesis.
Here it is with the “carrier” at about 5kHz being modulated by the audio “modulator” at 500Hz:
This Subtractive process can be shown also, by adding a State Variable Filter (lowpass) before the Scope, and filtering out the “radio” frequency in stages, by turning the Cutoff down, leaving just the lower “audio”:
Only the lower frequency “audio” is left now. Cool eh!? I started with a more complex waveform and ended up with a simpler one just by using a filter to remove higher order harmonics.
Rearranging this circuit so these signals come out of the speakers:
This is the sound of the 5kHz and 500Hz waves, you can hear the 5kHz removed in the last one:
And the 500 Hz after filtering:
FM – Frequency Modulation
Modifying the circuit again so that the lower frequency is set from say, 2-10 Hz, and the higher frequency to 4kHz range:
The lower frequency can be used to Frequency Modulate the upper frequency from its static value, say 2kHz, to the say 5Hz value, above and below the 2kHz. This is easily audible as a pulsing increase and decrease in the 2kHz tone:
You can’t tell from the picture, as the scope is moving too slowly over the frequency changes, like a Slinky spring, but you can hear it:
Altering the settings a bit shows the stretching and contracting wave in Wave Candy better:
The important thing to realise is that the amplitude of the signal is unchanged, just the frequency is modulating – higher at the ends than in the middle of the display. This wave sounds like this:
I could have just shown you the java applet I already found on WikiP, but I think its best to play with these things for yourself to understand them better.
These two methods of modulation – AM and FM – have been used in early guitar and keyboard amplifier designs, to produce the Vibrato (FM – pitch change) and Tremolo (AM – volume change) effects. Now you know how.
I’m pleased that the FM modulation worked in FLS, as I didn’t know how the second input on the Multi Oscillators would work until I connected to it. That was what I really wanted to demonstrate for this Post. I find the whole concept of modulation and resonance fascinating, and that it is responsible for the bulk of our radio and TV transmissions through history, even more so.
Now that a synth can generate sine waves, and combine them to create more complex waves, or subtract from them using filters, there is one more major way that they affect the waveform as a whole, which is by altering the way the wave starts, continues and ends – its ADSR envelope.
As I covered this in a previous Post
there is little point going over it again, as Synthmaker has a module for this that you can play with, as should any synth of any worth. You have to hear the effects of these parameter changes for them to mean anything for understanding really, where visual examples of modulation are very beneficial, as it is rarely clear audibly, what is happening with a waveform.
Attack time is the time taken for initial run-up of level from nil to peak, beginning when the key is first pressed.
Decay time is the time taken for the subsequent run down from the attack level to the designated sustain level.
Sustain level is the level during the main sequence of the sound’s duration, until the key is released.
Release time is the time taken for the level to decay from the sustain level to zero after the key is released.
Only on re-reading this I realised I did not make it clear how I got the lower frequency to modulate the higher one for the FM section.
I had to recreate it myself from scratch as I lost the original setup, but there is the second connection on the MultiOsc that says “Phase” when the unit is clicked. This is what causes the frequency of the higher frequency to be modulated by the lower. Make a link from the output of the lower frequency MultiOsc to this connection:
Experiment with different frequncies if you wish to see the “Slinky Spring” effect visually in Wavecandy, though hearing the effect is obvious, if you use a 1-10Hz low frequency to modulate most higher ones.