[PD] better tabread4~
Charles Henry
czhenry at gmail.com
Mon Jun 30 03:45:40 CEST 2008
okay, so here's what I came up with...
For the original tabread4~, the impulse response and its Fourier Transform:
g(t)= I[-2,2](t)*(-1/6*|t|^3 - 2*t^2 - 11/6*|t| + 1)
+ I[-1,1](t)*(2/3*|t|^3 - 2*t^2 + 4/3*|t|)
G(w)= (1/w^2)*(1/3*cos(2w) - 4/3*cos(w) + 1)
+ (1/w^4)*(2*cos(2w) - 8*cos(w) + 6)
and for the most recent version of tabread4c~
h(t)= I[-2,2](t)*(-1/2*|t|^3 + 5/2*t^2 - 4*|t| + 2)
+ I[-1,1](t)*( 2*|t|^3 - 5*t^2 + 4*|t| - 1)
H(w)= (1/w^3)*(2*sin(2*w) - 4*sin(w))
+ (1/w^4)*(18 - 24*cos(w) + 6*cos(2*w))
The graphs shown indicate that tabread4c~ has a faster frequency
rolloff (at a maximum rate corresponding to the 1/w^3 term). The
frequency response for tabread4~ is shown in red, and tabread4c~ is
shown in blue.
The y-axis is dB attenuation, and the x axis is a logarithmic scale
for frequency. 0 corresponds to the location of the Nyquist
frequency, and each increment corresponds to an octave.
The plot was generated with Octave, and the code is below:
f=pi/16:pi/1024:32*pi;
g=1./f.^2.*(1/3*cos(2*f)-4/3*cos(f) + 1) + 1./f.^4.*(2*cos(2*f) - 8*cos(f)+6);
h=1./f.^3.*(2*sin(2*f)-4*sin(f)) + 1./f.^4.*(18-24*cos(f)+6*cos(2*f));
plot(log(f/pi)/log(2), 20*log(g+0.00001)/log(10))
hold on
plot(log(f/pi)/log(2), 20*log(h+0.00001)/log(10),'b')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spectrum.png
Type: image/png
Size: 8925 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080629/a1b73e6c/attachment.png>
More information about the Pd-list
mailing list