rsc3/doc/help/ugen/chaos/lin-cong-c.help.scrbl

65 lines
1.2 KiB
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(lin-cong-c rate freq a c m xi)}
(lin-cong-l rate freq a c m xi)
(lin-cong-n rate freq a c m xi)
linear congruential chaotic generator.
freq - iteration frequency in Hertz
a - multiplier amount
c - increment amount
m - modulus amount
xi - initial value of x
A cubic-interpolating sound generator based on the difference
equation:
xn+1 = (axn + c) % m
The output signal is automatically scaled to a range of [-1, 1].
Default initial parameters.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (let ((x (mouse-x kr 20 sample-rate 0 0.1)))
(mul (lin-cong-c ar x 1.1 0.13 1 0) 0.2))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
randomly modulate parameters.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (lin-cong-c ar
(mul-add (lf-noise2 kr 1.0) 1e4 1e4)
(mul-add (lf-noise2 kr 0.1) 0.5 1.4)
(mul-add (lf-noise2 kr 0.1) 0.1 0.1)
(lf-noise2 kr 0.1)
0)
0.2)))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
As frequency control...
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (sin-osc ar (mul-add (lin-cong-c ar
40
(mul-add (lf-noise2 kr 0.1) 0.1 1.0)
(mul-add (lf-noise2 kr 0.1) 0.1 0.1)
(lf-noise2 kr 0.1)
0)
500 600) 0)
0.4)))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00