2022-08-24 13:53:18 +00:00
|
|
|
#lang scribble/manual
|
|
|
|
@(require (for-label racket))
|
|
|
|
|
|
|
|
@title{(shaper bufnum in)}
|
|
|
|
|
2022-08-28 10:27:01 +00:00
|
|
|
|
2022-08-24 13:53:18 +00:00
|
|
|
Wave shaper. Performs waveshaping on the input signal by indexing
|
|
|
|
into the table.
|
|
|
|
|
|
|
|
bufnum - the number of a buffer filled in wavetable format
|
|
|
|
containing the transfer function.
|
|
|
|
in - the input signal.
|
|
|
|
|
2022-08-28 10:27:01 +00:00
|
|
|
|
|
|
|
@racketblock[
|
2022-08-24 13:53:18 +00:00
|
|
|
(with-sc3
|
|
|
|
(lambda (fd)
|
|
|
|
(async fd (b-alloc 10 512 1))
|
|
|
|
(async fd (b-gen1 10 "cheby" (list 0 1 0 1 1 0 1)))))
|
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
|
|
|
|
(let* ((a (line kr 0 1 6 remove-synth))
|
|
|
|
(s (mul (sin-osc ar 300 0) a)))
|
|
|
|
(out 0 (mul (shaper 10 s) 0.5))))
|
2022-08-28 10:27:01 +00:00
|
|
|
]
|
|
|
|
|
2022-08-24 13:53:18 +00:00
|
|
|
|