Main Page       Index


ulfo.lsp


 ulfo.lsp
 Version 1.00  31 October 2004
 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

 An unsigned LFO


function

ulfo

 (ulfo  frq [:amp][:dur][:tab][:phase])
 An unsigned LFO

 frq    - flonum. The signals frequency in Hertz.

 :amp   - flonum. The half cycle amplitude of the signal. The polarity of
          the result has the same sign as amp. Default +1

 :dur   - flonum. The signals duration in seconds. Default 1.00

 :tab   - table. The wave table. Default *sine-table*

 :phase - any. See phase function in utilites.lsp,  default 0

 return - sound.


function

ulfob

 (ulfob  frq [:amp][:dur][:tab][:phase][:bias])
 Version of ULFO with additional bias argument.

 frq    - flonum. The signals frequency in Hertz.

 :amp   - flonum. The half cycle amplitude of the signal. The polarity of
          the result has the same sign as amp. Default +1

 :dur   - flonum. The signals duration in seconds. Default 1.00

 :tab   - table. The wave table. Default *sine-table*

 :phase - any. See phase function in utilites.lsp,  default 0

 :bias  - flonum. Constant value added to signal. Default 0.5

 return - sound.


View the Sourcecode :



;; ulfo.lsp
;; Version 1.00  31 October 2004
;; 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
;;
;; An unsigned LFO
;; 

(provide 'ulfo)
(current-file "ulfo")


;; @doc function  ulfo
;; (ulfo  frq [:amp][:dur][:tab][:phase])
;; An unsigned LFO
;;
;; frq    - flonum. The signals frequency in Hertz.
;;
;; :amp   - flonum. The half cycle amplitude of the signal. The polarity of
;;          the result has the same sign as amp. Default +1
;;
;; :dur   - flonum. The signals duration in seconds. Default 1.00
;;
;; :tab   - table. The wave table. Default *sine-table*
;;
;; :phase - any. See phase function in utilites.lsp,  default 0
;;
;; return - sound.
;;

(defun ulfo (frq &key amp dur tab phase)
  (let* ((amp (or amp 1))
	 (dur (or dur 1))
	 (tab (or tab *sine-table*)))
    (sim (scale amp (lfo frq dur tab (phase phase)))
	 (rgate dur amp))))


;; @doc function  ulfob
;; (ulfob  frq [:amp][:dur][:tab][:phase][:bias])
;; Version of ULFO with additional bias argument.
;;
;; frq    - flonum. The signals frequency in Hertz.
;;
;; :amp   - flonum. The half cycle amplitude of the signal. The polarity of
;;          the result has the same sign as amp. Default +1
;;
;; :dur   - flonum. The signals duration in seconds. Default 1.00
;;
;; :tab   - table. The wave table. Default *sine-table*
;;
;; :phase - any. See phase function in utilites.lsp,  default 0
;;
;; :bias  - flonum. Constant value added to signal. Default 0.5
;;
;; return - sound.
;;

(defun ulfob (frq &key amp dur tab phase bias)
  (let ((dur (or dur 1.00))
	(bias (or bias 0.5))
	(amp  (or amp 0.5)))
    (sum (ulfo frq :amp amp :dur dur :tab tab :phase phase)
	 (rgate dur bias))))


Main Page       Index