You are on page 1of 18

LAB FOUR USING AUDACITY

COMPLETING ASSIGNMENT TWO


Instructions for completing Assignment 2 Processing using
Audacity are given at the end of this Lab.

SIGNAL PROCESSING
IN AUDIO EDITORS
Most audio editors allow for digital signal processing as well as
editing of audio material. In Audacity, for example, there is a
dedicated menu entitled Effect for this task.
In all cases, processing is accomplished by selecting material
in an open audio file by highlighting it, and then choosing an
available process from the menus.
The process will only be applied to the selected material. If nothing is
selected, the process will be applied to the entire audio file.

Because of the nature of audio editors, the process is nondestructive until you save your work. In other words, if you
process a file, listen to it immediately and dislike the result, you can
undo the process by selecting Undo (Command Z or Control Z)
from the Edit menu.

PROCESSING IN AUDACITY
Once a soundfile is open, it can be processed. In order to
process a file, or a portion of a file, something needs to be selected.
Click and drag over a portion of the file to make the selection, or
press command-A (control-A) for select all to select the entire file.
Some processes require no user input beyond the selection of
the process itself. For example, reversal will reverse the order of all
the samples in the file; therefore, Audacity simply does this after
you select it from the Effect menu.

Lab Four using Audacity

Audacity follows the Macintosh standard, and displays ellipses


() in its menu items after processes that require further user
input.

The Effect menu in Audacity


Other processes, such as Echo, will present a dialog box in
which further input is required from the user.

66

Lab Four using Audacity

The Echo dialog box in Audacity


Because Audacity is an open source program, in which many
different programmers have contributed portions of the code,
different processes are by different authors. This can be seen in the
Echo process, above.
Processes can be previewed before permanently altering the
file. Click Preview to audition the processing. When you have
decided upon the settings, click OK to make the alteration to the
file.

TASK: REVERSAL
In Audacity, reversal is accomplished via the Effect menu,
Reverse.

67

Lab Four using Audacity

Reversing a soundfile in Audacity

TASK: PITCH SHIFT


In Audacity, the process of Pitch Shift is called Change Speed.
Select this menu item, and in the subsequent dialog box, enter -50,
and click OK to process the file.

The Change Speed dialog box in Audacity. Enter -50 as a


percent to change the playback speed to half.
68

Lab Four using Audacity

TIMBRAL PROCESSING VIA EXTERNAL PLUG-INS IN AUDACITY


Audacity allows the use of Audio Units (Mac) or DirectX (PC),
as well as VST plug-ins (if you downloaded the VST-Enabler from
the Audacity website). The Effect menu has a division in it, below
which are many additional processes. On the Mac, these begin with
the name Apple, and are the Audio Unit plug-ins that are built
into the Mac OS. On the PC, these are the VST plug-ins that are in
the Plug-Ins folder within the Audacity folder (within Program
Files).

The bottom of the Effect menu in Audacity (Mac)

The bottom of the Effect menu in Audacity (Windows)

69

Lab Four using Audacity

TASK: TIMBRAL PROCESSING


The Graphic Equalizer (Mac)

With a soundfile open, and something selected within it,


choose the Graphic Equalizer plug-in in Audacity (Effect >
Apple: AUGraphicEQ).

The Graphic Equalizer AU plug-in


If the virtual sliders are not centered, as they are above, click
on Flatten EQ.
Notice that the Graphic EQ allows us to change the frequency
content over the entire spectrum: the lowest slider will affect those
frequencies centered around 20 Hz, while the highest slider will
affect those frequencies around 20 kHz. Between those extremes,
each slider controls approximately one third of an octave, resulting
in three sliders every octave.
Notice the range of control offers by the process. To the right
of the sliders, this range is shown as +20 db (decibels) to -20 db.
Graphic EQ Windows
The Windows version of Audacity does not with a Graphic EQ, nor
does it come with any of the other filters/equalizers described
below.

70

Lab Four using Audacity

However, both versions come with an Equalization plug-in


that can function roughly like a graphic EQ or filter. Instead of
discrete sliders, this plug-in uses breakpoints filling in lines
between user defined points (set by clicking on the graph).
The cut/boost on this plug-in is a very respectable 24 dB. Of
less use are the predefined EQ settings for various older recording
media, including tapes and records.

The Equalizer plug-in in Audacity.


Low Shelf (Mac)

With a soundfile open, and something selected, choose


AULowShelfFilter from the Effect menu.

71

Lab Four using Audacity

The Low Shelf Audio Unit plug-in in Audacity


High Shelf (Mac)

With a soundfile open, and something selected, choose


AUHighShelfFilter from the Effect menu.

The Audio Unit High Shelf EQ in Audacity

Move the Gain slider to -22 dB, and sweep the cut-off
frequency while previewing the result.

Low and High Shelves (Windows)


Both Low and High Shelves can be achieved using the Equalization
plug-in. In the example below, a low shelf has been created by
boosting the low frequencies by 24 db, with a cutoff frequency of
approximately 120 Hz.

72

Lab Four using Audacity

Using the Equalization plug-in to create a Low Shelf


Low Pass (Mac)

With a soundfile open, and something selected, choose


AULowPass from the Effect menu.

The Low Pass Filter in Audacity


Low Pass (Windows)
A Low Pass (and High Pass) filter is harder to create using a
breakpoint equalizer, particularly one that involves resonance (as it
does above).
It is possible to use a High Shelf with cut that operates similar
to a Low Pass filter. However, the important difference between the
two is that a true Low Pass should remove the frequencies above the
cut-off frequency, not simply attenuate them.
73

