Professional Documents
Culture Documents
(131085)
Theory:
Wah-wah is an imitative word for the sound of altering the resonance of musical notes to extend
expressiveness, sounding much like a human voice saying the syllable wah. The wah-wah effect
is a spectral glide, a "modification of the vowel quality of a tone"
The speed of the wah, the centre frequency of the filter, and how the centre frequency is moved
up and down in frequency are the effect variables. A 2nd order tunable bandpass filter has been
implemented based on that described in Mitra. This is shown in block form in Figure 10. This
implementation allows two variables control the effect. a controls the bandwidth, and b the
centre frequency of the filter.
CODE:
clear all;
close all;
infile = 'acoustic.wav';
[ x, Fs, N ] = wavread(infile);
damp = 0.05;
minf=500;
maxf=3000;
Fw = 2000;
delta = Fw/Fs;
Fc=minf:delta:maxf;
while(length(Fc) < length(x) )
Fc= [ Fc (maxf:-delta:minf) ];
Fc= [ Fc (minf:delta:maxf) ];
end
Fc = Fc(1:length(x));
F1 = 2*sin((pi*Fc(1))/Fs);
Q1 = 2*damp;
yh=zeros(size(x));
yb=zeros(size(x));
yl=zeros(size(x));
yh(1) = x(1);
yb(1) = F1*yh(1);
yl(1) = F1*yb(1);
for n=2:length(x),
F1 = 2*sin((pi*Fc(n))/Fs);
end
maxyb = max(abs(yb));
yb = yb/maxyb;
wavwrite(yb, Fs, N, 'out_wah.wav');
figure(1)
hold on
plot(x,'r');
plot(yb,'b');
wavplay(yb);
title('Wah-wah and original Signal');