rsc3/doc/help/ugen/triggers/in-range.help.scrbl

18 lines
395 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(in-range in lo hi)}
Tests if a signal is within a given range.
If in is >= lo and <= hi output 1.0, otherwise output 0.0. output
is initially zero.
in - signal to be tested
lo - low threshold
hi - high threshold
(let ((a (in-range (mul (sin-osc kr 1 0) 0.2) -0.15 0.15)))
(audition (out 0 (mul a (mul (brown-noise ar) 0.1)))))