Main Page       Index


cdulcimer.lsp


 cdulcimer.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

 A chromatic dulcimer with "floating" aeolian harp reverb.
 Use dulcimer.lsp for instrument with just intonation.


wrapper

cdulcimer

 (cdulcimer plist dur [:vel][:pos][:arpeg][:aeo][:i][:rc][:rm][:attack][:decay])
 A chromatic dulcimer with Aeolian reverb.


View the Sourcecode :



;; cdulcimer.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
;;
;; A chromatic dulcimer with "floating" aeolian harp reverb.
;; Use dulcimer.lsp for instrument with just intonation.
;;

(require 'map)
(require 'aeolus)
(require 'dulcimer)
(provide 'cdulcimer)
(current-file "cdulcimer")


;; Define the Aeolian harp in realtive mode. 
;; and set the harmonic structure.
;;

(setf cdulcimer:*harp* (send aeolus:class :new 'REL))
(dolist (rfrq '(1.000 1.500 1.333 1.250 1.200 1.6667 1.875))
  (send cdulcimer:*harp* :string rfrq))


;; Add keyword arguments to the harp 
(send cdulcimer:*harp* :key ':i      3.000 (map:linear 0.1 1.00 0 1))
(send cdulcimer:*harp* :key ':attack 0.050 (map:linear 10  1.00 0 1))
(send cdulcimer:*harp* :key ':decay  2.000 (map:linear 0.2 1.00 0 1))
(send cdulcimer:*harp* :key ':rc 4.000 (map:constant 1))
(send cdulcimer:*harp* :key ':rm 1.001 (map:linear 1.1 1 0 1))


;; We borrow the pluck function form dulcimer.lsp
;;

(setfn cdulcimer:pluck dulcimer:pluck)


;; Define an aeolian instrument.
;;

(defun cdulcimer:aeolian (pitch dur &rest args)
  (send cdulcimer:*harp* :render (step-to-hz pitch) dur args))


;; Produce a single pluck/aeolian sound
;;

(defun cdulcimer:voice (pitch dur &rest args)
      (let ((amix (send dulcimer:*aeolian-db-map* :get (get-keyword-value ':aeo args 64)))
	    (arglist (append (list pitch dur) args)))
	(sum (apply #'cdulcimer:pluck arglist)
	     (scale-db amix (apply #'cdulcimer:aeolian arglist))
	     )))
      
;; @doc wrapper cdulcimer
;; (cdulcimer plist dur [:vel][:pos][:arpeg][:aeo][:i][:rc][:rm][:attack][:decay])
;; A chromatic dulcimer with Aeolian reverb.
;;

(defwrapper cdulcimer #'cdulcimer:voice)


Main Page       Index