final case classClip(rate: Rate, in: GE, lo: GE = 0.0f, hi: GE = 1.0f) extends SingleOut with Product with Serializable
A UGen that constrains a signal to a given range, by limiting values outside
the range to the range margins. This is similar to the clip2 binary operator
but permits both a lower range value lo and an upper range value hi .
Mathematically, this is equivalent to in.max(lo).min(hi).
Be aware that there seems to be an initialization bug. The following crashes,
indicating that Clip.ar outputs a zero initially:
{{ play { val bar = Integrator.ar(DC.ar(0), coeff = 0.999) val foo =
Clip.ar(bar, lo = 1.0, hi = 44100.0) // .max(1.0) val sum =
RunningSum.ar(DC.ar(0), length = foo) sum.poll(1, "sum") () } }}
A UGen that constrains a signal to a given range, by limiting values outside the range to the range margins. This is similar to the
clip2
binary operator but permits both a lower range valuelo
and an upper range valuehi
.Mathematically, this is equivalent to
in.max(lo).min(hi)
.Be aware that there seems to be an initialization bug. The following crashes, indicating that
Clip.ar
outputs a zero initially:{{ play { val bar = Integrator.ar(DC.ar(0), coeff = 0.999) val foo = Clip.ar(bar, lo = 1.0, hi = 44100.0) // .max(1.0) val sum = RunningSum.ar(DC.ar(0), length = foo) sum.poll(1, "sum") () } }}
input signal to constrain
lower margin of clipping
upper margin of clipping
Fold
Wrap