0% found this document useful (0 votes)
183 views

Digital Audio Processing: By: Eng. Mohanned Dawoud

This document discusses digital audio processing and dynamic range compression. It begins by explaining how audio signals can be represented digitally after being sampled from analog waveforms. It then discusses applications of digital audio processing like storage, compression, transmission, and enhancement. The document also covers dynamic range compression, which reduces the volume of loud sounds while leaving quiet sounds unchanged. It describes compressor features and applications in sound recording and mixing.

Uploaded by

Mahmoud Dalloul
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views

Digital Audio Processing: By: Eng. Mohanned Dawoud

This document discusses digital audio processing and dynamic range compression. It begins by explaining how audio signals can be represented digitally after being sampled from analog waveforms. It then discusses applications of digital audio processing like storage, compression, transmission, and enhancement. The document also covers dynamic range compression, which reduces the volume of loud sounds while leaving quiet sounds unchanged. It describes compressor features and applications in sound recording and mixing.

Uploaded by

Mahmoud Dalloul
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Digital Audio Processing

By: Eng. Mohanned Dawoud


Audio signal processing
• Audio signal processing, sometimes referred
to as audio processing.
• It is the processing of a representation of
auditory signals, or sound.
Analog signals
• An analog representation is usually electrical.
• A voltage level represents the air pressure
waveform of the sound.
Digital signals
• A digital representation expresses the pressure
wave-form as a sequence of symbols, usually
binary numbers, which permits digital signal
processing.
• human ears cannot perceive frequencies below
approx. 20 Hz or above approx. 18 kHz (strongly
depends on the age of the listener). Therefore,
there is no significant loss of information when
the analog signal is sampled using a high enough
sampling rate.
Digital signals
• The signal-to-noise ratio (SNR), which measures
the noise level, can be easily calculated thru this
formula, where n is the number of bits used on
the ADC:
SNR = 6.02 x n + 1.76 dB
• The higher the SNR, the better. An 8-bit ADC
provides a SNR of 49.9 dB, while a 16-bit SNR
provides a SNR of 98 dB (which is, by the way, a
virtually no-noise value).
• More than 130 dB Signal-to-noise ratio is almost
impossible to achieve.
Application areas

• Processing methods and application areas


include:
– Storage.
– level compression
– data compression.
– Transmission.
– Enhancement (e.g., equalization, filtering, noise
cancellation, echo or reverb removal or addition, etc.)
Sound recording and reproduction

• Sound recording and reproduction is the


electrical or mechanical inscription and re-
creation of sound waves, usually used for the
voice or for music.
Sound recording and reproduction
• The two main classes of sound recording
technology are analog recording and digital
recording.
• Analog recording is achieved by a small
microphone diaphragm that can detect changes
in atmospheric pressure (acoustic sound waves)
and record them as graphic sound waves on a
medium.
• Digital recording and reproduction uses the same
analog technologies, with digitization of the
sonographic data and signal.
Sound recording and reproduction
• The most recent and revolutionary
developments have been in digital recording,
with the invention of purely electronic
consumer recording formats such as the
WAV digital music file and the compressed
file type, the MP3.
• use of computers has made editing
operations faster and easier to execute with
software, and the use of hard-drives for
storage has made recording cheaper
Dynamic range compression
• In music, dynamic range is the difference
between the quietest and loudest volume of an
instrument, part or piece of music.
• Dynamic range compression, also called DRC
(often seen in DVD player settings) or simply
compression, is a process that reduces the
dynamic range of an audio signal.
• Compression is used during sound recording, live
sound reinforcement, and broadcasting to
control the level of audio. A compressor is the
device used to apply compression.
Dynamic range compression
• In simple terms, a compressor is an automatic volume
control.
• Loud sounds over a certain threshold are reduced in level
while quiet sounds remain untreated (this is known as
downward compression, while the less common upward
compression involves making sounds below the threshold
louder while the louder passages remain unchanged).
• In this way it reduces the dynamic range of an audio signal.
• This may be done for aesthetic reasons, to deal with
technical limitations of audio equipment, or to improve
audibility of audio in noisy environments.
Dynamic range compression
• A compressor reduces the gain (level) of an audio signal if
its amplitude exceeds a certain threshold.
• The amount of gain reduction is determined by a ratio.
• For example, with a ratio of 4:1, when the (time averaged)
input level is 4 dB over the threshold, the output signal
level will be 1 dB over the threshold. The gain (level) has
been reduced by 3 dB. When the input level is 8 dB above
the threshold, the output level will be 2 dB; a 6 dB gain
reduction.
• A more specific example for a 4:1 ratio:
Threshold = −10 dB
Input = −6 dB (4 dB above the threshold)
Output = −9 dB (1 dB above the threshold)
Dynamic range compression
Design
Feed-forward: is used today on all compressors.
• The signal entering a compressor is split, with one copy sent to a
variable-gain amplifier and the other to a path called the side-chain.
• Control circuit calculates the required amount of gain reduction.
• The control-circuit outputs the requested gain-reduction amount to
the amplifier.
Feedback type: Early compressor designs were based on this type.
• the signal feeding the control circuit was taken after the amplifier.
Dynamic range compression
Compressor features
• Threshold
Threshold is the level above which the signal is reduced. It
is commonly set in dB, where a lower threshold (e.g. -60
dB) means a larger portion of the signal will be treated
(compared to a higher threshold of -5 dB).
• Ratio
The ratio determines the input/output ratio for signals
above the threshold.
The highest ratio of ∞:1 is commonly achieved using a ratio
of 60:1.
Dynamic range compression
• Attack and release
A compressor might provide a degree of
control over how quickly it acts.

