Sie sind auf Seite 1von 16

Audio processing using filters 2012

CHAPTER 1

INTRODUCTION
1.1 Description of Audio Processing:

Audio processing is the intentional alteration of auditory signals. The major application
area of the audio processing is in the field of music. One of the practical examples that
demonstrate audio processing is audio mastering processor for audio compression as shown
in fig1. Here the source material, ideally at the original resolution, is processed
using equalization, compression, limiting, noise reduction and other processes. More tasks,
such as editing, pre-gapping, levelling, fading in and out, noise reduction and other signal
restoration and enhancement processes can be applied as part of the mastering stage. This
step prepares the music for either digital or analog, e.g. vinyl, replication. The source material
is put in the proper order, commonly referred to as assembly (or 'track') sequencing.

If the material is destined for vinyl release, additional processing, such as dynamic range
reduction, frequency dependent stereo–to–mono fold-down and equalization, may be applied
to compensate for the limitations of that medium. Finally, for compact disc release, Start of
Track, End of Track, and Indexes are defined for disc navigation. Subsequently, it is rendered
either to a physical medium, such as a CD-R or DVD-R, or to a DDP file set, the standard
method of secure delivery for CD and DVD replication masters. The specific medium varies,
depending on the intended release format of the final product. For digital audio releases, there
is more than one possible master medium, chosen based on replication factory requirements
or record label security concerns. Regardless of what delivery method is chosen, the
replicator will transfer the audio to a glass master that will generate metal stampers for
replication.

Fig 1: A common mastering processor for audio compression

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 1


Audio processing using filters 2012

The process of audio mastering varies depending on the specific needs of the audio to
be processed. Mastering engineers need to examine the types of input media, the expectations
of the source producer or recipient, the limitations of the end medium and process the subject
accordingly. General rules of thumb can rarely be applied.

Steps of the process typically include but are not limited to the following:

1. Transferring the recorded audio tracks into the Digital Audio Workstation (DAW)
(optional).
2. Sequence the separate songs or tracks (the spaces in between) as they will appear on
the final release.
3. Process or "sweeten" audio to maximize the sound quality for its particular medium
(e.g. applying specific EQ for vinyl)
4. Transfer the audio to the final master format (i.e., CD-ROM, half-inch reel tape.).

Examples of possible actions taken during mastering:

1. Editing minor flaws


2. Applying noise reduction to eliminate clicks, dropouts, hum and hiss
3. Adjusting stereo width
4. Adding ambience
5. Equalize audio across tracks
6. Adjust volume
7. Dynamic range expansion or compression
8. Peak limit

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 2


Audio processing using filters 2012

CHAPTER 2
DIGITAL FREQUENCY
Digital frequency is the analogue for discrete signals as frequency is to continuous
signals. Since a discrete signal is a sequence (merely a series of symbols; typically, numbers)
it contains no direct information as to determine the frequency of the corresponding
continuous signal. Just like in frequency, a digital frequency can have values
in degrees or radians. However, it is common to represent a digital frequency that has been
normalized to either the Nyquist frequency or the sampling frequency. It is therefore very
important to specify the frequency range.

The value of a valid signal is in the range of hertz.

Likewise for radians, values of digital frequency are in the range radians.

The sampling rate, sample rate, or sampling frequency (fs) defines the number of samples per
unit of time (usually seconds) taken from a continuous signal to make a discrete signal.
For time-domain signals, the unit for sampling rate is hertz (inverse seconds, 1/s, s−1),
sometimes noted as Sa/s (samples per second). The inverse of the sampling frequency is
the sampling period or sampling interval, which is the time between samples.

Fig 2: Sampling of analog signal

Above figure shows the sampling of an analog frequency. A stream is said to have a
sampling frequency, fs, if there are fs samples per second. Changing the fs of a stream during
playback will change the perceived natural frequencies of the stream. An audio CD normally
has a sampling frequency of 44,100 samples per second. The digital frequency, fd, for some
natural (continuous) frequency, f1. Since time has no meaning in a completely digital
(discrete) system, “samples” are used instead. Fd is, therefore, the digital analog of f1.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 3


Audio processing using filters 2012

