Digital Sound & Music: Concepts, Applications, & Science, Chapter 5, last updated 6/25/2013

10

sound clip with a narrow dynamic range has a much smaller difference between the loud and

quiet parts. In this usage of the term dynamic range, we’re focusing on the dynamic range of a

particular occurrence of sound or music.

Figure 5.10 Music with a wide dynamic range

In another usage of

the term, the potential

dynamic range of a digital

recording refers to the

possible range of high and

low amplitude samples as a

function of the bit depth.

Choosing the bit depth for a

digital recording

automatically constrains the

dynamic range, a higher bit

depth allowing for a wider

dynamic range.

Consider how this

works. A digital recording

environment has a

maximum amplitude level

that it can record. On the

scale of n-bit samples, the

maximum amplitude (in

magnitude) would be .

The question is this: How far,

Aside:

MATLAB Code for Figure 5.11 and Figure 5.12:

hold on;

f = 440;T = 1/f;

Bdepth = 3; bit depth

Drange = 2^(Bdepth-1); dynamic range

axis = [0 2*T -(Drange+1) Drange+1];

SRate = 44100; %sample rate

sample_x = (0:2*T*SRate)./SRate;

sample_y = Drange*sin(2*pi*f*sample_x);

plot(sample_x,sample_y,'r-');

q_y = round(sample_y); %quantization value

for i = 1:length(q_y)

if q_y(i) == Drange

q_y(i) = Drange-1;

end

end

plot(sample_x,q_y,'-')

for i = -Drange:Drange-1 %quantization level

y = num2str(i); fplot(y,axis,'k:')

end

legend('Sample wave','Quantization

wave','Quantization level')

y = '0'; fplot(y,axis,'k-')

ylabel('amplitude');xlabel('time in seconds');

hold off;