vivid-0.5.2.0: Sound synthesis with SuperCollider
Safe HaskellNone
LanguageHaskell2010

Vivid.UGens.Maths

Synopsis

Documentation

clip :: Args '["in"] '["lo", "hi"] a => a -> SDBody a Signal Source #

  • *Note this has different behavior than 0.1!** "lo" is not implied by "hi".

If you know you always want "lo" to be negative "hi" (like -1 to 1) you can use biOp Clip2

inRange :: Args '["in"] '["lo", "hi"] a => a -> SDBody a Signal Source #

Returns 1.0 if "in" is between "lo" and "hi" (including equalling "lo" or "hi"). Else 0.0.

Can be audio rate (AR), control rate (KR), or fixed (IR)

Lo and hi default to 0 and 1

leastChange :: (ToSig s0 as, ToSig s1 as) => s0 -> s1 -> SDBody' as Signal Source #

Returns the value of whichever of the 2 signals is changing least

Its default calculation rate is the highest of its 2 inputs

linExp :: Args '["in"] '["srclo", "srchi", "dstlo", "dsthi"] a => a -> SDBody a Signal Source #

"Converts a linear range of values to an exponential range of values."

Args:

  • *in* - The input signal to convert.
  • *srclo* - Lower limit of input range.
  • *srchi* - Upper limit of input range.
  • *dstlo* - Lower limit of output range.
  • *dsthi* - Upper limit of output range.
  • *"The dstlo and dsthi arguments must be nonzero and have the same sign."**

This will have the same calculation rate as its "in" argument

linLin :: Args '["in"] '["srclo", "srchi", "dstlo", "dsthi"] a => a -> SDBody a Signal Source #

"Converts a linear range of values to an another linear range of values."

Args:

  • *in* - The input signal to convert.
  • *srclo* - Lower limit of input range.
  • *srchi* - Upper limit of input range.
  • *dstlo* - Lower limit of output range.
  • *dsthi* - Upper limit of output range.

This will have the same calculation rate as its "in" argument

mostChange :: (ToSig s0 as, ToSig s1 as) => s0 -> s1 -> SDBody' as Signal Source #

Opposite of leastChange

mulAdd :: Args '["in"] '["mul", "add"] a => a -> SDBody a Signal Source #