The Nyquist interval is the minimum number of samples per second required to
accurately represent an analog signal of a given maximum frequency, fmax. It is
mathematically equal to 2*fmax. This is the reason that most audio CDs have a sampling
frequency of 44,100 Hertz (Hz), or samples per second; the approximate upper bound of
human hearing is about 20,000 Hz, or approximately one-half of 44,100 Hz. Most digital
frequencies are also expressed as radial frequencies, meaning they have units of radians per
cycle. To convert from a natural frequency, f1, to radial frequency fR, one uses the equation
fR = 2πf1.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 4


Audio processing using filters 2012

CHAPTER 3
FILTERS
Filters are electronic circuits that respond to impulses, processing signals by
enhancing certain aspects and/or reducing certain aspects. There are several different types of
filters.

Filter is a device or process that removes from a signal some unwanted component or
feature. Filtering is a class of signal processing, the defining feature of filters being the
complete or partial suppression of some aspect of the signal. Most often, this means removing
some frequencies and not others in order to suppress interfering signals and reduce
background noise. However, filters do not exclusively act in the frequency domain; especially
in the field of image processing many other targets for filtering exist.

The drawback of filtering is the loss of information associated with it. Signal combination in
Fourier space is an alternative approach for removal of certain frequencies from the recorded
signal.

3.1 Digital Filter:

Digital Filter operates on the digital input of data and produces digital output.
It can be constructed from adders, delay unit, and multiplier.

Features:

 Performance of digital filter does not vary with environmental changes, for ex thermal
variations.

 Frequency response can be automatically adjusted using a programmable processor.

 Several input signal can be filtered by one digital filter.

 Both filtered and unfiltered data can be saved for further use.

 It can be operate on wide range of frequencies.

 It is high immune to noise and possess considerable parameter stability.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 5


Audio processing using filters 2012

Types of digital filter:

Digital filters can be broadly classified into two classes.

 Infinite impulse response filter (IIR)

 Finite impulse response filter (FIR)

The input, output relation for an IIR filter is given by

Y (n)

The input, output relation for an FIR filter is given by

Y (n)

It is evident from these two equations that, for IIR filters, the impulse response is of infinite
duration whereas for FIR filter it is of finite duration, since h(k) for FIR has only N values. In
practice it is not feasible to compute the output of IIR filter, since the length of its impulse
response is too long (infinite), so in this project finite impulse response of different filters is
implemented.

Advantages of FIR filter in comparison to IIR filters:

 FIR filters can provide exact linear phase response, since its impulse response is
finite.

 Because of non-recursive property it is stable when compared to IIR.

 It has convenient design technique.

 If the filter coefficients are not too large then it is better to choose FIR

Disadvantages of FIR filter in comparison to IIR filters:

 Analog filters can be readily transformed into equivalent IIR digital filters meeting
similar specifications. This is impossible with FIR filters as they do not have analog
counterparts.

 FIR filters give large delays, which may be undesirable in certain applications.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 6


Audio processing using filters 2012

3.2 FIR Filter Design:

Fig 3: Flow diagram of FIR Filter Design


The flow diagram of FIR filter design is as shown in fig 3.
1. Filter specification: This may include stating the type of the filter, for example
lowpass filter, the desired amplitude and/or phase responses and the tolerances
(if any), sampling frequency, and the worldlength of the input data.
2. Coefficient calculation: In this step the coefficients of a transfer function, H(z)
which will satisfy the specifications given in (1). The choice of coefficient calculation
method is influenced by several factors, the most of which are critical requirements in
step (1).
3. Realization: This involves converting the transfer function obtained in (2) into a
suitable network structure.
4. Analysis of finite worldlength effects: Here the effect of quantizing the filter
coefficients and the input data as well as the effect of carrying out the filtering
operation is been done.
5. Implementation: This involves producing the software code and/or hardware and
performing the actual filtering.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 7


Audio processing using filters 2012

There are many different bases of classifying filters and those overlap in many
different ways; there is no simple hierarchical classification. Filters may be:

 Low pass filter


 High pass filter
 Band pass filter
 Bandstop filter
3.3 Low pass filter
A low pass filter is an electronic filter that passes low frequency signals but attenuates
(reduces the amplitude of) signals with frequencies higher than the cut-off frequency. The
actual amount of attenuation for each frequency varies from filter to filter. It is sometimes
called a high-cut filter, or treble cut filter when used in audio applications. A low-pass filter is
the opposite of a highpass filter. A band pass is a combination of a low-pass and a high-pass.

