IT-Universitetet /Kurser E2004 /Introduktion til multimediesystemer

Exercise: Sound and Hearing


 

Theoretical Exercises

Background:

When the work on the Øresundsforbindelse was commissioned a report was made, giving recommended thresholds for the noise from the work reaching the various neighbors of the work site (see table below).

Weekdays during 7 am to 6 pm 70 dB
Outside the above mentioned period 40 dB
Maximum allowable noise after the Øresundsforbindelse is taken into use 55 dB

Problem 1:

How many times greater is the allowable sound pressure during work hours than the allowable sound pressure outside this period? Does your result support the rule that the SPL ( Sound Pressure Level ) doubles for each additional 6 dB?

Problem 2:

The recommended maximum noise level after the bridge is in use, is the total noise emitted from both trains and cars using the bridge. Assume that at some house near the bridge the noise from the trains is measured to 53 dB, whereas the noise from the cars is measured to 50 dB. Is the recommended maximum noise level exceeded at this particular house ( usethe table above as reference ) ?

Problem 3:

An earpiece uses a large window to capture sound and a small window set to the ear to amplify sound. Assuming both windows are circular, what is the size of the outer window needed to amplify with a factor of 10 if the inner window is 2 cm (Hint: Express the relation as a formula, since not all the parameters are given).


Practical Exercises

Exercise 1:

This exercise illustrates two parameters

  1. Sampling rate
  2. Quantization parameters

Record a few seconds of speech (singing, whistling…) using the MATLAB function 'wavrecord' (just download the function recorder.m unless you want to implement it yourself ).You can play the signal back using ‘wavplay'.

Try using different sampling rates and quantization levels ( ‘uint8', ‘int16', …) and remark on the results in terms of sound quality.

function recorder(sr,n)

% This simple program allows You to record a signal, to plot it and to play it back
% sr is the samplingrate
% Standard sampling rates for PC-based audio hardware are 8000, 11025, 2250, and 44100 Hz

close all;
  if (nargin==0)
  sr = 11025;
  n = 4;
end

% Recording the signal

sig = wavrecord(n*sr,sr,'uint8');
plot(sig);
disp('Press a key');
pause

% Playing the signal back<>

wavplay(sig,sr);

 

Exercise 2:

In this exercise we will examine whether the frequency of a pure tone has influence on our ability to discern it from background noise. We will use vectors to hold samples. The Matlab command sound can be used to play samples.

You can get help on how the sound command works by typing

help sound

on the matlab prompt. You can get help on any matlab command by typing help. 

It clips the sample so that the amplitude of the signal is in the range [-1, 1]. We make a sample of noise by generating a series of random numbers in this range. You can do this by typing the following two lines on the matlab prompt.

x=random('Uniform',-1,1,1,8001);
sound(x,8001);

The first line produces an array of 8000 random numbers drawn;uniformly; from the interval -1 to 1. This has the effect of producing noise. The above lines of commands thus produces a noise sampled at 8 KHz

You can get the help of the random function by typing:

help random

You can display the noise signal by writing:

plot(x);

We can use Matlab to make pure tones. Take a look at the function puretone.m, and spend some time understanding it. You should save the file somewhere in you home directory.

Use the function to make pure tones sampled at 8 KHz. You can change the volume and frequency by adjusting the parameters vol and f. Combine the pure tones with the noise by adding the two samples:

s=puretone(1.0,8000,f,vol); y=x+s;
sound(y,8001); 

Experiment with different volumes. At what volume is it no longer possible to discern the pure tone from the background noise? Has the frequency of the pure tone any influence on the volume thus found?

 

 

 

 


Updated 2004-08-09

til top