byulparan / cl-collider

A SuperCollider client for CommonLisp
Other
218 stars 23 forks source link

Allow use of `synth` inside synthdefs + JPverb #111

Closed defaultxr closed 3 years ago

defaultxr commented 3 years ago

This PR includes the JPverb UGen, simplification of full-pathname, and the ability to use synth inside synthdefs.

Example:

(defsynth :mdapiano ((gate 1) (freq 440) (vel 100) (random 0.1) (rel 0.9) (stereo 0.3) (amp 0.5))
  (let* ((sig (/ (mda-piano.ar freq :gate gate :vel vel :release rel :stereo stereo :random random :sustain 0) 2))
         (ds (detect-silence.ar sig 1.0e-4 :act :free)))
    (declare (ignore ds))
    (out.ar 0 (* sig amp))))

(defsynth :tremolo-piano ((gate 1) (freq 440) (amp 0.5))
  (out.ar 0 (* (sin-osc.ar 8 0 0.5 0.5)
               (synth :mdapiano :gate gate :freq freq)
               amp)))

Caveats(?):

byulparan commented 3 years ago

wow....embeddable synth looks very useful!