Base class for all UGen types in ChucK.
UGen chan(int num)
Return channel at specified index.
int channels(int num)
Set number of channels. (Not currently supported.)
int channels()
Return number of channels.
float gain(float val)
Set the gain of the ugen.
float gain()
Return the gain of the ugen.
int isConnectedTo(UGen right)
Return true if this ugen's output is connected to the input of the argument. Return false otherwise.
float last()
Return the last sample value of the unit generator.
int op(int val)
Set the ugen's operation mode. Accepted values are: 1 (sum inputs), 2 (take difference between first input and subsequent inputs), 3 (multiply inputs), 4 (divide first input by subsequent inputs), 0 (do not synthesize audio, output 0) or -1 (passthrough inputs to output).
int op()
Return the ugen's operation mode.
[ top ]
Gain control. (Note: all unit generators can themselves change their gain. This is a way to add multiple outputs together and scale them.)
[ top ]
Step generator - like Impulse, but once a value is set, it is held for all following samples, until value is set again.
float next(float next)
The step value.
float next()
The step value.
[ top ]
Base class for simple oscillator unit generators.
float freq(float hz)
Frequency of oscillator in Hertz (cycles per second).
float freq()
Frequency of oscillator in Hertz (cycles per second).
dur period(dur value)
Period of oscillator (inverse of frequency).
dur period()
Period of oscillator (inverse of frequency).
float phase(float phase)
Oscillator phase, in range [0,1).
float phase()
Oscillator phase, in range [0,1).
float sfreq(float hz)
No description available
int sync(int type)
Mode for input (if any). 0: sync frequency to input, 1: sync phase to input, 2: frequency modulation (add input to set frequency)
int sync()
Mode for input (if any). 0: sync frequency to input, 1: sync phase to input, 2: frequency modulation (add input to set frequency)
[ top ]
Phasor oscillator. Linearly rises from 0 to 1. Can be used as a phase control.
[ top ]
Triangle wave oscillator.
float width(float width)
Width of triangle wave (ratio of rise time to fall time).
float width()
Width of triangle wave (ratio of rise time to fall time).
[ top ]
Sawtooth wave oscillator.
float width(float width)
Whether falling sawtooth wave (0) or rising sawtooth wave (1).
float width()
Whether falling sawtooth wave (0) or rising sawtooth wave (1).
[ top ]
Pulse width oscillator.
float width(float width)
Length of duty cycle [0,1).
float width()
Length of duty cycle [0,1).
[ top ]
Square wave oscillator (pulse with 0.5 duty cycle).
float width()
Length of duty cycle (always 0.5)
[ top ]
Interpolating sound buffer with single-channel output. Reads from a variety of uncompressed formats.
int channel(int channel)
If the sound file contains more than one channel of audio, select which channel to play.
int channel()
If the sound file contains more than one channel of audio, the selected channel to play.
int channels()
Number of channels available in the sound file.
int chunks(int frames)
Chunk size, in frames, for loading the file from disk. Set to 0 to disable chunking.
int chunks()
Chunk size, in frames, for loading the file from disk. 0 indicates that chunking is disabled.
float freq(float freq)
Loop rate (in file loops per second).
float freq()
Loop rate (in file loops per second).
int interp(int interp)
Interpolation mode. 0: drop sample, 1: linear interpolation, 2: sinc interpolation
int interp()
Interpolation mode. 0: drop sample, 1: linear interpolation, 2: sinc interpolation
dur length()
Total length of the file.
int loop(int loop)
Toggle for looping file playback.
int loop()
Toggle for looping file playback.
float phase(float phase)
Phase position, normalized to [0,1).
float phase()
Phase position, normalized to [0,1).
float phaseOffset(float value)
Advance the playhead by the specified phase offset in [0,1), where 0 is no advance and 1 advance the entire length of the file.
float play(float play)
Same as .rate.
float play()
Same as .rate.
int pos(int pos)
Set position (between 0 and number of samples).
int pos()
Current position (between 0 and number of samples).
float rate(float rate)
Playback rate (relative to file's natural speed). For example, 0.5 is half speed and 2 is twice as fast.
float rate()
Playback rate (relative to file's natural speed). For example, 0.5 is half speed and 2 is twice as fast.
string read(string read)
Load file for reading.
int samples()
Total number of sample frames in the file.
float valueAt(int pos)
Sample value at given position (in samples).
string write(string read)
Set file for writing (currently unsupported).
[ top ]
Interpolating sound buffer with two-channel output. Reads from a variety of uncompressed formats.
[ top ]
Pulse generator - can set the value of the current sample. Default for each sample is 0 if not set.
float next(float next)
Value of next sample to be generated. (Note: if you are using the UGen.last method to read the output of the impulse, the value set by Impulse.next does not appear as the output until after the next sample boundary. In this case, there is a consistent 1::samp offset between setting .next and reading that value using .last.)
float next()
Value of next sample to be generated.
[ top ]
Base class for multi-channel unit generators.
UGen chan(int which)
Returns the ugen representing a specific channel of this ugen, or null if no such channel is available.
[ top ]
Base class for stereo unit generators.
UGen left
Left channel (same as .chan(0)).
UGen right
Right channel (same as .chan(1)).
float pan(float val)
Panning between left and right channels, in range [-1,1], with -1 being far-left, 1 far-right, and 0 centered.
float pan()
Panning between left and right channels, in range [-1,1], with -1 being far-left, 1 far-right, and 0 centered.
[ top ]
Unit generator for mixing stereo signal source to mono.
[ top ]
Base class for chubgraph-based user unit generators.
UGen inlet
Terminal for sources chucked into this ugen.
UGen outlet
Terminal for the output of this ugen.
[ top ]