The premise of this exercise is, that a sample-rate
of 96kHz is assumed, and that all 67 frequencies
from 300Hz to 20.1kHz will be phase-delayed by 90 degrees.
Therefore, a Discrete Sine Transform is to result
in the suitable convolution.
(%i1) | conv: []; |
(%i2) |
for i: 1 thru 320 do conv: cons(0, conv); |
(%i3) |
for k: 0 thru 159 do for n: 0 thru 67 do block ( conv[160 + k]: conv[160 + k] + (sin((n*k*%pi)/160) / 160), conv[160 - k]: conv[160 - k] - (sin((n*k*%pi)/160) / 160) ); |
(%i4) | load(draw)$ |
(%i5) |
ToPoints() := makelist([i, conv[i]], i, 140, 180); |
(%i6) |
wxdraw2d( point_type = filled_circle, point_size = 0.5, points_joined = true, points(ToPoints()) )$ |
(%i7) |
float([conv[156], conv[157], conv[158], conv[159], conv[160], conv[161], conv[162], conv[163], conv[164]]); |
(%i8) | F(x) := (1 - cos(x*%pi)) / (x*%pi + (signum(x) * 0.002) + 0.001); |
(%i9) | G(x) := sin(x) / x; |
(%i10) | G_a(x) := G((abs(x) * %pi) + 0.001); |
(%i11) | wxplot2d([F(x), G_a(x)], [x,-8,8])$ |
An interestting fact to point out would be, that
an amplitude-uniform 90-degree phase-shift will
always be possible, only down to some lowest
frequency. The continuous function above, only
guarantees that this will work down to 3kHz.
(%i12) | float([F(0.5) - F(1.5), F(2.5) - F(3.5)]); |
(%i13) | float([F(1) - F(3), F(5) - F(7)]); |