Hi everyone ... Is there any way to interact and modify (or create a new script from scratch) the gh way of getting the harmonics ... ? I am just wondering if there is a way to make my own gh function, trying to get more than 16 ghs, (let's say 32) ... And Is fourier series and transforms with recursion the best way to make periodic functions other than sin ??I came up with this but the CPU is tearing the animation down ... ;; tri.scm ;; amp = 1, period = 2*pi
(define tri
(lambda (t)
(define pi
3.141592)
(define sum
(lambda (n)
(cond
((= n 0)
0)
(else
(+
(/
(cos (* t n))
(expt n 2))
(+
(expt -1 n)
-1))
(sum (- n 1)))))))
(+
1/2
(*
(/ 2 (expt pi 2))
(sum 50))))) ;; 50 time evaluated…
;; testing the functionn …
(every-frame
(with-state
(display (tri (time)))
(newline)))
