P. 1
Audio Processing Using Matlab

# Audio Processing Using Matlab

|Views: 10|Likes:

See more
See less

03/04/2013

pdf

text

original

# Audio processing using Matlab

Elena Grassi

Sampling • Read values from a continuous signal • Equally spaced time interval (sampling frequency) .

Spectrogram • Short time Fourier transform • Tradeoff frequency/time resolution. 256. fs) title('Spectrogram [dB]') Note: dB= 20*log10 () . specgram(y.

clear AO .'Manual') putdata(AO.5) delete(AO).'SampleRate'. addchannel(AO.1).22050) set(AO.D/A (digital in/analog out) AO = analogoutput('winsound').x) start(AO) trigger(AO) waittilstop(AO. set(AO.'TriggerType'.

• Minimum sampling required to capture the signal accurately: Nyquist frequency= 2*BW • If not possible. apply antialiasing filter.Aliasing • When sampling is too slow for a signal’s BW. . high frequency content cannot be observed and it leaks into lower frequencies. thus distorting the signal.

normalized wrt ½ sampling frequency.Filters Modify frequency content of signals. Classification according to their pass/stop bands: • Lowpass (smoothing filter) • Highpass • Bandpass • Stopband Specify corner frequency(ies). . Example: 2000/(fs/2) for 2000 Hz.

Example 7 6 5 signal LP filter 4 3 2 1 0 0 2000 4000 6000 f [Hz] 8000 10000 12000 .

• Butterworth: flat and monotonic. • Chebyshev II: monotonic in passband and equiripple in stopband. phase: • Bessel: linear phase. flatness. sacrifice roll-off steepness.Filter Types Classification according to their roll-off. . preserves wave shape. roll off slower than type I. • Chebyshev I: equiripple in passband and monotonic in stopband.

a]= butter(6.Example [b.2000*2/fsi. sampling freq corner freq order b= numerator polynomial in z a= denominator polynomial in z .'low').

'r') xlabel('f [Hz]') title('Filter frequency response') . H=(abs(fft(h))).Filter frequency response h= impz(b.a. plot(fscale. fscale= fsi/N*(1:N/2).N).H(1:N/2).

Filter order • Related to complexity (hardware or numerical) and how many samples of data are used. • Higher order <-> Steepness • Trade off with complexity/numerical stability .

scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->