eek
03-19-2007, 12:32 AM
So decided to share to simple fourier transforms for you guy's to use if you need them:
Square wave:
A sgn [sin(2pi(x-x0/T)] - so sgn is a sign function (it denotes n/|n| or n/ abs(n))
T = time interval such as NT, F or slidertime
A = amplitude
x,x0 = amount and offset
n = (sin((2*pi*(x-x0))/T))
A* n/abs(n)
Sawtooth wave:
x/2L - |_ x/2L _| - |_ x/2L _| denotes the floor function of x.
x = f -- time
L = 1 --amount
x/2*L - abs (x/2*L)
Triangle Wave:
This is easy so i dont need the pure math, because its the same:
x = F
(2/pi)* asin (sin(pi*x))
Full rectified sine wave:
This gets complicated as it need summation of i,0= inf i.e from 1 to infinity so i do a little less. :)
t = F
A = amplitude
n = 1
e = 0
for n = 1 to 30 do
(
e = e + (cos(n*omega*t))/((n^2)-1))
)
((2*A)/pi)-((4*A)/pi) * e
I'll put some more up if you guy's need them.
cheers,
Square wave:
A sgn [sin(2pi(x-x0/T)] - so sgn is a sign function (it denotes n/|n| or n/ abs(n))
T = time interval such as NT, F or slidertime
A = amplitude
x,x0 = amount and offset
n = (sin((2*pi*(x-x0))/T))
A* n/abs(n)
Sawtooth wave:
x/2L - |_ x/2L _| - |_ x/2L _| denotes the floor function of x.
x = f -- time
L = 1 --amount
x/2*L - abs (x/2*L)
Triangle Wave:
This is easy so i dont need the pure math, because its the same:
x = F
(2/pi)* asin (sin(pi*x))
Full rectified sine wave:
This gets complicated as it need summation of i,0= inf i.e from 1 to infinity so i do a little less. :)
t = F
A = amplitude
n = 1
e = 0
for n = 1 to 30 do
(
e = e + (cos(n*omega*t))/((n^2)-1))
)
((2*A)/pi)-((4*A)/pi) * e
I'll put some more up if you guy's need them.
cheers,
