Page 2 of 2

Re: Track sampling rate question.

Posted: Wed Jul 14, 2010 11:19 pm
by endolith
mszlazak wrote:

Code: Select all

;; RMS -- compute the RMS of a sound
;;
(defun rms (s &optional (rate 100.0) window-size)
  (let (rslt step-size)
    (setf step-size (round (/ (snd-srate s) rate)))
    (cond ((null window-size)
               (setf window-size step-size)))
    (setf s (prod s s))
    (setf result (snd-avg s window-size step-size OP-AVERAGE))
        ;; compute square root of average
        (s-exp (scale 0.5 (s-log result)))))
Where did you find this code?

Re: Track sampling rate question.

Posted: Wed Jul 14, 2010 11:30 pm
by steve
mszlazak has not posted on the forum for over a year.