Low-pass filters exist in many different forms, including electronic circuits (such as
a hiss filter used in audio), anti-aliasing filters for conditioning signals prior to analog-to-
digital conversion, digital filters for smoothing sets of data, acoustic barriers, blurring of
images, and so on. The moving average operation used in fields such as finance is a particular
kind of low-pass filter, and can be analyzed with the same signal processing techniques as are
used for other low-pass filters. Low-pass filters provide a smoother form of a signal,
removing the short-term fluctuations, and leaving the longer-term trend.

3.4 High pass filter


A high-pass filter (HPF) is a device that passes high frequencies and attenuates (i.e.,
reduces the amplitude of) frequencies lower than its cutoff frequency. A high-pass filter is
usually modelled as a linear. It is sometimes called a low-cut filter or bass-cut filter.

High-pass filters have many uses, such as blocking DC from circuitry sensitive to non-zero
average voltages or RF devices. They can also be used in conjunction with a low-pass filter to
make a bandpass filter. The actual amount of attenuation for each frequency is a design
parameter of the filter.

They are used as part of an audio crossover to direct high frequencies to


a tweeter while attenuating bass signals which could interfere with, or damage, the speaker.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 8


Audio processing using filters 2012

When such a filter is built into a loudspeaker cabinet it is normally a passive filter that also
includes a low-pass filter for the woofer and so often employs both a capacitor
and inductor(although very simple high-pass filters for tweeters can consist of a series
capacitor and nothing else). An alternative, which provides good quality sound without
inductors (which are prone to parasitic coupling, are expensive, and may have significant
internal resistance) is to employ bi-amplification with active RC filters or active digital filters
with separate power amplifiers for each loudspeaker. Such low-current and low-voltage line
level crossovers are called active crossovers.
3.5 Band pass filter
A band-pass filter is a device that passes frequencies within a certain range and rejects
(attenuates) frequencies outside that range.

Optical band-pass filters are of common usage.

Bandpass is an adjective that describes a type of filter or filtering process; it is frequently


confused with passband, which refers to the actual portion of affected spectrum. Hence, one
might say "A dual bandpass filter has two passbands." A bandpass signal is a signal
containing a band of frequencies away from zero frequency, such as a signal that comes out
of a bandpass filter.

3.6 Band stop filter


In signal processing, a band-stop filter or band-rejection filter is a filter that passes
most frequencies unaltered, but attenuates those in a specific range to very low levels. It is the
opposite of a band-pass filter. A notch filter is a band-stop filter with a
narrow stopband (high Q factor).

Narrow notch filters (optical) are used in Raman spectroscopy, live sound
reproduction (public address systems, or PA systems) and in instrument amplifiers (especially
amplifiers or preamplifiers for acoustic instruments such as acoustic guitar, mandolin, bass
instrument amplifier, etc.) to reduce or prevent audio feedback, while having little noticeable
effect on the rest of the frequency spectrum (electronic or software filters). Other names
include 'band limit filter', 'T-notch filter', 'band-elimination filter', and 'band-reject filter'.

Typically, the width of the stopband is less than 1 to 2 decades (that is, the highest
frequency attenuated is less than 10 to 100 times the lowest frequency attenuated). In
the audio band, a notch filter uses high and low frequencies that may be only semitones apart.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 9


Audio processing using filters 2012