Lab Four using Audacity

A High Shelf, with 24 dB cut, substituting for a Low Pass filter.


Band Pass (Mac)

With a soundfile open, and something selected, choose


AUBandPass from the Effect menu.

The Audio Unit Bandpass filter plug-in


Set the bandwidth to 12000 cents, preview the sound, and
move the cutoff frequency slider around.
Set the bandwidth to 100 cents, preview the sound, and
move the cutoff frequency slider around.
Band Pass (Windows)
It is possible to create a Bandpass filter using the Equalization
plug-in.

74

Lab Four using Audacity

Using the Equalization plug-in to create a Bandpass filter

VISUALIZING SOUND : SPECTROGRAPHS IN AUDACITY

With a soundfile open, and something selected, choose Plot


Spectrum from the Analyze menu.

The Analyze menu in Audacity


A spectrograph of the selected portion of the sound will be
displayed, with controls for changing how it is displayed.

The Frequency Analysis (spectrograph) window in Audacity


75

Lab Four using Audacity

Make sure Spectrum is selected (which displays


spectrograph an analysis of the sound at a particular instant).

The number beside Spectrum is the size, or how many


samples to analyze at once. Without getting into detail, this
translates into how accurate the analysis will be higher values
generally result in more accurate analysis. There is a trade-off,
however; if the sound is changing quickly, either in its frequency or
timbre, a smaller size will result in more accuracy for a specific
instant.
Different Windows are selectable - subtle differences can
result from choosing different types of windows for the analysis.
You can move the mouse over the graph to determine what
the frequency peaks are. In the example above, the mouse is over
the first peak, and the window displays this frequency as 186 Hz.

COMPLETING ASSIGNMENT TWO


ANALYZING THE FILES
Follow the instructions, above, to create a spectrograph of the files.
Use a size of at least 2048, as this will give a more detailed analysis.
Note that the spectrograph is done over the current audio
selection - if nothing is selected, it will attempt to analyze the entire
file.
Try selecting different portions of the soundfile, and different
location types (beginning of selection, end of selection, etc.).
Note that this spectrograph is a 2D spectrum, and does not
take into account changes over time. Instead, it is displaying either
a given instant in time, or an average.
Finding the dominant energy
Where is most of the spectral energy in the sound (at the point in
time that the analysis is taken)? In the two examples below, they
fall in different places, but are easily recognizable they are the
points that reach 0 db in terms of relative amplitude.

76

Lab Four using Audacity

The dominant energy of this particular sound, at this point in


time

The dominant energy of a different sound

GENERATING A SINE WAVE


You can generate a waveform in the same track that your current
audio file is in. To see extra space after the end of the file, zoom out
(cmd -3 or ctrl-3), then click and drag in the grey area.

Dragging in the empty space after a soundfile

77

Lab Four using Audacity

Note that the track itself does not highlight as you drag, but that
the timeline above the track becomes selected.
Select Tone from the Generate menu:

Getting ready to generate a waveform


In the subsequent window, enter the duration (2 seconds), the
frequency, and make sure the sine wave is selected. Its also a good
idea to enter an amplitude of less than 100% (1.0), since a test tone
at maximum volume is quite loud.

Setting frequency, duration, volume and waveform parameters

GENERATING A SONOGRAM
In Audacity, this is done via the tracks control area, which determines
how Audacity will display data within that track.
78

Lab Four using Audacity

Click on the tracks name bar (where the triangle is displayed).

The tracks namebar


This will bring up information about the track. Select
Spectrum.

Getting ready to generate a sonogram


All regions within the tracks are now displayed as sonograms.

Sonogram display in Audacity.

79

Lab Four using Audacity

Unlike the spectrograph, a sonogram takes time into account the analysis will display changes in frequency content over time.
Remember, frequency is displayed vertically (higher frequencies
near the top of the track), and amplitude is displayed through
colour (lighter colours indicate higher amplitudes).

PROCESSING THE FILES


Note: do not save after any process. Apply the process, answer
the questions, then undo the process (command-Z / control-Z, or
via the Edit menu).
Remember to select the region in a track before selecting a
process.
Reversing the file
This is done via the Effect menu. Select Reverse.
Lowering the frequency by one octave
This is done via the Effect menu. Select Change Speed..

Getting ready to lower the frequency


In the subsequent window, enter -.50.0 as Percent Change, or
drag the slider until it reaches -50.

80

Lab Four using Audacity

Playing back the file at speed (50% normal speed) will result
in lowering it by one octave (as well as slowing it down by
half)
Removing the dominant energy
This is done via the Effect menu. Select Equalization

Getting ready to filter the dominant energy


81

Lab Four using Audacity

In the subsequent window, lower the frequencies at the


dominant energy. Note that the scale is logarithmic: the lower half
of the filter covers 0 1000 Hz, while the upper half controls the
remaining 19 kHz!

Filtering out the frequency band of the dominant spectral


energy. This is a band-reject filter.
Click the Preview button to hear your result without changing
the file itself.
Removing everything except the dominant energy
Follow the same procedure as above, but keep only those
dominant frequencies.

Filtering out everything except for the frequency band of the


dominant spectral energy. This is a bandpass filter.
Click the Preview button to hear your result without changing
the file itself.

82

You might also like