Use Non-Frames Version Previous Page Next Page
The Csound Quick Reference

Mathematical Operations


Mathematical Operations: Arithmetic and Logic Operations

  - a (no rate restriction)
  + a (no rate restriction)
  a && b (logical AND; not audio-rate)
  a || b (logical OR; not audio-rate)
  a + b (no rate restriction)
  a - b (no rate restriction)
  a * b (no rate restriction)
  a / b (no rate restriction)
  a ^ b (b not audio-rate)
  a % b (no rate restriction)

Mathematical Operations: Mathematical Functions

  int(x) (init-rate or control-rate args only)
  frac(x) (init-rate or control-rate args only)
  i(x) (control-rate args only)
  abs(x) (no rate restriction)
  exp(x) (no rate restriction)
  log(x) (no rate restriction)
  log10(x) (no rate restriction)
  sqrt(x) (no rate restriction)
  powoftwo(x) (init-rate or control-rate args only)
  logbtwo(x) (init-rate or control-rate args only)

Mathematical Operations: Trigonometric Functions

  sin(x) (no rate restriction)
  cos(x) (no rate restriction)
  tan(x) (no rate restriction)
  sininv(x) (no rate restriction)
  cosinv(x) (no rate restriction)
  taninv(x) (no rate restriction)
  sinh(x) (no rate restriction)
  cosh(x) (no rate restriction)
  tanh(x) (no rate restriction)

Mathematical Operations: Amplitude Functions

  dbamp(x) (init-rate or control-rate args only)
  ampdb(x) (no rate restriction)
  dbfsamp(x) (init-rate or control-rate args only)
  ampdbfs(x) (no rate restriction)

Mathematical Operations: Random Functions

  rnd(x) (init- or control-rate only)
  birnd(x) (init- or control-rate only)
  urd(x) (no rate restrictions)

Mathematical Operations: Opcode Equivalents of Functions

ar sum asig1, asig2[,asig3...asigN]
ar product asig1, asig2[,asig3...asigN]
i/k/ar pow i/k/aarg, i/k/pow
i/k/ar taninv2 i/k/ax, i/k/ay
ar mac asig1, ksig1, asig2, ksig2, asig3, ...
ar maca asig1, ksig1, asig2, ksig2, asig3, ...

Use Non-Frames Version Previous Page Next Page
The Csound Quick Reference