The 'attack phase' is the period when


the compressor is increasing gain
reduction to reach the level that is
determined by the ratio.

The 'release phase' is the period when


the compressor is decreasing gain
reduction to the level determined by
the ratio, or, to zero, once the level has
fallen below the threshold.

The length of each period is determined


by the rate of change and the required
change gain reduction.
Dynamic range compression
• Soft and hard knees
Another control a compressor might
offer is hard/soft knee.

This controls whether the bend in the


response curve is a sharp angle or has a
rounded edge.

A soft knee slowly increases the


compression ratio as the level increases
and eventually reaches the compression
ratio set by the user.

A soft knee reduces the audible change


from uncompressed to compressed,
especially for higher ratios where the
changeover is more noticeable.
Dynamic range compression
• Stereo Linking
Stereo linking can be achieved in two ways:
– Either the compressor sums to mono the left and right channel
at the input, then only the left channel controls are functional.
– The compressor still calculates the required amount of gain
reduction independently for each channel and then apply the
highest amount of gain reduction to both .
• Make up gain
Because the compressor is reducing the gain (or level) of
the signal, the ability to add a fixed amount of make-up
gain at the output is provided so that an optimum level can
be used.
Dynamic range compression
Compressor usage
• high threshold and low compression ratio achieve dynamic range
reduction with few obvious effects so that the source material is being
compressed very slightly most of the time.
• To deliberately soften the attack of a snare drum, they might choose a
fast attack time and a moderately fast release time combined with a
higher threshold.
• To accentuate the attack of the snare, they might choose a slower attack
time to avoid affecting the initial transient. It is easier to successfully apply
these controls if the user has a basic knowledge of musical instrument
acoustics.
• It should be noted that compression can also be used to lift the soft
passages of a selection, pulling the sound toward a compressed "middle".
Hence, loud sounds are pulled back and soft passages are boosted.
Dynamic range compression
Limiting
• Compression and limiting are
no different in process, just in
degree and in the perceived
effect.
• A limiter is a compressor with a
higher ratio, and generally a
fast attack time.
• Engineers sometimes refer to
soft and hard limiting which are
differences of degree. The
"harder" a limiter, the higher
its ratio and the faster its
attack and release times.
Dynamic range compression
Side-chaining
• Side-chaining uses the signal level of another input or
an equalized version of the original input to control the
compression level of the original signal.
• This is used by disc jockeys to lower the music volume
automatically when speaking.
• A stereo compressor without a sidechain can be used
as a mono compressor with a sidechain. The key or
sidechain signal is sent to the first (main) input of the
stereo compressor while the signal that is to be
compressed is routed into and out of the second
channel of the compressor.
Dynamic range compression
Parallel compression
• parallel compression is to insert the compressor
in a parallel signal path.
• give a measure of dynamic control without
significant audible side effects, if the ratio is
relatively low and the compressor's sound is
relatively neutral.
• On the other hand, a high compression ratio with
significant audible artifacts can be chosen in one
of the two parallel signal paths.
Dynamic range compression
Multiband compression
• Multiband compressors are compressors that can act
differently on different frequency bands.
• It is as if each bandpass has its own compressor with its
own threshold, ratio, attack, and release.
Serial compression
• Serial compression is a technique used in sound recording
and mixing.
• Serial compression is achieved by using two fairly different
compressors in a signal chain. One compressor will
generally stabilize the dynamic range while the other will
more aggressively compress stronger peaks.
Dynamic range compression
Common uses

