[Fluxus] fft and gh inquiries, periodic functions.

Jaime Jalil Ramírez Franco bring.one at hotmail.com
Sun Aug 28 18:54:10 PDT 2011


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)))
  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20110828/04395962/attachment-0001.htm>


More information about the Fluxus mailing list