rsc3/doc/help/ugen/unary-ops/sqrt.help.scrbl

20 lines
363 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(u:sqrt a)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Square root. The definition of square root is extended for signals
so that sqrt(a) when a<0 returns -sqrt(-a).
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((a (line ar -2 2 3 remove-synth))
(b (u:sqrt a))
(f (mul-add (mce2 a b) 600 900)))
(audition
(out 0 (mul (sin-osc ar f 0) 0.1))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00