You are on page 1of 10

Synthesizer Project

Created by Dhruva Karkada

User Manual v1.2

Contents
Part One Components of Sound
1. Waves and their Complexities
2. The Fourier series
3. Changing sound over time
Part Two Using the Synthesizer
1.
2.
3.
4.
5.

Playing notes
Oscillators
Filters
Envelopes
Routing

Part One Components of Sound


This project attempts to provide a basic yet highly modular sound
synthesizer. This type of project is intrinsically technical, and therefore it is difficult
to explain how it works without assuming a basic understanding of signal
processing. It is highly recommended that you read Part One of the manual before
reading Part Two, unless you prefer to play around with the program and see what
happens without understanding how it works.
Sound synthesis is a complex process that involves concepts from a discipline
known as digital signal processing. Unfortunately, this field is very complex in
theory, and even more difficult to utilize in practice. As a result, the synthesizer is
comparatively weak to professional-grade synthesizers, which are developed and
designed by teams of specialists.
1.1 Waves and their Complexities
A sound synthesizer works by acknowledging that sound can be represented
by an analog signal whose amplitude represents the degree of compression within a
sound wave. As you may recall from physics class, sound waves are a series of
compressions and rarefactions in the air, and by mapping these to a transverse
wave, we can visualize and store audio data.

The picture above demonstrates a pure sine wave, but in real life, sound is
almost never consisting of a single sine wave. Instead, the representative waveform
would be much more complex. This complexity is the reason why there are so many
unique sounds that we hear in everyday life.

Sound synthesizers are able to take a certain set of parameters and create a
complex waveform by synthesizing a signal. This signal is then sent to your
speakers or headphones, where you can hear the sound.
1.2 The Fourier series
Suppose that a flute and an oboe played the exact same note at the exact
same volume. How are you able to tell them apart? And how can you tell both of
those apart from, say, your microwave oven, which also beeps at the same pitch?
The property of sound that makes different things sound different,
regardless of pitch or volume, is called timbre. When we look at different sound
sources and their respective waveforms, we can see that loudness is related to
amplitude and pitch is related to frequency. Therefore, timbre is related to the shape
of the waveform itself. The picture below shows how different sound sources emit
different waveforms.

In the 1800s, a man named Joseph Fourier determined that any complex
waveform (like shown in the picture above) can be decomposed into a sum of sine
waves. In other words, you can end up with any complex waveform by adding
together a unique set of sine waves, each with distinctive frequency and amplitude.
This set of sine waves is now referred to as a Fourier series.

The frequencies of the sine waves are all multiples of the base frequency, or
the fundamental frequency. This fundamental frequency is what gives the pitch that
we can hear; all the other frequencies on top of that, called harmonics, give the
sound its timbre. The picture below shows how the first four harmonics (including
the fundamental frequency) for a square wave add up and get a closer and closer
approximation to the square wave. Note that the Fourier series for a square wave is
an infinite series, so realistically, we can only approximate a square wave.

The red wave is the sum of the


first few harmonics. In the top
panel, it only has the
fundamental frequency. Each
successive panel adds the
next harmonic. The blue
square wave is the final
product of the Fourier series.

This has major implications for sound synthesis. Instead of trying to develop
independent functions for complex waveforms, we can instead just add the
respective harmonics together. This technique, employed in this synthesizer, is
known as additive synthesis.

1.3 Changing sound over time


Despite all we have learned, a static periodic waveform can only produce a
monotone. We can, of course, now change the timbre of the tone, but if we dont
modify it more, it will still end up sounding like some sort of beep. In this sense, the
picture above of the various sound sources and their waveforms is misleading,
because it implies that each of them produce a static periodic waveform. In truth,
these waveforms are further modified very gradually over time to truly give the
instrument its acoustic character.

A violin, for example, can gradually crescendo; or in contrast, a quick motion


can make a brief staccato sound that starts loud and quickly becomes quiet. A
vibrato can make the pitch quiver, rather than stay on the same note. The above
examples deal with changing volume and pitch over time. A more complex process
is changing the timbre over time. Although we dont realize it, almost all
instruments change their timbre over time, very slightly. The change in timbre is
slight, and relatively insignificant; thats why a violin will still sound like a violin.
However, these changes are important because they are what make them sound
pleasant and interesting.
In a synthesizer, the tool that allows you to change the sound over time is
called an ADSR Envelope, where ADSR stands for Attack, Decay, Sustain, and
Release. Well discuss what exactly these words mean later.
An envelope is essentially a graph which maps out the level of a certain
parameter over time. In other words, its a function that can change some given
property of the sound. Envelopes are represented by a graph in which the x-axis is
time and the y-axis is the level of the controlled parameter. If the envelope pictured
below controlled volume, for example, then the volume would change as follows: it
would start at 0, quickly ascend to full volume, stabilize at around 80% volume, and
then gradually drop back to 0.

