2022-08-24 13:53:18 +00:00
|
|
|
#lang scribble/manual
|
|
|
|
@(require (for-label racket))
|
|
|
|
|
|
|
|
@title{(ring3 a b)}
|
|
|
|
|
2022-08-28 10:27:01 +00:00
|
|
|
|
2022-08-24 13:53:18 +00:00
|
|
|
Ring modulation variant. Return the value of (a * a * b). This is
|
|
|
|
more efficient than using separate unit generators for the
|
|
|
|
multiplies.
|
|
|
|
|
|
|
|
See also mul, ring1, ring2, ring4.
|
|
|
|
|
2022-08-28 10:27:01 +00:00
|
|
|
|
|
|
|
@racketblock[
|
2022-08-24 13:53:18 +00:00
|
|
|
(audition
|
|
|
|
(out 0 (mul (ring3 (f-sin-osc ar 800 0)
|
|
|
|
(f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0))
|
|
|
|
0.125)))
|
2022-08-28 10:27:01 +00:00
|
|
|
]
|
2022-08-24 13:53:18 +00:00
|
|
|
|
2022-08-28 10:27:01 +00:00
|
|
|
|
|
|
|
@racketblock[
|
2022-08-24 13:53:18 +00:00
|
|
|
(let ((a (f-sin-osc ar 800 0))
|
|
|
|
(b (f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0)))
|
|
|
|
(audition
|
|
|
|
(out 0 (mul4 a a b 0.125))))
|
2022-08-28 10:27:01 +00:00
|
|
|
]
|
|
|
|
|
2022-08-24 13:53:18 +00:00
|
|
|
|