rsc3/doc/help/ugen/binary-ops/abs-dif.help.scrbl

18 lines
309 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(abs-dif a b)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Calculates the value of (abs (- a b). Finding the magnitude of the
difference of two values is a common operation.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (f-sin-osc ar 440 0)
(abs-dif 0.2 (mul (f-sin-osc ar 2 0) 0.5)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00