Zero-crossing finding functions

Never mind, bad idea.

Here’s a tiny and reasonably efficient function for finding the number of zero crossings per second (not necessarily the frequency).
It’s good for up to a few seconds of audio.

;;; number of zero crossings per second
(defun zcps (sig)
  (let ((dur (/ (snd-length sig ny:all)(snd-srate sig)))
        (beh (control-srate-abs *sound-srate* (const 1))))
    (/ (peak (trigger sig beh) ny:all) dur)))

; test it on a mono selection:
(zcps s)