sbass.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 Yet another bass instrument
wrapper
(sbass plist dur [:vel][:arpeg][:pos][:gate]) An FM bass instrument. plist - list or flonum. List of MIDI key numbers. Alternatively a single key number may be specified. dur - flonum. Duration in seconds. :vel - flonum. Velocity 0 <= vel < 128, 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 return - sound vector.
;; sbass.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 ;; ;; Yet another bass instrument ;; (require 'wtab) (require 'map) (require 'definst) (provide 'sbass) (current-file "sbass") (setq sbass:*tabA* (wtab:make '(( 1 1.000) ( 2 0.150) ( 3 0.500) ( 5 0.070) ( 6 0.113) (10 0.200) (11 0.200))) sbass:*tabB* (wtab:make '(( 1 0.800) ( 2 1.000) ( 3 0.800) ( 4 0.500) ( 8 0.050) ( 9 0.050)))) (setf sbass:*v-mi-map* (map:quad 0.25 6)) (definst sbass:voice (vel gate) (let* ((vel (or vel 64)) (f0 (step-to-hz pitch)) (r1 1.000) (m1 (send sbass:*v-mi-map* :get vel)) (f1 (* f0 r1)) (a1 (* f0 m1)) (d1 0.2) (dur (or dur 1.00)) (gate (or gate dur))) (mult (fmosc pitch (sim (s-rest dur) (mult (osc (hz-to-step f1) d1 sbass:*tabA*) (scale a1 (percussion d1)))) sbass:*tabB*) (mult (percussion dur) (rgate gate))))) ;; @doc wrapper sbass ;; (sbass plist dur [:vel][:arpeg][:pos][:gate]) ;; An FM bass instrument. ;; ;; plist - list or flonum. List of MIDI key numbers. Alternatively a ;; single key number may be specified. ;; ;; dur - flonum. Duration in seconds. ;; ;; :vel - flonum. Velocity 0 <= vel < 128, 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 ;; ;; return - sound vector. ;; (defwrapper sbass #'sbass:voice #'definst:ampscale)