Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 Digitization of Sound
Iran University of Science and Technology,
Computer Engineering Department,
F ll 2008 (1387)
Fall
Chapter 6
Basics of Digital Audio
Wh t is
What
i Sound?
S
d?
Sound is a wave phenomenon like light,
light but is macroscopic
and involves molecules of air being compressed and
expanded under the action of some physical device.
(a) For example, a speaker in an audio system vibrates back and
forth and pproduces a longitudinal
g
ppressure wave that we pperceive
as sound.
(b) Since sound is a pressure wave,
wave it takes on continuous values,
values
as opposed to digitized ones.
((c)) Even
E
th
though
h suchh pressure waves are
longitudinal, they still have ordinary wave
properties and behaviors, such as reflection
((bouncing),
g), refraction ((change
g of angle
g when
entering a medium with a different density)
and diffraction (bending around an obstacle).
obstacle)
Digitization
Digitization means conversion to a stream of
preferablyy these numbers should
numbers,, and p
be integers for efficiency.
www.jntuworld.com
((d)) Sampling
p g in the amplitude
p
or voltage
g dimension is called
quantization. Fig. 6.2(b) shows this kind of sampling.
(a)
(b)
Fig. 6.2:
Fig
6 2: Sampling and Quantization.
Quantization (a): Sampling the
analog signal in the time dimension. (b): Quantization is
sampling the analog signal in the amplitude dimension.
7
www.jntuworld.com
www.jntuworld.com
N
Nyquist
i t Theorem
Th
Signals can be decomposed into a sum of
sinusoids Fig.
sinusoids.
Fig 6.3
6 3 shows how weighted
sinusoids can build up quite a complex signal.
10
The
Th Nyquist
N
i theorem
h
states how
h frequently
f
l we must sample
l in
i time
i to
be able to recover the original sound.
Fig 6.4:
Fig.
6 4: Aliasing.
Aliasing
(a): A single frequency.
(a) Fig. 6.4(a) shows a single sinusoid: it is a single, pure, frequency (only
electronic instruments can create such sounds).
(b) If sampling rate just equals the actual frequency, Fig. 6.4(b) shows that
a false signal is detected: it is simply a constant, with zero frequency.
(c) Now if sample at 1.5 times the actual frequency, Fig. 6.4(c) shows that
we obtain an incorrect (alias) frequency that is lower than the correct
one it is half the correct one (the wavelength, from peak to peak, is
double that of the actual signal).
signal)
(d) Thus for correct sampling we must use a sampling rate equal to at least
twice the maximum frequency content in the signal.
signal This rate is called
the Nyquist rate.
11
12
S
Sampling
li With Aliasing
Ali i
13
14
(6.1)
SNR = 10 log10
2
Vsignal
2
noise
15
= 20 log10
Vsignal
Vnoise
(6.2)
www.jntuworld.com
Th
The usuall levels
l l off sound
d we hear
h
around
d us are described
d
ib d in
i terms off decibels,
d ib l as a
ratio to the quietest sound we are capable of hearing. Table 6.1 shows approximate
levels for these sounds.
Table 6.1: Magnitude levels of common sounds, in decibels
Threshold of hearing
Rustle of leaves
10
20
Average room
40
Conversation
60
Busy street
70
Loud radio
80
90
Riveter
100
Threshold of discomfort
120
Threshold of pain
140
160
17
A
Aside
id from
f
any noise
i that
th t may have
h
b
been
presentt
in the original analog signal, there is also an
additional error that results from quantization.
quantization
(a) If voltages are actually in 0 to 1 but we have only 8
bits in which to store values, then effectively we force
all continuous values of voltage into only 256 different
values.
l
(b) This introduces a roundoff error.
error It is not really
noise. Nevertheless it is called quantization noise
(or quantization error).
18
((c)) For
F a quantization
i i accuracy off N bits
bi per sample,
l the
h SQNR can
be simply expressed:
V
2N 1
signal
SQNR = 20 log
= 20 log
10 V
10 1
quan _ noise
2
= 20
0 N log
og 2 = 6.02
6.0 N (dB)
(d )
(6.3)
Notes:
(a) We map the maximum signal to 2N1 1 ( 2N1) and the most
negative signal to 2N1.
(b) Eq. (6.3) is the Peak signal-to-noise ratio, PSQNR: peak signal and
peak noise.
20
www.jntuworld.com
Response Stimulus/Stimulus
(6.6)
(6.5)
22
-law:
Integrating,
I
i
we arrive
i at a solution
l i
r = k ln s + C
(6.7)
r=
sgn( s )
s
ln 1 +
,
( + )
ln(1
s p
s
1
sp
(6.9)
A-law:
r = k ln(s/s0)
(6.8)
s
A
1 + ln A s p
r =
sgn (s)
1 + ln A 1 + ln A
s
,
s p
s
1
sp
A
(6.10)
1
s
1
A
sp
0
1 if s > 0,
where sgn( s ) =
1 otherwise
Fig. 6.6 shows these curves. The parameter is set to = 100 or = 255; the
parameter A for the A-law encoder is usually set to A = 87.6.
24
www.jntuworld.com
Audio Filtering
Prior to sampling and AD conversion,
con ersion the audio
a dio signal is also usually
s all filtered
filt d
to remove unwanted frequencies. The frequencies kept depend on the
application:
(a) For speech, typically from 50Hz to 10kHz is retained, and other frequencies
are blocked by the use of a band-pass filter that screens out lower and higher
q
frequencies.
(b) An audio music signal will typically contain from about 20Hz up to 20kHz.
(c) At the DA converter end, high frequencies may reappear in the output
because of sampling and then quantization, smooth input signal is replaced by a
series of step functions containing all possible frequencies.
(d) So at the decoder side, a lowpass filter is used after the DA circuit.
26
Synthetic Sounds
Th
The uncompressedd data
d t rate
t increases
i
as more bits
bit are usedd for
f
quantization. Stereo: double the bandwidth. to transmit a digital
audio signal.
Sample Rate
(Khz)
Bits per
Sample
Mono /
Stereo
Data Rate
(uncompressed)
(kB/sec)
Frequency Band
(KHz)
Telephone
p
Mono
0.200-3.4
AM Radio
11.025
Mono
11.0
0.1-5.5
FM Radio
22.05
16
Stereo
88.2
0.02-11
CD
44.1
16
Stereo
176.4
0.005-20
DAT
DVD Audio
48
16
Stereo
192.0
0.005-20
192 ((max))
24(max)
(
)
6 channels
1,200
,
(max)
(
)
0-96 ((max))
27
28
(6 11)
(6.11)
www.jntuworld.com
Fig.
g 6.7: Frequency
q
y Modulation. ((a):
) A single
g frequency.
q
y ((b):
) Twice the
frequency. (c): Usually, FM is carried out using a sinusoid argument to
a sinusoid. (d): A more complex form arises from a carrier frequency,
2t and a modulating frequency 4t cosine inside the sinusoid.
29
In this technique,
q , the actual digital
g
samples
p of
sounds from real instruments are stored. Since
wave tables are stored in memory on the sound
card, they can be manipulated by software so
that sounds can be combined,
combined edited,
edited and
enhanced.
30
MIDI Overview
(a) MIDI is a scripting language it codes events that stand for
the production of sounds. E.g., a MIDI event might include
values for the pitch of a single note, its duration, and its volume.
(b) MIDI is a standard adopted by the electronic music industry for
controlling devices, such as synthesizers and sound cards, that
produce music.
31
32
www.jntuworld.com
MIDI Concepts
MIDI channels
h
l are usedd to
t separate
t messages.
(a) There are 16 channels numbered from 0 to 15.
15 The
channel forms the last 4 bits (the least significant bits) of
the message.
(b) Usually a channel is associated with a particular
instrument: e.g., channel 1 is the piano, channel 10 is the
drums, etc.
((c)) Nevertheless,
N
th l
one can switch
it h instruments
i t
t midstream,
id t
if
desired, and associate another instrument with any channel.
33
System
S
messages
(a) Several other types of messages, e.g. a general message
for all instruments indicating a change in tuning or timing.
timing
(b) If the first 4 bits are all 1s, then the message is interpreted
as a system common message.
The way
a a synthetic
s nthetic musical
m sical instrument
instr ment responds to a
MIDI message is usually by simply ignoring any play
g that is not for its channel.
sound message
If several messages are for its channel, then the instrument
responds,
d provided
id d it is
i multi-voice,
lti i
i
i.e.,
can play
l more
than a single note at once.
34
It
I is
i easy to confuse
f
the
h term voice
i with
i h the
h term timbre
i b the
h latter
l
is MIDI terminology for just what instrument that is trying to be
emulated, e.g. a piano as opposed to a violin: it is the quality of the
sound.
sound
G
Generall MIDI:
MIDI A standard
d d mapping
i
specifying
if i
what
h
instruments (what patches) will be associated with what
channels.
(b) On
O the
h other
h hand,
h d the
h term voice,
i while
hil sometimes
i
used
d by
b musicians
i i
to mean the same thing as timbre, is used in MIDI to mean every
different timbre and pitch that the tone module can produce at the same
time.
time
(b) For
F most instruments,
i
a typical
i l message might
i h be
b a Note
N
O
On
message (meaning, e.g., a keypress and release), consisting of
what channel, what pitch, and what velocity (i.e., volume).
35
36
www.jntuworld.com
The
Th data
d in
i a MIDI status byte
b
i between
is
b
128 and
d 255;
255 each
h
of the data bytes is between 0 and 127. Actual MIDI bytes
are 10-bit,, includingg a 0 start and 0 stop
p bit.
A MIDI device
d i often
f
i capable
is
bl off programmability,
bili andd also
l can
change the envelope describing how the amplitude of a sound
changes over time.
Fig. 6.9 shows a model of the response of a digital instrument to a
Note On message:
Fig.
g 6.8: Stream of 10-bit bytes;
y ; for typical
yp
MIDI messages,
g ,
these consist of {Status byte, Data Byte, Data Byte} = {Note
On, Note Number, Note Velocity}
37
38
Th
The physical
h i l MIDI ports consist
i off 5-pin
5 i connectors for
f
IN and OUT, as well as a third connector called THRU.
(a) MIDI communication is half-duplex.
(b) MIDI IN is the connector via which the device receives all
MIDI data.
(c) MIDI OUT is the connector through which the device
transmits all the MIDI data it g
generates itself.
www.jntuworld.com
A typical
i l MIDI sequencer setup is
i shown
h
i Fig.
in
Fi 6.11:
6 11
Fig.
g 6.12: MIDI message
g taxonomyy
42
T bl 6.3:
Table
6 3 MIDI voice
i messages
A.
A Channel
Ch
l messages: can have
h
up to 3 bytes:
b
a) The first byte is the status byte (the opcode, as it were); has its most significant bit set to 1.
Voice Message
g
Status Byte
y
Data Byte1
y
Data Byte2
y
b) The 4 low-order bits identify which channel this message belongs to (for 16 possible channels).
Note Off
&H8n
Key number
c) The 3 remaining bits hold the message. For a data byte, the most significant bit is set to 0.
Note On
&H9n
Key number
Note On velocity
&HAn
Key number
Amount
Control Change
&HBn
Controller num.
Controller value
P
Program
Change
Ch
&HC
&HCn
P
Program
number
b
N
None
Channel Pressure
&HDn
Pressure value
None
Pitch
tc Bend
e d
&HEn
&
MSB
S
LSB
S
44
www.jntuworld.com
T bl 6.4:
Table
6 4 MIDI mode
d messages
A.2.
A 2 Channel
Ch
l mode
d messages:
a)) Ch
Channell mode
d messages: special
i l case off the
th Control
C t l
Change message opcode B (the message is &HBn, or
1011nnnn).
b) However, a Channel Mode message has its first data byte
in 121 through 127 (&H79
(&H797F)
7F).
c) Channel mode messages determine how an instrument
processes MIDI voice messages: respond to all messages,
respond just to the correct channel, dont respond at all, or
ggo over to local control of the instrument.
Description
p
&H79
None; set to 0
&H7A
L l control
Local
t l
0 = off;
ff 127 = on
&H7B
None; set to 0
&H7C
None; set to 0
&H7D
Omni mode on
None; set to 0
&H7E
Controller number
&H7F
None; set to 0
46
B. System Messages:
B.1.
B
1 System
S
common messages: relate
l
to timing
i i
or
positioning.
Status Byte
&HF1
&HF2
Song Select
&HF3
Tune Request
&HF6
None
EOX (terminator)
&HF7
None
48
www.jntuworld.com
T bl 6.6:
Table
6 6 MIDI System
S t R
Real-Time
l Ti messages.
System Real-Time Message
Status Byte
Timing Clock
&HF8
Start Sequence
&HFA
Continue Sequence
&HFB
Stop Sequence
&HFC
Active Sensingg
&HFE
System Reset
&HFF
a)) Af
After the
h initial
i i i l code,
d a stream off any specific
ifi messages
can be inserted that apply to their own product.
b) A System Exclusive message is supposed to be terminated
y a terminator byte
y &HF7, as specified in Table 6.
by
c) The terminator is optional and the data stream may simply
b ended
be
d d by
b sending
di the
h status byte
b off the
h next message.
49
50
General MIDI
S
Some programs, suchh as early
l versions
i
off
Premiere, cannot include .mid files instead,
they insist on .wav
wav format files.
files
General MIDI Level2: An extended general MIDI has recently been defined, with a
standard
t d d .smf
f Standard
St d d MIDI File
Fil format
f
t defined
d fi d inclusion
i l i
off extra
t
character information, such as karaoke lyrics.
51
www.jntuworld.com
In general,
general producing quantized sampled output
for audio is called PCM (Pulse Code
M d l ti ) The
Modulation).
Th differences
diff
version
i is
i called
ll d
DPCM (and a crude but efficient variant is
called DM). The adaptive version is called
ADPCM.
54
(a)
(b)
Fig 6.2:
Fig.
6 2: Sampling and Quantization.
Quantization
56
www.jntuworld.com
a)) Th
The set off interval
i
l boundaries
b
d i are called
ll d decision
d ii
boundaries, and the representative values are called
reconstruction levels.
b) The boundaries for quantizer input intervals that will
all be mapped into the same output level form a coder
mapping.
c) The representative values that are the output values
from a q
quantizer are a decoder mapping.
pp g
d) Finally, we may wish to compress the data, by
assigning
i i a bit
bi stream that
h uses fewer
f
bi for
bits
f the
h most
prevalent signal values (Chap. 7).
57
58
59
60
www.jntuworld.com
www.jntuworld.com
H
However, there
h
are two small
ll wrinkles
i kl we must
also address:
1. Since only sounds up to 4 kHz are to be considered,
all other frequency content must be noise.
noise Therefore,
Therefore
we should remove this high-frequency content from
the analog input signal. This is done using a bandli iti filter
limiting
filt that
th t blocks
bl k outt high,
hi h as well
ll as very
low, frequencies.
Also, once we arrive at a pulse signal, such as that in
Fig. 6.13(a) below, we must still perform DA
conversion
i and
d then
h construct a final
fi l output analog
l
signal. But, effectively, the signal we arrive at is the
staircase shown in Fig.
g 6.13(b).
( )
61
Fig. 6.13: Pulse Code Modulation (PCM). (a) Original analog signal
and its corresponding PCM signals. (b) Decoded staircase signal. (c)
Reconstructed signal after low-pass filtering.
62
2 A discontinuous
2.
di
i
signal
i l contains
i
not just
j
frequency components due to the original signal,
but also a theoretically infinite set of higherhigher
frequency components:
Th
The complete
l
scheme
h
f
for
encoding
di
andd decoding
d di
telephony signals is shown as a schematic in Fig. 6.14.
As a result of the low
low-pass
pass filtering, the output becomes
smoothed and Fig. 6.13(c) above showed this effect.
A
Audio
di is
i often
f
storedd not in
i simple
i l PCM
C but
b
instead in a form that exploits differences
which
hi h are generally
ll smaller
ll numbers,
b
so offer
ff the
th
possibility of using fewer bits to store.
65
66
l
f n = an k f n k
(6.13)
k =1
l
f n = f n 1
en = f n l
fn
67
(6.12)
Multimedia Systems (eadeli@iust.ac.ir)
68
www.jntuworld.com
www.jntuworld.com
Th
The idea
id off forming
f
i differences
diff
i to make
is
k the
h histogram
hi
off
sample values more peaked.
(a) For example, Fig.6.15(a) plots 1 second of sampled speech at 8
kHz, with magnitude resolution of 8 bits per sample.
(b) A histogram of these values is actually centered around zero, as
in Fig. 6.15(b).
(c) Fig. 6.15(c) shows the histogram for corresponding speech
signal
g
differences: difference values are much more clustered
around zero than are sample values themselves.
(d) As a result,
result a method that assigns short codewords to frequently
occurring symbols will assign a short code to zero and do rather
well: such a coding scheme will much more efficiently code
sample
p differences than samples
p themselves.
69
70
O
One problem:
bl
suppose our integer
i
sample
l values
l
are in
i the
h range
0..255. Then differences could be as much as -255..255 weve
increased our dynamic range (ratio of maximum to minimum) by a
factor of two need more bits to transmit some differences.
differences
(a) A clever solution for this: define two new codes, denoted SU and SD,
standing
t di
f
for
Shift U and
Shift-Up
d Shift-Down.
Shift D
S
Some
special
i l code
d
values will be reserved for these.
(b) Then
Th
we can use codewords
d
d for
f only
l a limited
li it d sett off signal
i l
differences, say only the range 15..16. Differences which lie in the
limited range can be coded as is, but with the extra two values for SU,
g 15..16 can be transmitted as a series of
SD,, a value outside the range
shifts, followed by a value that is indeed inside the range 15..16.
((c)) For example,
p , 100 is transmitted as: SU,, SU,, SU,, 4,, where ((the codes
for) SU and for 4 are what are transmitted (or stored).
71
l
f n = ( f n 1 + f n 2 )
2
(6 14)
(6.14)
en = f n l
fn
72
Lets
L consider
id an explicit
li i example.
l Suppose
S
we wish
i h to code
d
the sequence f1, f2, f3, f4, f5 = 21, 22, 27, 25, 22. For the
ppurposes
p
of the ppredictor,, well invent an extra signal
g
value
f0, equal to f1 = 21, and first transmit this initial value,
uncoded:
l
f 2 = 21,
21 e2 = 22 21 = 1;
1
1
l
f3 = ( f 2 + f1 ) = (22 + 21) = 21,
2
2
e3 = 27 21 = 6;
1
1
l
f 4 = ( f3 + f 2 ) = (27 + 22) = 24,
24
2
2
e4 = 25 24 = 1;
1
1
l
f5 = ( f 4 + f3 ) = (25 + 27) = 26,
2
2
(6.15)
e5 = 22 26 = 4
73
74
DPCM
Differential
Diff
ti l PCM is
i exactly
tl the
th same as Predictive
P di ti
Coding, except that it incorporates a quantizer
step.
step
(a) One scheme for analytically determining the best set
of quantizer steps, for a non-uniform quantizer, is the
Lloyd-Max quantizer, which is based on a leastsquares minimization
i i i ti off the
th error term.
t
www.jntuworld.com
( ) DPCM
(c)
DPCM: form
f
the
h prediction;
di i
f
form
an error en by
b subtracting
b
i
the
h
prediction from the actual signal; then quantize the error to a quantized
ei
version, .
The set of equations that describe DPCM are as follows:
n
l
f n = function _ of ( if n 1 , if n 2 , if n 3 ,...) ,
en = f n l
fn ,
ein = Q[en ],
]
n =1
(6.16)
f n = fn + ein .
reconstruct: i
77
78
Since
Si
signal
i l differences
diff
are very peaked,
k d we could
ld model
d l them
h using
i
a Laplacian probability distribution function, which is strongly
peaked at zero: it looks like
min
i + N 1
(f
n =i
n Q[ f n ])
(6 17)
(6.17)
( x) = (1/ 2 2 )exp ( 2 | x | / )
for variance 2.
S
So typically
t i ll one assigns
i
quantization
ti ti
steps
t
f a quantizer
for
ti
with
ith
nonuniform steps by assuming signal differences, dn are drawn from
such a distribution and then choosing steps to minimize
min
i + N 1
(d
n =i
79
(6.18)
Q[d n ]) l (d n ).
2
80
(6.19)
www.jntuworld.com
This
Thi is
i a least-squares
l
problem,
bl
andd can be
b solved
l d iteratively
i
i l
== the Lloyd-Max quantizer.
f n fn , is
Notice
N i that
h the
h quantization
i i noise,
i
i equall to the
h quantization
i i
e
e
effect on the error term, n n .
(6.19)
so that
th t en = f n fn is
i an integer.
i t
As well,, use the qquantization scheme:
Fig.
g 6.17: Schematic diagram
g
for DPCM encoder and decoder
81
(6.20)
82
Table
T bl 6.7
6 7 gives
i
output values
l
f any off the
for
h input
i
codes:
d 4-bit
4 bi codes
d are mapped
d to 32
reconstruction levels in a staircase fashion.
83
84
Table 6.7
6 7 DPCM quantizer reconstruction levels.
levels
en in range
Quantized to value
-255
255 .. -240
240
-239 .. -224
.
.
.
-31 .. -16
-15 .. 0
1 .. 16
17 .. 32
.
.
.
225 .. 240
241 .. 255
-248
248
-232
.
.
.
-24
-8
8
24
.
.
.
232
248
www.jntuworld.com
As
A an example
l stream off signal
i l values,
l
consider
id the
h set off values:
l
f1
f2
f3
f4
f5
130
150
140
200
300
DM
DM (Delta Modulation):
Mod lation): simplified version
ersion of DPCM.
DPCM Often used
sed as a quick
q ick
AD converter.
Prepend extra values f = 130 to replicate the first value, f1. Initialize with quantized
error ei1 0, so that the first reconstructed value is exact: i
f=1 130. Then the rest of
the values calculated are as follows (with prepended values in a box):
l
f = 130,
e =
e =
i
f =
130,
142, 144, 167
0 , 20, 2, 56, 63
0 , 24, 8, 56, 56
130, 154, 134, 200, 223
1
1.
Uniform-Delta
Uniform
Delta DM: use only a single quantized error value,
value either positive
or negative.
(a) a 1-bit
b t code
coder.. Produces
oduces coded output tthat
at follows
o ows tthee o
original
g a ssignal
g a in a
staircase fashion. The set of equations is:
fn = fn 1 ,
en = f n fn = f n fn 1 ,
On the decoder side, we again assume extra values f equal to the correct value f 1 ,
so that the first reconstructed value i
f 1 is correct. What is received is ein , and the
f n is identical to that on the encoder side,
reconstructed i
side provided we use exactly
the same prediction rule.
N t that
Note
th t the
th prediction
di ti simply
i l involves
i l
a delay.
d l
85
(b) Consider
C id actuall numbers:
b
S
Suppose
signal
i l values
l
are
f1
86
f2
f3
f4
10
11
13
15
i
As well, define an exact reconstructed value f 1 = f1 = 10 .
(c) E.g.,
E g use step value k = 4:
e2 = 11 10 = 1,
e3
3 = 13 14 = 1,
1
e4 = 15 10 = 5,
The reconstructed set of values 10, 14, 10, 14 is close to the correct set 10, 11, 13,
15.
(d) However, DM copes less well with rapidly changing signals. One approach to
mitigating this problem is to simply increase the sampling, perhaps to many times
the Nyquist rate.
87
88
www.jntuworld.com
ADPCM
ADPCM (Adaptive
(Ad ti DPCM) takes
t k the
th idea
id off adapting
d ti the
th
coder to suit the input much farther. The two pieces that
make up a DPCM coder: the quantizer and the predictor.
1. In Adaptive DM, adapt the quantizer step size to suit the input. In
DPCM we can change the step size as well as decision
DPCM,
boundaries, using a non-uniform quantizer.
We can carry this out in two ways:
(a) Forward adaptive quantization: use the properties of the input
signal.
(b) Backward adaptive quantizationor: use the properties of the
quantized output. If quantized errors become too large, we should
g the non-uniform q
quantizer.
change
89
2 We
2.
W can also
l adapt
d
the
h predictor,
di
again
i using
i forward
f
d
or backward adaptation. Making the predictor
coefficients adaptive
p
is called Adaptive
p
Predictive
Coding (APC):
( ) Recall
(a)
ll that
h the
h predictor
di
i usually
is
ll taken
k to be
b a linear
li
f n.
function of previous reconstructed quantized values, i
(b) The number of previous values used is called the order of
the predictor. For example, if we use M previous values, we
need M coefficients ai, i = 1..M in a ppredictor
M
fn = ai fn i
i =1
(6 22)
(6.22)
90
H
However we can get into
i
a difficult
diffi l situation
i i if we try to change
h
the
h
prediction coefficients, that multiply previous quantized values,
because that makes a complicated set of equations to solve for these
coefficients:
(a) Suppose we decide to use a least-squares approach to solving a
minimization
i i i i trying
i to find
fi d the
h best
b values
l
off the
h ai:
((c)) Instead,
I
d one usually
ll resorts to solving
l i the
h simpler
i l
problem that results from using not in thei
f prediction,
but instead simply
p y the signal
g
fn itself. Explicitly
p
y
writing in terms of the coefficients ai, we wish to
solve:
n
min ( f n fn ) 2
((6.23))
n =1
(b) Here we would sum over a large number of samples fn, for the current
f n depends on the quantization we
patch of speech, say. But because l
have a difficult problem to solve. As well, we should really be changing
the fineness of the qquantization at the same time,, to suit the signals
g
changing nature; this makes things problematical.
91
n =1
i =1
min ( f n ai f n i ) 2
(6.24)
www.jntuworld.com
Fi
Fig. 6.18
6 18 shows
h
a schematic
h
i diagram
di
f the
for
h ADPCM
coder and decoder:
www.jntuworld.com