• Public spaces
• Music production
• Voice
• Broadcasting
• Marketing
Audio compression (data)
• Audio compression is a form of data compression
designed to reduce the size of audio files.
• Audio compression algorithms are implemented
in computer software as audio codecs.
• Generic data compression algorithms perform
poorly with audio data.
• Consequently, specific audio "lossless" and
"lossy" algorithms have been created.
• In both lossy and lossless compression,
information redundancy is reduced. 
Audio compression (data)
Lossless audio compression
• Lossless audio compression allows one to
preserve an exact copy of one's audio files.
• Compression ratios are similar to those for
generic lossless data compression (around 50–
60% of original size).
• Compression ratios are substantially less for
lossy compression (which typically yield 5–
20% of original size).
Audio compression (data)
Use of Lossless audio compression
• The primary use of lossless encoding are:
– Archives : For archival purposes, one naturally
wishes to maximize quality.
– Audio quality: Being lossless, these formats
completely avoid compression artifacts.
Audio compression (data)
Use of Lossless audio compression (cont.)
• A specific application is to:
– Store lossless copies of audio.
– Produce lossily compressed versions for a digital audio
player.
– As formats and encoders improve, one can produce
updated lossily compressed files from the lossless master.
• As file storage and communications bandwidth have
become less expensive and more available, lossless
audio compression has become more popular.
Audio compression (data)
Formats of Lossless audio compression
• Shorten was an early lossless format; newer ones include
Free Lossless Audio Codec (FLAC), Apple's Apple Lossless,
MPEG-4 ALS, Monkey's Audio, and TTA.
• Some audio formats feature a combination of a lossy
format and a lossless correction; this allows stripping the
correction to easily obtain a lossy file. Such formats include
MPEG-4 SLS (Scalable to Lossless), WavPack, and
OptimFROG DualStream.
• Some formats are associated with a technology, such as:
– Direct Stream Transfer, used in Super Audio CD
– Meridian Lossless Packing, used in DVD-Audio and Dolby
TrueHD, used in in Blu-ray and HD DVD
Audio compression (data)
Difficulties in lossless compression of audio data
It is difficult to maintain all the data in an audio
stream and achieve substantial compression.
• First, the vast majority of sound recordings are
highly complex, recorded from the real world.
• Second, The values of audio samples change very
quickly, so generic data compression algorithms
don't work well for audio, and strings of
consecutive bytes don't generally appear very
often.
Audio compression (data)
Evaluation criteria of Lossless audio compression
Lossless audio codecs have no quality issues,
so the usability can be estimated by
– Speed of compression and decompression
– Degree of compression
– Software and hardware support
– Robustness and error correction
Audio compression (data)
Lossy audio compression
• Lossy audio compression is used in an extremely wide
range of applications.
• Digitally compressed audio streams are used in many
applications, for example:
– Video DVDs.
– Digital television.
– Streaming media on the internet.
– Satellite and cable radio.
– Increasingly in radio broadcasts.
• Lossy compression typically achieves far greater
compression than lossless compression (5-20% of the
original stream, rather than 50-60% in the Lossless.
Audio compression (data)
Lossy audio compression (cont.)
• In lossy audio compression, data that can not be
perceived by the human auditory system are
coded with decreased accuracy or not coded at
all.
• Most lossy compression reduces perceptual
redundancy.
• Removing or reducing 'unhearable' sounds may
account for a small percentage of bits saved in
lossy compression.
Audio compression (data)
Lossy audio compression (cont.)
• Reducing the number of bits used to code a signal
increases the amount of noise in that signal (Recall
SNR).
• The real key in lossy compression, is to 'hide' the noise
generated by the bit savings in areas of the audio
stream that cannot be perceived.
• This is done by, for instance, using very small numbers
of bits to code the high frequencies of most signals.
– human ear can only perceive very loud signals in this
region
– so that softer sounds 'hidden' there simply aren't heard.
Audio compression (data)
Lossy audio compression (cont.)
• If reducing perceptual redundancy does not achieve
sufficient compression for a particular application, it
may require further lossy compression.
• Depending on the audio source, this still may not
produce perceptible differences. Speech for example
can be compressed far more than music.
• Most lossy compression schemes allow compression
parameters to be adjusted to achieve a target rate of
data, usually expressed as a bit rate.
Audio compression (data)
Lossy audio compression (cont.)
• Because data is removed during lossy
compression and cannot be recovered by
decompression, some people may not prefer
lossy compression for archival storage.
• People use lossy compression may wish to
keep a losslessly compressed archive for other
applications.
Audio compression (data)
Applications of lossy compression
• Due to the nature of lossy algorithms, audio
quality suffers when a file is decompressed
and recompressed (digital generation loss).
• Lossy compression unsuitable for storing the
intermediate results in professional audio
engineering applications.
• Popular with end users (particularly MP3).
Audio compression (data)
Evaluation criteria
Usability of lossy audio codecs is determined by:
• Perceived audio quality
• Compression factor
• Speed of compression and decompression
• Inherent latency of algorithm (critical for real-
time streaming applications; explained later)
• Software and hardware support
Audio compression (data)
Inherent latency of algorithm
• Lossy formats are often used for the distribution
of streaming audio, or interactive applications.
• In such applications, the data must be
decompressed as the data flows.
• Not all audio codecs can be used for streaming
applications.
• For such applications a codec designed to stream
data effectively will usually be chosen.
Audio compression (data)
Inherent latency of algorithm (cont.)
• Latency results from the methods used to
encode and decode the data.
• Some codecs will analyze a longer segment of
the data to optimize efficiency.
• Often codecs create segments called a
"frame" to create discrete data segments for
encoding and decoding.
Audio compression (data)
Inherent latency of algorithm (cont.)
• Latency refers to the number of samples which
must be analysed before a block of audio is
processed.
• In the minimum case, latency is 0 zero samples
(e.g., if the coder/decoder simply reduces the
number of bits used to quantize the signal).
• Time domain algorithms have low latencies,
hence their popularity in speech coding for
telephony.

You might also like