ls
. EnvelopeDetector.m diary
.. FMFeedback.asv makeLowPass.m
AM.m FMFeedback.m playSig.m
AnalogMod.asv PlotFT.m rexkwondo.wav
AnalogMod.m VCO.asv
EnvelopeDetector.asv VCO.m
[s,fs,nbits] = wavread('rexkwondo.wav');
fs
fs =
11025
su=interp(s,4);
fs=4*fs
fs =
44100
p = audioplayer(su, fs);
play(p)
bLP=makeLowPass(100, 2000, 200, fs);
freqz(bLP)
sul = filter(bLP,[1],su);
help filter
FILTER One-dimensional digital filter.
Y = FILTER(B,A,X) filters the data in vector X with the
filter described by vectors A and B to create the filtered
data Y. The filter is a "Direct Form II Transposed"
implementation of the standard difference equation:
a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
- a(2)*y(n-1) - ... - a(na+1)*y(n-na)
If a(1) is not equal to 1, FILTER normalizes the filter
coefficients by a(1).
FILTER always operates along the first non-singleton dimension,
namely dimension 1 for column vectors and non-trivial matrices,
and dimension 2 for row vectors.
[Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final
conditions, Zi and Zf, of the delays. Zi is a vector of length
MAX(LENGTH(A),LENGTH(B))-1, or an array with the leading dimension
of size MAX(LENGTH(A),LENGTH(B))-1 and with remaining dimensions
matching those of X.
FILTER(B,A,X,[],DIM) or FILTER(B,A,X,Zi,DIM) operates along the
dimension DIM.
See also filter2 and, in the Signal Processing Toolbox, filtfilt.
Overloaded functions or methods (ones with the same name in other directories)
help timeseries/filter.m
help gf/filter.m
help channel/filter.m
help mfilt/filter.m
help adaptfilt/filter.m
help qfilt/filter.m
help fints/filter.m
help dfilt/filter.m
Reference page in Help browser
doc filter
p = audioplayer(sul, fs);
play(p)
PlotFT(sul,fs)
max(abs(sul))
ans =
0.8560
tt=(1:length(sul))/fs;
tt=tt';
AMSig = (1+sul).*cos(2*pi*2500*tt);
p = audioplayer(AMSig, fs);
play(p)
PlotFT(AMSig,fs)
plot(tt,sul)
plot(tt,AMSig)
plot(tt,sul.*cos(2*pi*2500*tt))
plot(tt,AMSig)
absAMSig = abs(AMSig);
PlotFT(absAMSig,fs)
rsul = filter(bLP,[1],absAMSig);
p = audioplayer(rsul, fs);
play(p)
rsul = filter(bLP,[1],rsul);
PlotFT(rsul,fs)
rsul=rsul-mean(rsul);
PlotFT(rsul,fs)
p = audioplayer(rsul, fs);
play(p)
bLP=makeLowPass(101, 2000, 200, fs);
freqz(bLP)
AMSig2 = (1+sul).*cos(2*pi*6500*tt);
TwoAMSigs = AMSig+AMSig2;
PlotFT(TwoAMSigs,fs)
tone = VCO(1000,1,100,zeros(fs,1),fs);
p = audioplayer(tone, fs);
play(p)
m=sin(2*pi*10*(1:fs)/fs);
tone = VCO(1000,1,100,m,fs);
p = audioplayer(tone, fs);
play(p)
spectrogram(tone,128,64,128,fs)
tone = VCO(2000,1,1000,m,fs);
spectrogram(tone,128,64,128,fs)
p = audioplayer(tone, fs);
play(p)
FMSig = VCO(2000,1,1000,sul,fs);
spectrogram(FMSig,128,64,128,fs)
p = audioplayer(FMSig, fs);
play(p)
dFMSig = diff(FMSig);
plot(dFMSig)
rFM = EnvelopeDetector(dFMSig,bLP);
plotFT(rFM,fs)
p = audioplayer(rFM, fs);
play(p)
diary