fzpluck.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 distorted plucked string instrument.
wrapper
(wrapper plist dur [:vel][:arpeg][:pos][:r])
A distorted plucked string sound created by the Karplus-Strong string
algorithm as FM modulator.
plist - list or flonum. List of MIDI key numbers. Alternatively a single key
number may be specified.
dur - flonum. Duration in seconds.
:vel - integer. MIDI velocity, default 64
:arpeg - flonum. Arpeggio interval, default 0
:pos - flonum or sound. Pan position as either a fixed number in
interval (0,5) or a control signal over the same interval.
Default 0.5
:r - flonum. c/m frequncy ratio, default 1.01
return - vector of 2 sounds.
;; fzpluck.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 distorted plucked string instrument.
;;
(require 'linfn)
(require 'map)
(require 'definst)
(provide 'fzpluck)
(current-file "fzpluck")
(deflin2 fzpluck:vmap 0 0 128 20)
(definst fzpluck:voice (r vel)
(let* ((r (or r 1.01))
(accent (fzpluck:vmap (or vel 64)))
(chz (step-to-hz pitch))
(mhz (* r chz))
(modsig (scale (* accent chz)(pluck (hz-to-step mhz) dur))))
(mult (fmosc pitch modsig)(percussion dur))))
;; @doc wrapper fzpluck
;; (wrapper plist dur [:vel][:arpeg][:pos][:r])
;;
;; A distorted plucked string sound created by the Karplus-Strong string
;; algorithm as FM modulator.
;;
;; plist - list or flonum. List of MIDI key numbers. Alternatively a single key
;; number may be specified.
;;
;; dur - flonum. Duration in seconds.
;;
;; :vel - integer. MIDI velocity, default 64
;;
;; :arpeg - flonum. Arpeggio interval, default 0
;;
;; :pos - flonum or sound. Pan position as either a fixed number in
;; interval (0,5) or a control signal over the same interval.
;; Default 0.5
;;
;; :r - flonum. c/m frequncy ratio, default 1.01
;;
;; return - vector of 2 sounds.
;;
(defwrapper fzpluck #'fzpluck:voice)