Functions

Abs(args) absolute value
ACos(args) basic trigonometry
Add(args) basic math
ASin(args) basic trigonometry
ATan(args) basic trigonometry
ATan2(args) basic trigonometry
biquad.AP(args) 2-pole/2-zero IIR all-pass filter.
biquad.BP(args) 2-pole/2-zero IIR band-pass filter.
biquad.BPC(args) 2-pole/2-zero IIR band-pass filter.
biquad.BR(args) 2-pole/2-zero IIR band-reject filter.
biquad.HP(args) 2-pole/2-zero IIR high-pass filter.
biquad.LP(args) 2-pole/2-zero IIR low-pass filter.
Bool(args) Convert input to 0 or 1
Buzz(args) Impulse anti-aliased oscillator
Ceil(args) round to next highest integer
Channels(args) select input channels from an input stream
Clip(args) clip signal between range of lo to hi
Cos(args) basic trigonometry
Cosh(args) basic trigonometry
Div(args) basic math
Env(args) ramp envelope
EnvDriver(args) envelope driver (used to build envelopes)
Eq(args) equal operator
Exp(args) compute e^input
Floor(args) round to next lowest integer
globalize() Push all audio.def functions into the globals scope table
Gt(args) greater than operator
Gte(args) greater than or equal operator
Lag(args) smoothing filter (running average lowpass)
Log(args) compute natural logarithm
Log10(args) compute base 10 logarithm
Lt(args) less than operator
Lte(args) less than or equal operator
Max(args) return greater of inputs
Mean(args) return mean of inputs
Min(args) return lesser of inputs
Mix(args) Aggregates input into a signal port (mixing overdub)
Mod(args) basic math
Mono(args) mix input stream to mono
Mul(args) basic math
Neq(args) not equal operator
noise.Brown(args) brown noise generator
noise.Pink(args) pink noise generator
noise.White(args) white noise generator
Not(args) Convert input to 0 or 1
Pan2(args) Stereo panner
Port(args) define an input port of the Def:
Pow(args) basic math
Saw(args) Saw-wave anti-aliased oscillator
Sign(args) get sign of input
Sin(args) basic trigonometry
Sinh(args) basic trigonometry
SinOsc(args) Sine-wave oscillator (polynomial approximation)
Sqrt(args) compute square root
Square(args) Square-wave anti-aliased oscillator
Stereo(args) mix input stream to stereo
Sub(args) basic math
Tan(args) basic trigonometry
Tanh(args) basic trigonometry

Functions

Abs(args)

absolute value

Parameters:

args Constructor properties
args[1] first operand (default 0)
ACos(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] first operand (default 0)
Add(args)

Also generated by Expr + Expr

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
ASin(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] first operand (default 0)
ATan(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] first operand (default 0)
ATan2(args)

ATan2 takes two arguments, with the same semantics as the standard cmath atan2 operator.

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
biquad.AP(args)

2-pole/2-zero IIR all-pass filter.

Parameters:

args Constructor properties
args.freq or args[2]: cutoff frequency (default 1000)
args.input or args[1]: input signal
args.res or args[3]: resonance (default 1)
biquad.BP(args)

2-pole/2-zero IIR band-pass filter.

Parameters:

args Constructor properties
args.freq or args[2]: cutoff frequency (default 1000)
args.input or args[1]: input signal
args.res or args[3]: resonance (default 1)
biquad.BPC(args)

2-pole/2-zero IIR band-pass filter.

Parameters:

args Constructor properties
args.freq or args[2]: cutoff frequency (default 1000)
args.input or args[1]: input signal
args.res or args[3]: resonance (default 1)
biquad.BR(args)

2-pole/2-zero IIR band-reject filter.

Parameters:

args Constructor properties
args.freq or args[2]: cutoff frequency (default 1000)
args.input or args[1]: input signal
args.res or args[3]: resonance (default 1)
biquad.HP(args)

2-pole/2-zero IIR high-pass filter.

Parameters:

args Constructor properties
args.freq or args[2]: cutoff frequency (default 1000)
args.input or args[1]: input signal
args.res or args[3]: resonance (default 1)
biquad.LP(args)

2-pole/2-zero IIR low-pass filter.

Parameters:

args Constructor properties
args.freq or args[2]: cutoff frequency (default 1000)
args.input or args[1]: input signal
args.res or args[3]: resonance (default 1)
Bool(args)

returns 0 if the input is 0, and 1 for any other value

Parameters:

args Constructor properties
args[1] operand (default 0)
Buzz(args)

An audio oscillator.

Parameters:

args Constructor properties
args.freq or args[1]: frequency in Hertz (default 440)
Ceil(args)

round to next highest integer

Parameters:

args Constructor properties
args[1] first operand (default 0)
Channels(args)

select input channels from an input stream

Parameters:

args Constructor properties
args[1] input stream to select from
Clip(args)

clip signal between range of lo to hi

Parameters:

args Constructor properties
args.hi or args[3] hi limit (default 1)
args.input or args[1] value to clip (default 0)
args.lo or args[2] lo limit (default -1)
Cos(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] angle in radians (default 0)
Cosh(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] first operand (default 0)
Div(args)

