;; the animation callback - remember this is in scheme, not xtlang
(define spectrum-animation
(lambda (time fps)
(gl_draw (mag_spectrum.spectrum) (mag_spectrum.nbins))
(gl:swap-buffers ctx)
(callback (+ time (* 0.5 (/ *samplerate* fps)))
'spectrum-animation
(+ time (/ *samplerate* fps))
fps)))