rsc3/doc/help/ugen/analysis/slope.help.scrbl

29 lines
602 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(slope in)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
slope of signal. Measures the rate of change per second of a
signal. Formula implemented is:
out[i] = (in[i] - in[i-1]) * sampling_rate
in - input signal to measure.
a = quadratic noise, b = first derivative line segments, c = second
derivative constant segments
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((r 2)
(a (lf-noise2 kr r))
(scale (recip r))
(b (mul (slope a) scale))
(c (mul (slope b) (squared scale)))
(o (sin-osc ar (mul-add (mce3 a b c) 220 220) 0)))
(audition (out 0 (mix (mul o 1/3)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00