rsc3/doc/examples/textures/_scm/sc-bottle.scm

23 lines
925 B
Scheme

; bottle (sc)
(withSc3
(overlapTextureUgen
(list 2 0 2 +inf.0)
(let* ((freq (Rand 220 880))
(perc (EnvPerc 0.1 0.6 1 (list -4 -4)))
(flute (Ringz (Mul (EnvGen 1 1 0 1 0 perc)
(Mul (WhiteNoise) 0.02))
freq
0.3))
(breath (Mul (EnvGen 1 1 0 1 0 perc)
(Resonz (PinkNoise)
(Add 5 (Fdiv freq 2))
0.1)))
(rapf (lambda (i)
(let ((f (AllpassN i 0.1 (LinRand 0.001 0.1 -1) 1.0)))
(Add i (Mul f 0.5)))))
(close (lambda (i)
(let* ((l (EnvLinen 0.01 3.0 1.0 1 (replicate 3 -4)))
(z (Mul (Add breath i)
(EnvGen 1 1 0 1 2 l))))
(Mce2 z z)))))
(close ((foldl1 compose (replicate 2 rapf)) flute)))))