17.01.2015 Views

Basic Digital Audio Effects

Basic Digital Audio Effects

Basic Digital Audio Effects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Wah-wah Code Explained (Cont.)<br />

Creation of triangle waveform we have seen previously— see<br />

waveforms.m.<br />

• Slight modification of this code here to allow ’frequency values’<br />

(Y-axis amplitude) to vary rather than frequency of the triangle<br />

waveform — here the frequency of the modulator wave is<br />

determined by wah-wah rate, F w, usually a low frequency:<br />

% min and max centre cutoff frequency of variable bandpass filter<br />

minf=500; maxf=3000;<br />

% wah frequency, how many Hz per second are cycled through<br />

Fw = 2000;<br />

CM0268<br />

MATLAB<br />

DSP<br />

GRAPHICS<br />

361<br />

% change in centre frequency per sample (Hz)<br />

delta = Fw/Fs;<br />

% create triangle wave of centre frequency values<br />

Fc=minf:delta:maxf;<br />

while(length(Fc) < length(x) )<br />

Fc= [ Fc (maxf:-delta:minf) ];<br />

Fc= [ Fc (minf:delta:maxf) ];<br />

end<br />

% trim tri wave to size of input<br />

Fc = Fc(1:length(x));<br />

1<br />

◭◭<br />

◮◮<br />

◭<br />

◮<br />

Back<br />

Close

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!