autowha.lsp Version 1.00 30 March 2005 Author Steven Jones Contact jones57@swbell.net include the word "nyquist" in subject line The contents of this file are released under the terms of the GNU General Public License. See the file LICENSE.txt AUTOWHA NOT OTTAWA, An LFO controlled filter effect.
function
(autowha asig dur [:awmode][:awbw][:awf1][:awf2][:awfrq][:awdelay][:awattack][:awdecay][:awtab][:awphase]);; An lfo controlled filter effect. asig - Sound. The source signal dur - Flonum. The duration of asig in seconds. :awmode - Symbol. The filter mode. Valid values are: 'BYPASS - no effect 'BP - Band pass (the default) 'BR - Band relect 'HP - Highpass 'LP - Lowpass :awbw - Flonum. Filter bandwidth, ignored in BPASS, HP and LP modes. Default 400 :awf1 - Flonum. The minimum filter frequency, default 500hz :awf2 - Flonum. The maximum filter frequency, default 5khz :awfrq - Flonum. The LFO frequency, default 5Hz :awdelay - Flonum. The LFO onset delay, defualt 0 sec. :awattack - Flonum. The LFO onset attack time, default 0.5 sec :awdecay - Flonum. The LFO decay time, default 0.5 sec :awtab - Table. The LFO wave table, default *sine-table* :awphase - Flonum. The LFO phase, default 0 return - Sound | Sound vector.
;; autowha.lsp ;; Version 1.00 30 March 2005 ;; Author Steven Jones ;; ;; Contact jones57@swbell.net include the word "nyquist" in subject line ;; ;; The contents of this file are released under the terms of the GNU General ;; Public License. See the file LICENSE.txt ;; ;; AUTOWHA NOT OTTAWA, An LFO controlled filter effect. (require 'dlfo) (provide 'autowha) (defun autowha:ctrl (csig f1 f2) (let (m) (setf m (* 0.5 (- f1 f2))) (sum (+ f1 m)(scale m csig)))) (defun autowha:efx (asig csig f1 f2 &optional (mode 'BP)(bw 400)) (cond ((eq mode 'BYPASS) asig) ((eq mode 'BP)(reson asig (autowha:ctrl csig f1 f2) bw 1)) ((eq mode 'BR)(areson asig (autowha:ctrl csig f1 f2) bw 1)) ((eq mode 'HP)(hp asig (autowha:ctrl csig f1 f2) bw 1)) (t (lp asig (autowha:ctrl csig f1 f2) bw 1)))) ;; @doc function autowha ;; (autowha asig dur [:awmode][:awbw][:awf1][:awf2][:awfrq][:awdelay][:awattack][:awdecay][:awtab][:awphase]);; An lfo controlled filter effect. ;; ;; asig - Sound. The source signal ;; dur - Flonum. The duration of asig in seconds. ;; :awmode - Symbol. The filter mode. Valid values are: ;; 'BYPASS - no effect ;; 'BP - Band pass (the default) ;; 'BR - Band relect ;; 'HP - Highpass ;; 'LP - Lowpass ;; ;; :awbw - Flonum. Filter bandwidth, ignored in BPASS, HP and LP modes. ;; Default 400 ;; ;; :awf1 - Flonum. The minimum filter frequency, default 500hz ;; ;; :awf2 - Flonum. The maximum filter frequency, default 5khz ;; ;; :awfrq - Flonum. The LFO frequency, default 5Hz ;; ;; :awdelay - Flonum. The LFO onset delay, defualt 0 sec. ;; ;; :awattack - Flonum. The LFO onset attack time, default 0.5 sec ;; ;; :awdecay - Flonum. The LFO decay time, default 0.5 sec ;; ;; :awtab - Table. The LFO wave table, default *sine-table* ;; ;; :awphase - Flonum. The LFO phase, default 0 ;; ;; return - Sound | Sound vector. ;; defun autowha (asig dur &key awmode awbw awf1 awf2 awfrq awdelay awattack awdecay awtab awphase) (let nil (setf awmode (or awmode 'BP)) (setf awbw (or awbw 400)) (setf awf1 (or awf1 500)) (setf awf2 (or awf2 5000)) (setf awfrq (or awfrq 5.00)) (setf awdelay (or awdelay 0)) (setf awattack (or awattack 0.5)) (setf awdecay (or awdecay 0.5)) (setf awtab (or awtab *sine-table*)) (setf awphase (or awphase 0)) (if (eq awmode 'BYPASS) asig (autowha:efx asig (dlfo awfrq dur :delay awdelay :attack awattack :decay awdecay :tab awtab :phase awphase) awf1 awf2 awmode awbw))))