rsc3/doc/help/ugen/unary-ops/is-negative.help.scrbl

25 lines
364 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(is-negative a)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Predicate to determine if a value is negative.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(define (is-negative a)
(lt a 0.0))
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* ((a (line ar -1 1 1 remove-synth))
(b (is-negative 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