Conventionally, synthesizer envelopes are divided into four sections Attack,


Decay, Sustain, and Release. In the envelope pictured above, the attack would be
the rapid rise in volume to full loudness. The decay would be the falling down to
80%. The sustain is the stabilization of the volume at 80%. The large dot is the
sustain point; the volume will stay at that level until the note is released. The last
part is the release, which in this case is the gradual fading away of the volume to
zero.

Using envelopes to change volume is fairly easy to grasp. Changing timbre,


however, requires an understanding of one more tool filters.
Filters, as the name may suggest, filter the harmonic spectrum of a sound. In
other words, the filter can attenuate (or even mute) certain harmonics while
maintaining others. By changing the amplitudes of the harmonic, you are changing
the resulting waveform (think back to the Fourier series), and therefore are
changing the timbre.
There are many types of filters, and real instruments are naturally filtered by
a set of very complex filtering systems. In fact, the human voice involves the most
complex filtering system; it is so intensive that we dont consider the voice to be an
instrument, even though it is acoustically comparable. Unfortunately, this
synthesizer is only equipped with a low pass filter; this is probably its biggest
limitation.
A low pass filter attenuates higher harmonics while maintaining lower
harmonics. The point at which the filter begins to attenuate harmonics is called the
cutoff point. The amount that the filter attenuates each successive harmonic is
called the slope. In the filter pictured below, the cutoff point is at around 250 Hz.
Harmonics with frequencies below this point are preserved. The slope is fairly
moderate; harmonics above 250 Hz are gradually attenuated until around 1000 Hz.
Harmonics above 1000 Hz are silenced.

This synthesizer provides an envelope for the cutoff point. So, you can
change which harmonics are untouched and which are filtered out over time. With
more complex filters, this would be a very powerful tool. Unfortunately, low pass

filters are the most basic type of filters and are not useful for much. Nonetheless,
filters and envelopes provide a way to change the timbre of the sound over time.

Part Two Using the synthesizer


Since the major concepts have already been explained, this part should be
really short. The synthesizer is composed of oscillators, filters, and envelopes.
Oscillators control the initial waveform, while filters and envelopes help change that
sound over time.
2.1

Playing notes

To play notes, use the keyboard. The asdfg row of keys is the white keys,
starting at B3. The qwerty row of keys is the black keys, starting at A#3. Pardon
the lag.
2.2

Oscillators

The display shows the current shape of the waveform. There are three quickselect options for the three most common waveforms to use. The columns at the
bottom help control the individual volume of each harmonic. The first eight bars
represent the first eight harmonics, including the fundamental frequency. The top
row represents the next 46 harmonics, and the bottom row the last 46. To change
the amplitude of a harmonic, click inside the respective bar and drag up and down.
The volume knob controls the total volume output of the oscillator. The pan
knob is dysfunctional. The detune knob changes the pitch of the note very slightly.
The tone knob determines the number of harmonics to calculate. The default is set
to 44. You can use the tone knob to limit the number of harmonics calculated for a
waveform preset.
2.3

Filters

As explained previously, filters filter out some of the harmonics. The


properties of the filter are set by the cutoff and slope knobs.
A filter can operate on multiple oscillators. Conversely, an oscillator can split
its signal between multiple filters. These properties are determined in the Routing
panel (see section 2.5).

2.4

Envelopes

The envelope panel generates envelopes to control certain parameters. In


this synthesizer, envelopes can control volume and cutoff. To select which property
to generate an envelope for, click on the knob you want to control.
To add a point in the envelope, click somewhere in the display. You can drag
envelope points to the location you desire. Right click and select "delete" if you
want to delete a point.
2.5

Routing

The routing panel provides an overview of the hierarchy youve set up in your
synth. Oscillators are represented by the icons with a sine wave in it, while filters
are represented by the icons with a filter graph. Audio information flows from
oscillators, through any filters chosen, and to the output. The output node
represents the final destination of audio for your synthesizer, so you cannot delete
it. You can delete other nodes by right clicking and choosing delete. To add
Oscillator nodes and Filter nodes, click the respective Add icon in the top right
corner, and drag it out.
To route nodes, click the middle of the right side of a node and drag into the
middle of the left side of another node. You should see a line being drawn as you
drag. The program prevents you from making illegal routes. You can only route from
Oscillator to Filter, Oscillator to Output, Filter to Filter, or Filter to Output. You cannot
route from the output.
To deroute, right click the node whose sources you would like to deroute, and
select deroute. This will deroute ALL sources.

You might also like