Upload
adelia-wilkinson
View
220
Download
1
Tags:
Embed Size (px)
Citation preview
EE599-020Audio Signals and Systems
Effects
Kevin D. DonohueElectrical and Computer Engineering
University of Kentucky
Related Web SitesAudio effects are popular among musicians and recording engineers. They typically involve linear and non-linear distortions to produce an artistic or aural impression. Related website are:
http://users.iafrica.com/k/ku/kurient/dsp/effects.html
http://www.dsv.su.se/~fk/DSP/dsp.html
http://www.harmony-central.com/Effects/
Expanders and Compressors process the amplitude of the signal in a nonlinear (usually logarithmic) manner to modify dynamic ranges, suppress low-level noise, compand, and create effects.
Amplitude/Envelope Effects
Expanders/Noise GatesThe input/output relationship of a zero-memory expander can be expressed with the following equation:
where x(n) is the input, y(n) is the expanded output, xe is the threshold below which logarithmic scaling is applied, and is rate of attenuation (log slope) of the values below the expander threshold. The rate should range from 1 to infinity (10 is close enough).
-5 -4 -3 -2 -1 0 1 2 3 4 5-5
-4
-3
-2
-1
0
1
2
3
4
5Transfer characteristic of expander with threshold of 2 and rate 1:5
input x(n)
outp
ut y
(n)
ee
e
xnxx
nxnx
xnxnx
ny
)(for )(
)(
)(for )(
)(1
-2.5 -2 -1.5 -1 -0.5 0 0.5 1-12
-10
-8
-6
-4
-2
0
2
log of input x(n)
log
of o
utpu
t y(
n)
Transfer characteristic of expander with threshold of 2 and rate 1:5
1
5
Consider an speech file corrupted with low-level hiss (white noise). If the expander gate is set logarithmically to attenuate the signal by some factor (3:1) for all signal under a value that is mostly greater than the noise amplitudes, then the hiss (especially in the areas of silenced will be suppressed).
Example
For the zero-memory expander the threshold is fixed, independent of signal amplitude. In most applications the attack and decay time of the threshold can set so the attenuation effectively delays its application when the signal falls below the threshold and its release when the signal goes above the threshold.
Dynamic Expanders
x(t)
Level/EnvelopDetector
Memory/FilterAttack/Decay
Response
Gain y(t)
Example
Consider an single tone whose amplitude jumps abruptly (below and above the expansion threshold. Apply LPF to the envelope used in threshold determination and describe effects on the output to various levels of LPF on the envelope.
(threshold = .2, ratio 10:1, real pole on 1st order LPF = 0 and .995
Compressor/LimitingThe input/output relationship of a zero-memory compressor can be expressed with the following equation:
where x(n) is the input, y(n) is the expanded output, xe is the threshold below which logarithmic scaling is applied, and is rate of attenuation (log slope) of the values below the expander threshold. The rate should range from 1 to 0 (.1 is close enough).
ee
e
xnxx
nxnx
xnxnx
ny
)(for )(
)(
)(for )(
)(1
Consider an very loud and very soft sound being played simultaneously. Apply zero memory compression to reduce the dynamic range of the signal so both sounds can be hear more distinctly.
Example
For the zero-memory compressor the threshold is fixed, independent of signal amplitude. In most applications the attack and decay time of the threshold can set so the attenuation effectively delays its application when the signal falls below the threshold and its release when the signal goes above the threshold.
Dynamic Compressors
x(t)
Level/EnvelopDetector
Memory/FilterAttack/Decay
Response
Gain y(t)
Noise Reduction
The nonlinear processing presented in compression and expansion has been adapted for specialized noise reduction techniques. Especially if noise is due to quantization or dynamic range limitations of the recording/transmission media. See …
• http://hyperphysics.phy-astr.gsu.edu/hbase/audio/tape4.html
• http://www.dolby.com/cassette/bcsnr/common.html
• http://www.epanorama.net/documents/telecom/ulaw_alaw.html
Quantization Error and Noise
Quantization has the same effects as adding noise to the signal:
11 10 01 00
)(ˆ)()( nTxnTxnTn aq )(ˆ)()( nTxnTnnTx qa
)(txa )(nTxa )(ˆ nTxAnalog Discrete Digital
Intervals between quantization levels are proportional to the resulting quantization noise.
For uniform quantization, the interval between signal levels is the maximum signal amplitude value divided by the number of quantization intervals.
Quantization Levels and Dynamic Range
An N bit word can represent 2N levels
For audio signal an N bit word corresponds to:Nx20xLog10(2) dB dynamic range
16 bits achieve a dynamic range of about 96 dB. For every bit added, about 6 db is added to the dynamic range.
The human ear can detect sounds from 1x10-12 to 10 watts / meter2 (130 dB dynamic range)
Noise Reduction If signals need to be recorded or transmitted on media that reduce
dynamic range or adds noise, compression and expansion before storage and after playback can be use to enhance signal-to-noise and dynamic range.
DolbyTM, dbxTM, and mu-law companding noise reduction systems are examples of amplitude only encoders.
Signals can be compressed to fit the dynamic range of the media and expanded on playback.
If noise is added to the signal in a compressed state, expansion on playback will suppress the noise while restoring the signal.
If a compressed signal is quantized, the lower level amplitudes will effectively be quantized with a smaller interval than the larger amplitudes, thereby redistributing the quantization noise to louder signal amplitudes where it is less likely to be perceived.
Quantization Noise
Original CD clip quantized with 6 bits at original sampling frequency
101
102
103
104
105
-140
-120
-100
-80
-60
-40
-20
0
Hertz
dB
Tell Me Ma - with 6 bit quantization
QuantizationNoise Energy
Phase/Frequency Effects
Several effects modify the signal phases to produce simulated reverb, delay, flanging, chorusing, and phasing.
Delay/Echo
A simple FIR filter can be used to implement a single echo effect.
x(n) Z-M by(n)
+
)()()( Mnbxnxny
Delay/Echo with Regeneration
An IIR filter can be used to implement regeneration with an echo effect.
x(n)Z-M b
y(n)+
)()()()()( MnayMnxabnxny
a
+
ExamplesDetermine the frequency response for the delay with and without regeneration. Describe how the delay effect will sound with and without regeneration.
Describe how you could characterize a delay system? What test signals would be useful, what analysis would be used, what parameters could you determine?
ReverbA more complex series of regenerated echoes can be use to model a reverb effect
K
kd
k
dk
I
i
di k
k
i
za
zazb
zX
zY
11 11
)(ˆ)(ˆ
Early reflections (Specular)FIR comb filters
Late Reflections (diffuse)IIR all-pass filters
FlangingCombining a signal with a dynamic delay of itself creates a “whooshing” effects referred to as flanging.
x(n)Z-M(n) b
y(n)+
a
+
))(())(()()()( nMnaynMnxabnxny
Time-varying systemFor M(n) following a sinusoidal pattern, flanging with no feedback can be expressed as:
where M is the mean delay, d is the dynamic delay (sweep depth) expressed in samples, and fm is the modulation frequency of the dynamic delay. Typical flanging parameters for fm range from .2 to 2 Hz and delays ranges from .5 to 10 ms.
)2sin()()( mnfdMnbxnxny
ExamplesDetermine the frequency response for the flanger for fixed delay with and without feedback. Discuss what happens to the response when the delay varies.
Describe how you could characterize a flanging system? What test signals would be useful, what analysis would be used, what parameters could you determine?
ChorusingChorusing creates the effect of multiple voices through multiple dynamic frequency shifts and time delays. This can be implemented with multiple flanging paths
where bi is the scaling on each choruser Mi+di is the maximum delay expressed in samples, and fi is the modulation frequency of the sweep depth.
Typical delay times for this effect are from 20 to 30 ms with dynamic delays on the order of 1 to 10ms.
N
iiiii nfdMnxbnxny
1
)2sin()()(
Frequency Response Modification
Most filtering effects give empahsis/deemphasis to a particular frequency region (equalization, shelving, parametric filtering, band-pass, stop-band, high-pass, low-pass ..)
Dynamic filters can also be used to create effects based on how the filter is varied while the sound is being played. This includes effects such as Wah-Wah and Vocoding.
Wah-Wah
The Wah-Wah effect is created by dynamic shifting the center frequency of a bandpass filter processing the audio signal. The user typically controls this with a pedal or sets the tempo for automatic variations. More complex features include different shaped filter, such as those based on the voice spectrum (sometime referred to as vocoding)