2022-08-24 13:53:18 +00:00
|
|
|
#lang scribble/manual
|
|
|
|
@(require (for-label racket))
|
|
|
|
|
|
|
|
@title{(quad-n rate freq a b c xi)}
|
|
|
|
|
|
|
|
(quad-l rate freq a b c xi)
|
|
|
|
(quad-c rate freq a b c xi)
|
|
|
|
|
|
|
|
freq - iteration frequency in Hertz
|
|
|
|
a, b, c - equation variables
|
|
|
|
xi - initial value of x
|
|
|
|
|
|
|
|
General quadratic map chaotic generator. Non-, linear- and cubic-
|
|
|
|
interpolating sound generators based on the difference equation:
|
|
|
|
xn+1 = axn2 + bxn + c
|
|
|
|
|
2022-08-28 10:27:01 +00:00
|
|
|
|
|
|
|
@racketblock[
|
2022-08-24 13:53:18 +00:00
|
|
|
(define quad_ quad-c)
|
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
|
|
|
(audition
|
|
|
|
(out 0 (mul (quad_ ar 4000 1 -1 -0.75 0) 0.2)))
|
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 ((r (mouse-x kr 3.5441 4 0 0.1)))
|
|
|
|
(audition
|
|
|
|
(out 0 (mul (quad_ ar 4000.0 (neg r) r 0 0.1) 0.4))))
|
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 ((r (mouse-x kr 3.5441 4 0 0.1)))
|
|
|
|
(audition
|
|
|
|
(out 0 (mul (sin-osc ar (mul-add (quad_ ar 4 (neg r) r 0 0.1) 800 900) 0)
|
|
|
|
0.4))))
|
2022-08-28 10:27:01 +00:00
|
|
|
]
|
|
|
|
|
2022-08-24 13:53:18 +00:00
|
|
|
|