Anda di halaman 1dari 16

Advance Audio

Project
Option B
Advanced Sound
Design Project

SAE Institute, London
Sergio Cabrera Hernndez
14114
AD1110
Word Count: 3500
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
2
Table of Contents

Abstract ......................................................................................................... 3
Introduction ................................................................................................... 4
The Compressor ........................................................................................... 5
Filters ............................................................................................................. 8
Demultiplexer ................................................................................................ 9
Arrays and Metering ...................................................................................... 10
Sample Reading ............................................................................................ 11
Signal Flow .................................................................................................... 12
Analysis ......................................................................................................... 12
Reflection ...................................................................................................... 14
Acknowledgements ....................................................................................... 15
Bibliography .................................................................................................. 16
































Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
3
Abstract

A great deal of time is spent adjusting the compressor to get the right
amount with more or less luck.
Most of the times we just need to compress a precise frequency range,
without the need to do it to the rest of the material.

A normal compressor can give very nice results used sparely but there will be
times when a normal compressor is not really up for the job, perhaps there is
a lack of bass and we want to increase it or bring up the level but using a
normal compressor could worsen the situation, squashing the rest of the
signal just to bring up that low end.

Here is when a multiband compressor comes in handy as you can
choose the frequency by which the compressor will apply without touching
the rest of the signal.

Does not mean that a Multiband Compressor as it is the solution for a bad
mix as is always recommended to redo the mix again but, it happens that not
always this can be the case and we need to deal with those less than perfect
mixes, so having one multiband compressor on your tool box is always a
nice add to your arsenal.






















Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
4
Introduction

When it comes to multiband compression, there was something that really
stood out for many others and that was a point of inspiration to get some of
the ideas to do the Multi-Press.

We are talking about the C4 from Waves.


Figure 1: The C4 Multiband Compressor by Waves
This plugin allows you to compress or expand certain bands specifically by
you.
Also it gives you individual parameters for each of the bands like Gain, Range
Attack and Release by which the compression would take place, and even
has another compressor as a master.
The full frequency range is divided into four bands, which are linked with a
crossover in between them that set the cut off frequency.
It also gives a Q option, which sets the steep of the cut off and is set as
follows.

Q = 0.1 => -6dB/Oct
Q = 0.6 => -12dB/Oct
Q = 0.7 => -18dB/Oct
Q = 0.75 => -24dB/Oct

Very important tool also for anyone on the Mastering field that needs to
polish those final mixes and give that extra punch required to the current
standards. The idea at first is simple, get the audio signal, split it in four, pass
it through four filters and compress the output of it, combine them back and
add another compressor as a final stage.
As easy as it looks the problem found when processing Digital Audio lies in
the delay required so the compressor can work as expected.
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
5
The Compressor

In order to explain the way a digital compressor works, we need to
understand first how an analogue compressor works.
A normal compressor can have a few settings. These can differ from brand to
brand but as a general guide they should have an input gain, threshold, ratio,
attack, release and output gain. There are also other types that do not have
all of this parameters such as the Urei 1176 but for the purpose of this
illustration we are going to stick to these parameters.


Figure 2: Main parameters on a compressor


The input gain (measure on dB), as the name suggests, control the input of
the signal that can be increase or decrease depending on what you are after.
The threshold (also measure on dB) conditions this input gain, if the signal
goes above the threshold then another parameter goes into play and that is
the ratio.
The ratio puts a condition on how much of the sound is allowed after the
threshold.
Typical settings for the ratio are 1.5:1, 2:1, 4:1 and 10:1. If we choose 2:1
then for every 2dB above the threshold just one would go through.

The attack and release is measured in milliseconds.
The attack will set the time the compressor will turn down the signal when it
goes above the threshold and the release the time to stop compressing once
the signal falls below the threshold.

Keeping the previous parameters in mind this will help to create the
patch within Pure Data. Firstly and most important we have to consider the
delay to process properly the audio signal.










Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
6
The audio signal arrives from the audio inlet and then splits in two:

1. The signal is sent to an [delwrite~] object, which will delay by an
amount set for the [env~] object.
2. The other signal goes to the [env~] object; this set by default a
1024 sample.



To keep things simple we use the default argument of the [env~] object and
divided by the sample rate of the signal to process.

1024/44100 = 0.0232199 sec => 23.22 ms

