<body text="white"><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d4012198\x26blogName\x3dHernan\x27s+Blog+of+Hate!\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLACK\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://hatemachine.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://hatemachine.blogspot.com/\x26vt\x3d-906841019036784388', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

(:E cries at...

Hernan's Blog of Hate!

[ Wednesday, June 11, 2003 ]


Electronica #3: A world of knobs

Ok, so far I've given some intro/motivation about what's electronic music, the requirements for creating it, and then I ranted about some very popular effects which are a key in getting a competent (and actual) sound out of an instrument. This update is about Wave Synthesis.

The word "synthesis" means: "artificial formation of a composite body through its elements' combination" -The result of a combination of elements. In the case of Sound Waves, it's all about adding and subtracting waves, in order to change the characteristics of a sound.


Before starting to read, download THIS handy program, the TS404 software synthesizer, which you'll use to play while reading this document.

At the end of this guide you'll know what this means. :)


So imagine you could generate a pulse constantly, with a certain tempo: tan, tan, tan,.. well you get the idea. :) So there you have some waves, but what if you could add some other waves over this pulses to modify them? Believe it or not, this was the original way to generate sounds that could resemble those of nature, like pianos, guitars, drums, birds, etc. If you owned a Casio or Yamaha keyboard when you were a kid, it USED this way to generate sounds, as opposed to this times, when memories are much more evolved and, instead of keeping information about how to generate some specific sound through synthesis, it keeps the samples of actual instruments.

But well, the subtractive synthesis' procedure is the next:

The pulse generator is called an OSCILLATOR. The pulses generated go through a series of FILTERs, which cut some specific frequencies, and finally this modified sounds go through an AMPLIFIER, that modifies the loudness of the sound over a period of time to emulate a natural instrument. The most general graphic is the next:


So this is subtractive synthesis about. Cutting frequencies off a wave.


The oscillator generates pulses continuously from the moment you press a key on the keyboard and until you release the key. This "waveform" has a timbre characteristic (brightness) and a pitch. The timbre depends on the shape of the wave (sin, square, triangle, sawtooth, rectangle) and the pitch depends on how many times the wave repeats in a second, called "cycles per second", which is the same as "Hertz". The middle "A" note, A3, is 440 Hz. A4=880 Hz, and so on.

Timbre is richer when generated by a mixture of waves, that normally have as frequency a multiple of the "Fundamental Frequency" (F) (in the case of A3, F=440 Hz). When the A3 wave of a Violin is analysed, it involves waves with frequencies F, 2F, 3F, 4F, etc. This frequencies are called "Natural Harmonics".

Example: the drawing on the left shows the waveform of triangle, square, sawtooth and rectangle waves. The drawing on the right shows the harmonics spectrum, each dot in the X axis represents a natural harmonic (an F multiple).


"A filter is used to remove frequencies from the waveform so as to alter the timbre."

There are Highpass Filter (HP), Bandpass Filter (BP), Lowpass Filter(LP), and Notch.

Highpass: cuts off the low frequencies letting the high frequencies pass.
Lowpass: cuts off the high frequencies letting the low frequencies pass.
Bandpass: cuts off both high and low frequencies letting mid-range frequencies pass.
Notch: cuts off the mid-range frequencies letting both high and low frequencies pass.

Example: in this image, the X axis is frequency, and Y axis is amplitude. The upper drawings show LP, Resonance (later) and HP. The middle drawings show the harmonics spectrum of the original wave (dotted line on the upper drawings), and the bottom drawings show the harmonics spectrum after applying the respective filter.

This filters are controlled by 2 parameters:

Cut-off: controls how much of the frequencies in the specified range pass. If the filter is all "open", all frequencies pass, while if the filter is all "closed" you'll hardly hear anything.

Resonance: for HP and LP, it controls which frequencies in the specified range are emphasized (boosted). When resonance is set high, the frequencies near the cut-off range are so pronounced that the wave will start ringing, it will sound like feedback, only tuned. For BP and Notch, it controls how narrow is the range of frequencies being passed (same as cut-off!)

Example: in this image, the X axis is frequency, and Y axis is amplitude. The upper drawing shows the graph of a cut-off at some specific frequency, so the lower ones will pass unaffected. The other drawing shows different values of Resonance at the cut-off frequencies for the upper drawing.


The amplifiers use an ENVELOPE, to control the final loudness of the sound, and the way it decays and dies. This envelope can be seen as another waveform added to the wave generated by OSCILLATOR + FILTER.

This envelope is controled by 4 parameters:

Attack: The attack is the initial peak of the wave (when it reaches its higher amplitude). This parameter envelopes the attack waveform, so when set to 0 no attack is suppressed. When set to a higher value, the attack is less and less sharp, until its attack is eliminated, thus producing a "pad" sound.

Decay: Immediately after the attack, the wave begins decaying. This parameter controls how fast the wave decays to a certain level (sustain level), so when set to 0, the wave decays immediately. When set to a higher value, the decay time lasts more and more.

Sustain: After the wave's decay time has ended, and the keyboard key is still pressed, sustain determines the level of the original sound that keeps sounding until the key is released. So this parameter controls the sustain level.

Release: After the key is finally released, the envelope should drop from its actual level to 0. This parameter controls how fast the 0 level is reached, so when set to 0 the wave drops to 0 immediately. When set to a higher value, the wave dies slower and slower. It could actually be set NOT to die, which is forever sustained.


1. 0 attack (full attack), no decay, full sustain and 0 release. (gate effect)
2. 0 attack, large decay, some sustain level, and large release time (slowly dies). (Piano)
3. Mellowed attack, short decay time, a lot of sustain level and some release time. (Strings)
4. More mellowed attack, some decay time, low sustain level, and short release time. (Brass)

IV. MORE ABOUT ENVELOPES (LFO finally explained)

For added "expression" of the synthetic sound created, LFO's can be used. LFO stand for Low-Frequency Oscillator, so what's done is generating YET ANOTHER wave with this new OSCILLATOR, only it will produce only low frequencies with the only purpose to modulate the original waveform (the OSC->FILTER->AMP waveform). For example, this LFO could be set to modify slightly the original pitch over time, in a Vibrato manner. Or to vary the cut-off. Or to vary phasing of the wave (explained in session #2 of this useless guide).

LFO's parameters are RATE ("LFO's frequency. Turn clockwise for a faster modulation rate") and AMOUNT (to what degree the original waveform is affected).

There's Modulation envelope and Filter Envelope too! So you can add YET ANOTHER waveform to the LFO (modulator) waveform and to the Filter waveform! Ridiculously complex!


If you liked Subtractive Synthesis, there's a lot of programs that allow you to play with it, the best for me is Propellerhead Software's Reason. But there's Fruityloops, Rebirth, Reaktor, and much more simple, the VAZ+ which I like a lot too.

Reason's Subtractor device. There you can see 2 parallel oscillators, 2 serial filters, the 2 LFOs, Mod, Filter & Amp Envelopes, among others. This capture shows a not so basic configuration for a simulated bass guitar.

VI. NEXT: Wavetables and Digital Samplers.

Well, there's PC sound cards with 128 voices (instruments) made of synthesis parameters, like Sound Blaster, SB pro and SB 16. But most of nowadays sound cards (the good ones) are called "wavetable" synthesis cards. What they do is, instead of programming synthesis parameters for each of the 128 voices, they store wave files with samples of the real recorded sound for each one of them. But in the end, those files store WAVES too. So you can apply all of this lesson's Filters, LFOs and Envelopes to it. This is called "Wavetable Synthesis". Hate this later.

Hernán [7:36 PM] -

the hatemachine,
according to svigle