Clamps Dictionary
sfz
Common Music Class
(new sfz &key (keynum 60) (amplitude 0) (duration 1) (preset :flute-nv) (oneshot nil) (pan 0.5) (startpos 0) (chan 100))
Create a sfz Event.
sfz accepts the following slot initializations:
:time |
The output time in seconds, initially unbound. |
:keynum |
Keynum in Midicents. |
:amplitude |
Amplitude in dB, the range [-100..0] corresponding to linear values [0..1]. |
:duration |
Duration in seconds. |
:preset |
Keyword or symbol of a registered preset name. |
:oneshot |
Boolean denoting not to use loop playback. |
:pan |
Number in the range [0..1] defining equal power panning between the two outputs of the dsp on playback. |
:startpos |
The startposition in the sample in seconds. |
:chan |
The channel (layer) used in svg output. |
Examples
(new sfz) ;; => #i(sfz keynum 60 amplitude 1 duration 1 preset :flute-nv ;; play-fn nil pan 0.5 startpos 0 chan 100) ;; the following code should send 1 second of a flute middle C sound ;; to the first two oulets of incudine: (output (new sfz)) ; => ; No value ;; => loading :flute-nv from ~/quicklisp/local-projects/clamps/extra/snd/sfz/Flute-nv/000_Flute-nv.sfz ;; ; No values (loop for idx below 200 for x = (/ idx 199) for time = 0 then (+ time (n-exp (interp x 0 0 0.3 1 1 0) 0.01 0.1)) do (sprout (new sfz :time time :keynum (+ 65.5 (random (n-lin (interp x 0 0 1 1) 1 5))) :duration (+ 0.5 (random 2.0)) :amplitude (n-lin (interp x 0 0 0.8 0 1 1) -12 -24)))) ;; => nil
Created: 2025-02-18 Di 12:58