CHAPTER 4
RESULTS
4.1 Low pass filter:
Passband edge frequency fp=2000 Hz
Stopband edge frequency fs=3000 Hz
Sampling frequency fs1=10000 Hz
Attenuation=50db
Let wp and ws be the corresponding digital frequencies.
Transition width = ws-wp
The impulse response co-efficient is
H (n) = ((sin (wc*(n-T)/pi*(n-T))
Output:

20

-20
db

-40

-60

-80

-100
0 0.5 1 1.5 2 2.5 3 3.5
w(rad/sec)

Fig 4.1.1: Frequency response of low pass filter

-3
x 10
4

2
relative signal strength

-1

-2

-3
0 1 2 3 4 5 6 7 8
time (sec) 4
x 10

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 10


Audio processing using filters 2012

Fig 4.1.2: Relative strength of the audio signal


4.2 High pass filter:
Passband edge frequency fp=3000 Hz
Stopband edge frequency fs=2000 Hz
Sampling frequency fs1=10000 Hz
Attenuation=50db
Let wp and ws be the corresponding digital frequencies.
Transition width = wp-ws
The impulse response co-efficient is
H (n) = (sin (n-t)*pi-sin*(n-T)*wc)/pi*(n-T)

Output:

10

-10

-20

-30
db

-40

-50

-60

-70

-80

-90
0 0.5 1 1.5 2 2.5 3 3.5
w(rad/s)

Fig 4.2.1: Frequency response of high pass filter.

2
relative signal strength

-1

-2

-3

-4
0 1 2 3 4 5 6 7 8
time (sec) 4
x 10

Fig 4.2.2: Relative strength of the signal.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 11


Audio processing using filters 2012

4.3 Band pass filter:


Passband cut-off frequency fp1=1000 Hz
Passband cut-off frequency fp2=3000 Hz
Sampling frequency fs1=10000 Hz
Attenuation=50db
Let wp1 and wp2 be the corresponding digital frequencies.
The impulse response co-efficient is
H (n) = ((sin*(n-T)*wc2-sin*(n-T)*wc1))/ (n-T)*pi

Output:

Fig 4.3.1: Frequency response of band pass filter.

2
relative signal strength

-1

-2

-3
0 1 2 3 4 5 6 7 8
time (sec) 4
x 10

Fig 4.3.2: Relative strength of the signal

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 12


Audio processing using filters 2012

4.4 Band stop filter:


Stopband cut-off frequency fp1=1000 Hz
Stopband cut-off frequency fp2=3000 Hz
Sampling frequency fs1=10000 Hz
Attenuation=50db
Let wp 1and wp2 be the corresponding digital frequencies.

The impulse response co-efficient is


H (n) = ((sin*(n-T)*wc1-sin*(n-T)*wc2+sin*(n-T)*pi))
Output:

Fig 4.4.1: Frequency response of band stop filter.

10

4
relative signal strength

-2

-4

-6

-8

-10
0 1 2 3 4 5 6 7 8
time (sec) 4
x 10

Fig 4.4.2: Relative strength of the signal.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 13


Audio processing using filters 2012

CHAPTER 5
ADVANTAGES DISADVANTAGES & APPLICATIONS

4.1.1 ADVANTAGES:
 Delay: The effect of delay is achieved when a signal is played and then a modified
version of that signal is played back after a period of time, either one time or multiple
times, resulting in an echoing effect. The simplest version of delay is an FIR filter
through which a signal is played back only one time. This is called simple delay.
 Data storage,
 level compression,
 data compression,
 transmission enhancement
(e.g., equalization, filtering, noise cancellation, echo or reverb removal or addition, etc.)

4.1.2 DISADVANTAGES:
 Analog signals cannot be readily transformed into equivalent FIR filters as the FIR
filters, do not have analog counterparts.
 FIR filters gives large delays which may be undesirable certain applications

4.1.3 APPLICATIONS:
 They may also be used to “boost” and “cut” specific frequency ranges in an audio file
to make it more pleasant to the ear.
 The echoes and reverberations heard in many popular songs are the products of post-
recording digital signal processing.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 14


Audio processing using filters 2012

CHAPTER 6
CONCLUSION
This project investigated how some simple filters actually works. It serves as an
introduction to digital signal processing, primarily audio signal processing, which specifically
investigated delay, reverb, and equalization filters. Most of us had prior experience with
audio equipment, so we had some familiarity with how audio systems and processing work.
The filters which are implemented in this project can be applied many areas.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 15


Audio processing using filters 2012

REFERENCES
[1] Atti, Andreas Spanias, Ted Painter, Venkatraman “Audio signal processing
and coding” NJ: John Wiley & Sons, (2006) 464.
[2] Zölzer, Udo “Digital Audio Signal Processing” John Wiley and Sons, (1997).
[3] Mix Magazine: “Issues in Modern Mastering”
[4] Martin, George; Hornsby, Jeremy “All you need is ears” Macmillan. (1994),
143.

T VYASARAJ, 2ND SEM, M.Tech, (DEC), K.V.G.C.E., SULIIA. Page 16

Das könnte Ihnen auch gefallen