This is the number we use with the [delread~] object to delay the signal.
The following picture shows the compressor patch and all the components
that will be explained further.


Figure 3: Main Compressor Patch
The inlet sends one signal to the [env~] object to convert it to RMS and we
reduce it taking off [- 100], this feed an [moses] object, which main argument
is set by the threshold. The signal above the threshold will go through the
rightmost outlet and the one below through the leftmost outlet behaving in
quiet similar way to an analogue compressor.
We take advantage of the [moses] object and we use the left outlet for the
release send it to an [bondo] object, from there to a [pack] object with two
floats, a message with $ signs and finally to a [vline~] object.
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
7
The main use for the [bondo] object is to bang the number regardless of the
input as it is receiving the signal and the release time is desirable to adjust
constantly the release and not wait for the signal to arrive.

The right outlet of Moses, after taking off 100, feeds the left input of
a mathematical expression.
The compression can be defined as follows:

Output = (Input-Threshold/ratio)+Threshold (Gibson, 2007)

We can use this to set an amount of values to use within Pure Data



Figure 4: Compression Main Formula

Being:

$F1 = Input
$F2 = Ratio
$F3 = Threshold

The left inlet is the signal, the middle the ratio and the right one is the
threshold.
The output is then converted back, but before we will use that number to
measure the gain reduction and send it by an [s] object.
First converted and then transferred from dB to RMS we will use it on an
[vline~] object and setting the time with the attack knob.

The signal previously stored onto memory is now used and recalled with the
[delread~] object that uses the 23.22 ms, and join together with an [*~] object
controlled by the [vline~]. A final gain stage is applied to boost for the loss of
the compression adding a simple [line] object with a message with a $ sign
and 40 ms to avoid clips.
This is the main compressor and four more are used for each of the bands.
A final gain stage is also added to control the main output, which uses an
[vline~] object set a 35 ms to avoid noises when raises.










Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
8
Filters

The following image will show an idea of the signal flow.


Figure 5:Main Section with the filters, compressors, crossover, demultiplexer and the hradio acting as soloes switches.

From the inlet the signal is split in four and sent to the filters.
After considering different types of filters the butterworth was chosen to do
the job, as more [lp~] was required to get a steeper slope.

These types of filters will give you the option to choose the slope
depending on the number [lp4_butt~], you get the 2, 3, 4 after the name to
get a slope of 2
nd
, 3
rd
and 4
th
order respectively thus avoiding to cascade
many others in series to create the same slope, as is the case with the [lp~]
that has a slope of only 3dB where four are needed to get the same slope.
The butterworth filter has 3 inlets, the left one for the input signal, the middle
to control the cut off frequency and the right one to control the interpolation
time in ms, which is the time it takes the filter to get to the new cut off when
you set it thus running smoother.(Farnell, 2008)
For the low pass and high pass an [lp4_butt~] and [hp4_butt~] objects were
used to recreate the two remaining band pass, two filters in series were
used, a [hp4_butt~] follow by [lp4_butt~].
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
9
This situation was creating so much increase of volume that reduction was
applied in order to keep it within range.
Compressors were placed after the filter so every band has it own
compression.
The output of the compressors feed a demultiplexer so every band can be
isolated for individual listening of this process.
The four compressor outputs are fed onto a last stage compressor bypassing
the demultiplexer with an Hradio, which also controls the soloes for the
bands.
There are also three crossovers to control link between the filters so the cut
off can be controlled. The way the band pass are distributed, first the high
pass and then the low, it needs to be shifted the cut off by an octave or [+
100] from the high pass to avoid a boost on the cut off frequency with the
previous filter.
These three cut-off are set as follows:

Crossover 1 = 40 250
Crossover 2 = 350 6000
Crossover 3 = 6100 16000

Demultiplexer

For the purpose of isolation, a demultiplexer was chosen so individual bands
can listen while processing.
The inputs where just named for reference only, and four where needed to
receive output of the compressors.
A fifth inlet is needed connected to a select object and from this, messages
boxes with a series of one or zero numbers to turn it on and off the desired
band.
All this messages are received to an unpack object with four floats and the
output to a [sig~] to convert it back to audio which feeds into low pass filter
to avoid clicks. (Farnell, 2008)


Figure 6: Demultiplexer.
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
10
Arrays and Metering

It is fundamental to have a visual representation on the wave to treat.
For that reason a VU meter together with an array was used to keep control
on the input of the signal.
It is also desirable to see how the signal is post processed hence the other
VU meter and array was implemented. (Figure 7)

