Clamps Dictionary
oscil
Function
(oscil &key (freq 440) (amp 0.1) (phase 0) (lagtime 0.1) (pan 0.5) (head 200) (id nil))
Start a sine wave oscillator and return its node-id
Arguments
:freq |
Frequency in Hz |
:amp |
Linear amplitude in the range [0..1] |
:phase |
Start phase of the oscillator in the range [0..2pi] note that the osillator uses a cosine function so a startphase of 0 will start with an audible click. |
:lagtime |
Lag time for changed amplitude values in s. |
:head |
Integer denoting the group where to add the node. |
:id |
Integer denoting a suggested node-id if available. |
Examples
;; start the oscillator with id 1 (oscil :id 1) ;;; change the frequency (set-control 1 :freq 271) (set-control 1 :freq 1271) ;;; change the amplitude (set-control 1 :amp 0.3) ;;; stop the oscillator (set-control 1 :gate 0)