Also generated by Expr / Expr

Parameters:

args Constructor properties
args[1] first operand (default 1)
args[2] second operand (default 1)
Env(args)

The simplest envelope: ramps from 1 to 0 over the duration.

Parameters:

args Constructor properties (same as EnvDriver)

See Also:

EnvDriver(args)

Returns a signal ramp from 0 to 1 over the duration specified. If done == true (the default case), then the envelope will cause the removal of the containing synth at the end of the ramp.

Parameters:

args Constructor properties
args.done boolean flag for removing the synth at envelope end (default true)
args.dur or args[1]: envelope duration; a constant or variable expression (default auto-generated)
args.hold or args[2]: envelope hold; while gate parameter is nonzero, the envelope will not progress.
Eq(args)

boolean operators return 1 for true, 0 for false

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Exp(args)

compute e^input

Parameters:

args Constructor properties
args[1] first operand (default 0)
Floor(args)

round to next lowest integer

Parameters:

args Constructor properties
args[1] first operand (default 0)
globalize()

A utility for quick-coding, to create global references for all audio.def functions

Gt(args)

boolean operators return 1 for true, 0 for false

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Gte(args)

boolean operators return 1 for true, 0 for false

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Lag(args)

Smoothes input, initialized at init.

Parameters:

args Constructor properties
args.init or args[3]: initial value of filter (default 0)
args.input or args[1]: input to smooth
args.lag or args[2]: lag factor (0 for no lag, 1 for infinite lag)
Log(args)

compute natural logarithm

Parameters:

args Constructor properties
args[1] first operand (default 0)
Log10(args)

compute base 10 logarithm

Parameters:

args Constructor properties
args[1] first operand (default 0)
Lt(args)

boolean operators return 1 for true, 0 for false

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Lte(args)

boolean operators return 1 for true, 0 for false

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Max(args)

return greater of inputs

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Mean(args)

return mean of inputs

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Min(args)

return lesser of inputs

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Mix(args)

Adds src to dst, and returns src

Parameters:

args Constructor properties
args.dst or args[1]: mix destination (default V"out")
args.src or args[2]: source to mix into destination (default 0)
Mod(args)

Also generated by Expr % Expr

Parameters:

args Constructor properties
args[1] first operand (default 1)
args[2] second operand (default 1)
Mono(args)

mix input stream to mono

Parameters:

args Constructor properties
args[1] input stream to mix
Mul(args)

Also generated by Expr * Expr

Parameters:

args Constructor properties
args[1] first operand (default 1)
args[2] second operand (default 1)
Neq(args)

boolean operators return 1 for true, 0 for false

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
noise.Brown(args)

Brownian noise has a power spectrum of 1/f^2. It is produced by integrating white (uniform) noise.

Parameters:

args Constructor properties
args.seed or args[1]: seed for random number generator
noise.Pink(args)

Pink noise has a power spectrum of 1/f. It is produced by summing together 12 octaves of white noise.

Parameters:

args Constructor properties
args.seed or args[1]: seed for random number generator
noise.White(args)

White noise has a uniform power spectrum.

Parameters:

args Constructor properties
args.seed or args[1]: seed for random number generator
Not(args)

returns 1 if the input is 0, and 0 for any other value

Parameters:

args Constructor properties
args[1] operand (default 0)
Pan2(args)

pan range is -1 to 1.

Parameters:

args Constructor properties
args[1] or args.input: signal to be panned
args[2] or args.pan: signal to drive panner
Port(args)

Also generated by V"name"

Parameters:

args Constructor properties
args[1] name (string)
Pow(args)

Also generated by Expr ^ Expr

Parameters:

args Constructor properties
args[1] first operand (default 1)
args[2] second operand (default 1)
Saw(args)

An audio oscillator.

Parameters:

args Constructor properties
args.freq or args[1]: frequency in Hertz (default 440)
Sign(args)

Returns 1 if input > 0, 0 if input == 0, and -1 otherwise.

Parameters:

args Constructor properties
args[1] first operand (default 0)
Sin(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] angle in radians (default 0)
Sinh(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] first operand (default 0)
SinOsc(args)

An audio oscillator.

Parameters:

args Constructor properties
args.freq or args[1]: frequency in Hertz (default 440)
Sqrt(args)

compute square root

Parameters:

args Constructor properties
args[1] first operand (default 0)
Square(args)

An audio oscillator.

Parameters:

args Constructor properties
args.freq or args[1]: frequency in Hertz (default 440)
Stereo(args)

mix input stream to stereo

Parameters:

args Constructor properties
args[1] input stream to mix
Sub(args)

Also generated by Expr - Expr. If second operand is omitted, is equivalent to (0-args[1]).

Parameters:

args Constructor properties
args[1] first operand (default 0)
args[2] second operand (default 0)
Tan(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] angle in radians (default 0)
Tanh(args)

basic trigonometry

Parameters:

args Constructor properties
args[1] first operand (default 0)