Figure 7: Arrays and VU Meters for the input and Output
For a better reading of the arrays a couple of messages were sent internally
to Pure Data to make the X and Y ticks including the clip object with an
argument of -1 and 1.
A metro, with an argument of 100, was also used to keep a fast reading of
the table.
Finally a load bang was also used link to the array messages and the toggle
that start the metro to load all when the patch is open.


Figure 8: Sending the internal message to PD together with the signal. Also an [clip~] object was used so the signal does not clip.





Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
11
Sample Reading

A simple open panel was used to load the samples onto the Multi-Pressor.
This follows a message to read the sample, resized and with sound filer we
get a number and send it with an [s] object that later will be used to read
from the table.
After we used an [expr] object that included the sample rate of the file, in this
case 44100, and we divided by the output of sound filer.
The result is sent to phasor that output a ramp based on the expression
number and is modulated with the sample size to be able to read the table
entirely. (Hernndez, 2009)


Figure 9: Sample Reader

A horizontal slider is used only to represent where the sample is playing in
time, so an [snapshot~] object is used, taking the input from the phasors
output and divided by the sample size number, this number is sent with the
[s] object to the slider.


Figure 10: Array with the sample loaded and HSlider representing the playback in time

The sampler reader was created under a sub patch for neat purposes.
A simple [s~] send the signal, which later will be used throughout the
compressor. It is better to distribute the signal this way to prevent clutter with
the patches.

Figure 11: Pd Import File Sub Patch, DSP Toggle and Open Button
To turn on and off the DSP an [dsp01] object was created to keep it simple,
and the nice button from the open was achieved by using the [button] object
that is basically a bang with a message.
By default shows ok but any argument can be used and will appear as a
nice Apple type button.
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
12
Signal Flow

The sample is loaded on a table using the [tableread4~] object and the signal
is sent over different parts of the compressor via the [s~] object.
First the VU meter and the array receive the pre processed signal to measure
it at the same time that the signal is received, split in four and sent through
the filters and then the compressors to finally feed a last compressor.

An [s~] object was used from the main output to send it to a VU meter
and an array to measure the signal post processed.

Analysis

At first, the compressor was thought to be more straightforward to
implement with different trials trying to emulate what a compressor does with
no good results.


Figure 12: One the different trials for the compressor
Then a source was found with a limiter expression. A few adjustments were
made to make it work properly as a compressor as a limiter works a bit
different than a compressor.


Figure 13: Limiter Patch
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
13
The adjustments made were to add an [- 100] after the [env~] so the Moses
could work correctly with the threshold as this is measured in negative
values.
After the Moses, only the right outlet is added to the 100 subtracted from the
previous step and gets into the expression object.
As we add 100 to the signal we add another 100 to the threshold entering the
right input to work with positive values.
The output of the expression, shown on a numbered box, is considered the
reduction applied to the signal so this value is used to represent the gain
reduction, sending it with the [s] object, which will later be used with a
vertical slider.
All the compressors have specifically sent and received names to avoid
clashing in between them.
The same output is then converted back to a positive number that can be
translated as decibels, and these decibels are converted to RMS values so
can be interpreted as the value that goes above the threshold.
If we think in the way the compressor behaves we can use this last value on
an [vline~] object.
The [vline~] will take this number as $1, where to go, so we need to give the
time to get there that will be the attack time, which is received from the main
control panel via a send object.

























Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
14
Reflection

The overall behaviour for the compressor is good except for a few things I
could implement in a different way.
I was struggling at first to get my head around the expression but well worth
to know it.
The first problem I encountered when putting the compressor in parallel was
the delays, as it has to have specific names, but I learnt from that and I will
take it into consideration for future patches.
Another problem was when I used the filters, first I used the [lp~], [bp~] and
[hp~], but to get the slope I wanted it was needed to add one more for every
3dB, so I was researching and I found the Butterworth type together with
other like Bessel and Chebyshev characteristics.

