Code covered by the BSD License  

Highlights from
Audio Filter GUI DEMO

image thumbnail

Audio Filter GUI DEMO

by

 

23 Apr 2008 (Updated )

This demo provides a simple GUI for basic filtering of audio data.

generateBandPassFilter(Fpass1, Fstop1, Fpass2, Fstop2, Fs, N)
function Hd = generateBandPassFilter(Fpass1, Fstop1, Fpass2, Fstop2, Fs, N)

Dstop1 = 0.001;           % First Stopband Attenuation
Dpass  = 0.057501127785;  % Passband Ripple
Dstop2 = 0.0001;          % Second Stopband Attenuation
dens   = 20;              % Density Factor

% Calculate the order from the parameters using FIRPMORD.
[N, Fo, Ao, W] = firpmord([Fstop1 Fpass1 Fpass2 Fstop2]/(Fs/2), [0 1 0], [Dstop1 Dpass Dstop2]);

% Calculate the coefficients using the FIRPM function.
b  = firpm(N, Fo, Ao, W, {dens});
Hd = b;

Contact us