;;; ;;; Simple demonstration of one pole filter ;;; nando, October 28 1996 ;;; (definstrument rawnoise(start-time duration amplitude) (multiple-value-bind (beg end) (get-beg-end start-time duration) (let* ((noise (make-randh :frequency (* 0.49 sampling-rate) :amplitude amplitude))) (Run (loop for i from beg to end do (outa i (randh noise))))))) (definstrument onepole(start-time duration amplitude &key (b1 '(0 0.5 1 0.5))) (multiple-value-bind (beg end) (get-beg-end start-time duration) (let* ((noise (make-randh :frequency (* 0.49 sampling-rate) :amplitude amplitude)) (b1-env (make-env :envelope b1)) (opfilt (make-one-pole :a0 1.0 :b1 0.5))) (Run (loop for i from beg to end do (setf (smpflt-b1 opfilt) (env b1-env)) (outa i (one-pole opfilt (randh noise))))))))