But after I found those filters I realized that a problem may arise with
the use of them and that was the phasing problem.
When the bands are isolated the problem cannot be perceived it is only when
they are mix together when the problem occurs. Lacking of time was another
factor for these pitfalls and I plan to remedy this for future updates of the
patch, once I research this further.
For the main controls I am quiet happy with the result as using the send and
receive objects it helps very much to keep the patch neat, and that is one
thing that I am always keen on. Using a vertical slider to show the gain
reduction is also a good thing and the way I choose to do it I believe is a
good start, using the output of the expression from the compressor and the
release from the release knob, the slider has a range of -60 to 0 so covering
the threshold range, and receiving also a metro which its main argument is
the release time in a way to emulate the time it takes the signal to go back to
normal.

One thing that I also considered and I did not implement was a Bypass
switch for the compression, as if we are isolating a band we also want to
know how it sounds with and without compression and this is a crucial factor
for this patch to be usable.
An export file feature will add a nice touch to the patch but again was not
implemented; I was so keen on making the compressor work properly that
I overlooked this very important feature.
A couple of things that Pure Data makes clear to me is that before starting to
do some patching, it is nice to study the characteristics of whatever it is that
you want to emulate/recreate on a piece of paper, and try to come along on
how to translate it to the digital world.
It has also shown me that there is no need to spend so much money on an
expensive piece of software when you have the ability to do it on an open
source program like Pure Data. With this in mind I would love to carry on
towards doing more research regarding DSP programming, learning other
types of languages within the field as C or C++.
Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
15
One feature that will be nice to have on Pure Data is the ability to export your
patches as plugins without the need of any external source, and thus be able
to test them in real time with your favourite DAW and see how it sounds, I
hope they could implemented on future updates.

After all, willingness has grown in me to carry on trying with other software
and compare my abilities to program on those. The first that comes to mind
is the MAX/MSP, which is like the big brother of Pure Data, and many of the
functionalities are very similar, with it I am able to create the patches and test
them straight away without the need for any external source.

I am feeling quiet happy with the overall finish patch, if maybe not very useful
still as a multiband compressor I will definitely use it on my productions as an
effect unit, as soon as I find a way to convert it to plugin.
Keeping this as an effect and improving the next patch is a goal that I have
set to do, also try another dynamic processing plugins like equalizers.




Acknowledgements

I would love to thank Andy Farnell very much for the knowledge he has
shared with us during lectures during the entire module. The encouragement
that he put into us is invaluable to me and you can also see the passion in
every single one of his lectures, a sign that he knows what he is doing.

I wish there were more lectures to attend as I desire to develop my
knowledge further and I feel that he is the right person, always patient and
open to new ideas that I really appreciate as an individual.
















Sergio Cabrera Hernndez 14114 AD1110 Advance Audio Project Option B: A Multiband Compressor
16
Bibliography

Web:

1. Audio Issues (2007), Who Else Wants To Know What All The Buttons
On The Audio Compressor Does? [online], (p.1), Available from:
http://www.audio-production-tips.com/audio-compressor.html#
[Accessed: 31.8.2011]
2. Gibson Bill (2007), Who Else Wants To Know What All The Buttons On
The Audio Compressor Does? [online], Available from:
http://www.audio-production-tips.com/audio-compressor.html#
[Accessed: 8.9.2011]
3. Geoff Martin 2006, Parallel vs. Series Filters [online], Available from:
http://www.tonmeister.ca/main/textbook/node390.html [Accessed:
5.9.2011]
4. Pure Data Forum 2010, lp2~Interpolation Time [online], Available
from: http://puredata.hurleur.com/sujet-4949-lp2-interpolation-time
[Accessed: 5.9.2011]
5. Andy Farnell 2008, Designing Sound [online], Available from:
http://aspress.co.uk/ds/pdf/pd_intro.pdf [Accessed: 5.9.2011]
6. Ray A. Rayburn 2003, EQ, Phase & Time [online], Available from:
http://www.soundfirst.com/EQ_Phase.html [Accessed: 5.9.2011]
7. Johannes Kreidler 2009, Programming Electronic Music in Pd [online],
Available from: http://www.pd-tutorial.com/english/index.html
[Accessed: 5.9.2011]
8. Floss Manuals 2010, Pure Data Manual [online], Available from:
http://en.flossmanuals.net/pure-data/ch082_audio-filters/ [Accessed:
5.9.2011]

Videos:

9. Dr. Rafael Hernndez 2009, PURE DATA: 33 episodes [online],
Available from:
http://www.youtube.com/user/cheetomoskeeto#p/search/0/rtgGol-
I4gA [Accessed: 5.9.2011]

Anda mungkin juga menyukai