csound-expression-opcodes-0.0.5.2: opcodes for the library csound-expression
Safe HaskellSafe-Inferred
LanguageHaskell2010

Csound.Typed.Opcode.MathematicalOperations

Synopsis

Comparators and Accumulators.

clear :: [Sig] -> SE () Source #

Zeroes a list of audio signals.

clear zeroes a list of audio signals.

 clear  avar1 [, avar2] [, avar3] [...]

csound doc: http://csound.com/docs/manual/clear.html

vincr :: Sig -> Sig -> SE () Source #

Accumulates audio signals.

vincr increments one audio variable with another signal, i.e. it accumulates output.

 vincr  accum, aincr

csound doc: http://csound.com/docs/manual/vincr.html

Amplitude Functions.

ampdb :: SigOrD a => a -> a Source #

Returns the amplitude equivalent of the decibel value x.

Returns the amplitude equivalent of the decibel value x. Thus:

 ampdb (x)  (no rate restriction)

csound doc: http://csound.com/docs/manual/ampdb.html

ampdbfs :: SigOrD a => a -> a Source #

Returns the amplitude equivalent (in 16-bit signed integer scale) of the full scale decibel (dB FS) value x.

Returns the amplitude equivalent of the full scale decibel (dB FS) value x. The logarithmic full scale decibel values will be converted to linear 16-bit signed integer values from −32,768 to +32,767.

 ampdbfs (x)  (no rate restriction)

csound doc: http://csound.com/docs/manual/ampdbfs.html

dbamp :: SigOrD a => a -> a Source #

Returns the decibel equivalent of the raw amplitude x.

 dbamp (x)  (init-rate or control-rate args only)

csound doc: http://csound.com/docs/manual/dbamp.html

dbfsamp :: SigOrD a => a -> a Source #

Returns the decibel equivalent of the raw amplitude x, relative to full scale amplitude.

Returns the decibel equivalent of the raw amplitude x, relative to full scale amplitude. Full scale is assumed to be 16 bit. New is Csound version 4.10.

 dbfsamp (x)  (init-rate or control-rate args only)

csound doc: http://csound.com/docs/manual/dbfsamp.html

Random Functions.

birnd :: SigOrD a => a -> SE a Source #

Returns a random number in a bi-polar range.

 birnd (x) (init- or control-rate only)

csound doc: http://csound.com/docs/manual/birnd.html

rnd :: SigOrD a => a -> SE a Source #

Returns a random number in a unipolar range at the rate given by the input argument.

 rnd (x) (init- or control-rate only)

csound doc: http://csound.com/docs/manual/rnd.html

Opcode Equivalents of Functions.

divz :: SigOrD a => a -> a -> a Source #

Safely divides two numbers.

ares  divz  xa, xb, ksubst
ires  divz  ia, ib, isubst
kres  divz  ka, kb, ksubst
... divz (ka, kb, ksubst)... (no rate restriction)

csound doc: http://csound.com/docs/manual/divz.html

mac :: [Sig] -> Sig Source #

Multiplies and accumulates a- and k-rate signals.

ares  mac  ksig1, asig1 [, ksig2] [, asig2] [, ksig3] [, asig3] [...]

csound doc: http://csound.com/docs/manual/mac.html

maca :: [Sig] -> Sig Source #

Multiply and accumulate a-rate signals only.

ares  maca  asig1 , asig2 [, asig3] [, asig4] [, asig5] [...]

csound doc: http://csound.com/docs/manual/maca.html

polynomial :: Sig -> [Sig] -> Sig Source #

Efficiently evaluates a polynomial of arbitrary order.

The polynomial opcode calculates a polynomial with a single a-rate input variable. The polynomial is a sum of any number of terms in the form kn*x^n where kn is the nth coefficient of the expression. These coefficients are k-rate values.

aout  polynomial  ain, k0 [, k1 [, k2 [...]]]

csound doc: http://csound.com/docs/manual/polynomial.html

pow :: Sig -> Sig -> Sig Source #

Computes one argument to the power of another argument.

Computes xarg to the power of kpow (or ipow) and scales the result by inorm.

ares  pow  aarg, kpow [, inorm]
ires  pow  iarg, ipow [, inorm]
kres  pow  karg, kpow [,
        inorm]
ires[]  pow  iarg[], ipow[] 
kres[]  pow  karg[], kpow[]
ires[]  pow  iarg[], ipow 
kres[]  pow  karg[], kpow 

csound doc: http://csound.com/docs/manual/pow.html

product' :: [Sig] -> Sig Source #

Multiplies any number of a-rate signals.

ares  product  asig1, asig2 [, asig3] [...]

csound doc: http://csound.com/docs/manual/product.html

sum' :: [Sig] -> Sig Source #

Sums any number of a-rate signals, or array elements.

ares  sum  asig1 [, asig2] [, asig3] [...]
kres  sum  karr
ires  sum  iarr

csound doc: http://csound.com/docs/manual/sum.html

taninv2 :: SigOrD a => a -> a -> a Source #

Returns an arctangent.

Returns the arctangent of iyix, kykx, or ay/ax.

ares  taninv2  ay, ax
ires  taninv2  iy, ix
kres  taninv2  ky, kx
... taninv2 (ky, kx)... (no rate restriction)

csound doc: http://csound.com/docs/manual/taninv2.html