Package

de.sciss.synth

ugen

Permalink

package ugen

Visibility
  1. Public
  2. All

Type Members

  1. final case class A2K(in: GE) extends SingleOut with ControlRated with Product with Serializable

    Permalink

    A converter UGen that takes an audio-rate input and produces a control-rate output by means of sampling.

    A converter UGen that takes an audio-rate input and produces a control-rate output by means of sampling. The sample is always taken at the beginning of each control-block, while all other samples of the audio-rate input within that block are ignored.

    in

    audio-rate signal to convert

    See also

    T2K

    K2A

  2. final case class APF(rate: MaybeRate, in: GE, freq: GE = 440.0f, radius: GE = 0.8f) extends SingleOut with Product with Serializable

    Permalink
  3. final case class AllpassC(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    All pass delay line with cubic interpolation.

    All pass delay line with cubic interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    AllpassL

    AllpassN

  4. final case class AllpassL(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    All pass delay line with linear interpolation.

    All pass delay line with linear interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    AllpassC

    AllpassN

  5. final case class AllpassN(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    All pass delay line with no interpolation.

    All pass delay line with no interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    AllpassC

    AllpassL

  6. final case class AmpComp(rate: Rate, freq: GE = 261.626f, root: GE = 261.626f, expon: GE = 0.3333f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that produces a psychoacoustic amplitude compensation factor for a given frequency.

    A UGen that produces a psychoacoustic amplitude compensation factor for a given frequency.

    Implements the formula: (root / freq).pow(exp)

    Higher frequencies are normally perceived as louder, therefore AmpComp outputs lower values for them. For example, with default parameters, the pitch C4 (frequency 262 Hz) produces the base factor of 1.0, whereas a pitch one octave up, C5 (or 523 Hz) produces a factor of 0.793719 (an attenuation of -2 dB).

    An alternative is AmpCompA that better models the bell-shaped equal loudness contours of the hearing system. Especially note that the output of this UGen can become very high for frequencies much lower than the root parameter.

    freq

    the frequency in Hertz for which to determine the compensation factor

    root

    the base frequency corresponding to a compensation factor of 1.0

    expon

    the exponent determines how steep the compensation curve decreases for increasing frequencies. In general, the louder a signal is played, the shallower the equal loudness contours become.

    See also

    AmpCompA

  7. final case class AmpCompA(rate: Rate, freq: GE = 1000.0f, root: GE = 0.0f, minAmp: GE = 0.32f, rootAmp: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that produces a psychoacoustic amplitude compensation factor for a given frequency.

    A UGen that produces a psychoacoustic amplitude compensation factor for a given frequency. It uses the A-weighting curve that is based on the Fletcher-Munson curve for rather low volume sounds (40 phon).

    Only the freq parameter can be modulated, the other parameters are read at initialization time only.

    freq

    the frequency in Hertz for which to determine the compensation factor

    root

    the root frequency in Hertz, relative to which the curve is calculated. This is usually lowest expected frequency. (init-time only)

    minAmp

    amplitude at the minimum point of the curve. This is the factor output when freq is approx. 2512 Hz. (init-time only)

    rootAmp

    amplitude at the root frequency of the curve. This is the factor output when freq == root . (init-time only)

    See also

    AmpComp

  8. final case class Amplitude(rate: MaybeRate, in: GE, attack: GE = 0.01f, release: GE = 0.01f) extends SingleOut with Product with Serializable

    Permalink

    An amplitude follower UGen.

    An amplitude follower UGen. Tracks and reports the peak amplitude of its input signal.

    in

    input signal to be analyzed

    attack

    60 dB convergence time in for following attacks, in seconds

    release

    60 dB convergence time in for following decays, in seconds

    See also

    DetectSilence

  9. final case class ArrayMax(rate: Rate, in: GE) extends MultiOut with Product with Serializable

    Permalink

    A UGen that finds the largest value across the channels of its input signal, providing both the value and the index.

    A UGen that finds the largest value across the channels of its input signal, providing both the value and the index.

    in

    multi-channel signal to analyze

    See also

    BufMax

    ArrayMin

  10. final case class ArrayMin(rate: Rate, in: GE) extends MultiOut with Product with Serializable

    Permalink

    A UGen that finds the smallest value across the channels of its input signal, providing both the value and the index.

    A UGen that finds the smallest value across the channels of its input signal, providing both the value and the index.

    in

    multi-channel signal to analyze

    See also

    BufMin

    ArrayMax

  11. final case class AudioControl(values: IndexedSeq[Float], ctrlName: Option[String]) extends MultiOut with AudioRated with Product with Serializable

    Permalink
  12. final case class AudioControlProxy(values: IndexedSeq[Float], name: Option[String]) extends ControlProxyLike with AudioRated with Product with Serializable

    Permalink
  13. final case class BAllPass(in: GE, freq: GE = 500.0f, rq: GE = 1.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    An all pass filter UGen.

    An all pass filter UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    cutoff frequency.

    rq

    the reciprocal of Q, hence bandwidth / cutoffFreq.

  14. final case class BBandPass(in: GE, freq: GE = 500.0f, bw: GE = 1.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    An band pass filter UGen.

    An band pass filter UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    center frequency.

    bw

    the bandwidth in octaves between -3 dB frequencies

  15. final case class BBandStop(in: GE, freq: GE = 500.0f, bw: GE = 1.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    An band stop (reject) filter UGen.

    An band stop (reject) filter UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    center frequency.

    bw

    the bandwidth in octaves between -3 dB frequencies

  16. final case class BHiPass(in: GE, freq: GE = 500.0f, rq: GE = 1.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A 2nd order (12db per oct roll-off) resonant high pass filter UGen.

    A 2nd order (12db per oct roll-off) resonant high pass filter UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    cutoff frequency.

    rq

    the reciprocal of Q, hence bandwidth / cutoffFreq.

  17. final case class BHiShelf(in: GE, freq: GE = 500.0f, rs: GE = 1.0f, gain: GE = 0.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A high shelf equalizer UGen.

    A high shelf equalizer UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    cutoff frequency.

    rs

    the reciprocal of the slope S (Shell boost/cut slope). When S = 1 , the shelf slope is as steep as it can be and remain monotonically increasing or decreasing gain with frequency. The shelf slope, in dB/octave, remains proportional to S for all other values for a fixed freq/sample-rate and gain .

    gain

    boost/cut at the cutoff frequency (in decibels).

  18. final case class BLowPass(in: GE, freq: GE = 500.0f, rq: GE = 1.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A 2nd order (12db per oct roll-off) resonant low pass filter UGen.

    A 2nd order (12db per oct roll-off) resonant low pass filter UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    cutoff frequency.

    rq

    the reciprocal of Q, hence bandwidth / cutoffFreq.

  19. final case class BLowShelf(in: GE, freq: GE = 500.0f, rs: GE = 1.0f, gain: GE = 0.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A low shelf equalizer UGen.

    A low shelf equalizer UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    cutoff frequency.

    rs

    the reciprocal of the slope S (Shell boost/cut slope). When S = 1 , the shelf slope is as steep as it can be and remain monotonically increasing or decreasing gain with frequency. The shelf slope, in dB/octave, remains proportional to S for all other values for a fixed freq/sample-rate and gain .

    gain

    boost/cut at the cutoff frequency (in decibels).

  20. final case class BPF(rate: MaybeRate, in: GE, freq: GE = 440.0f, rq: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A second order band pass filter UGen.

    A second order band pass filter UGen.

    in

    input signal to be filtered

    freq

    center frequency in Hertz

    rq

    reciprocal of Q. The Q (or quality) is conventionally defined as center-frequency / bandwidth, meaning that rq  = bandwidth / center-frequency. A higher Q or lower rq produces a steeper filter.

    See also

    MidEQ

    Resonz

    BRF

    LPF

    HPF

  21. final case class BPZ2(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    a special fixed band-pass filter UGen.

    a special fixed band-pass filter UGen. Implements the formula :

    out(i) = 0.5 * (in(i) - in(i-2))

    This filter cuts out frequencies around zero Hertz and Nyquist.

    in

    input signal to be filtered

    See also

    BPF

    BRZ2

    LPZ2

    HPZ2

  22. final case class BPeakEQ(in: GE, freq: GE = 500.0f, rq: GE = 1.0f, gain: GE = 0.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    An parametric equalizer UGen.

    An parametric equalizer UGen. The B equalization suite is based on the Second Order Section (SOS) biquad UGen.

    Note: Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.

    in

    input signal to be processed.

    freq

    center frequency.

    rq

    the reciprocal of Q, hence bandwidth / cutoffFreq.

    gain

    boost/cut at the center frequency (in decibels).

  23. final case class BRF(rate: MaybeRate, in: GE, freq: GE = 440.0f, rq: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A second order band reject (notch) filter UGen.

    A second order band reject (notch) filter UGen.

    in

    input signal to be filtered

    freq

    center frequency in Hertz

    rq

    reciprocal of Q. The Q (or quality) is conventionally defined as center-frequency / bandwidth, meaning that rq  = bandwidth / center-frequency. A higher Q or lower rq produces a steeper filter. Too high values for rq may blow the filter up!

    See also

    MidEQ

    BPF

    LPF

    HPF

  24. final case class BRZ2(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    a special fixed band-reject filter UGen.

    a special fixed band-reject filter UGen. Implements the formula :

    out(i) = 0.5 * (in(i) + in(i-2))

    This filter cuts out frequencies around half of the Nyquist frequency.

    in

    input signal to be filtered

    See also

    BRF

    HPZ2

    HPZ1

  25. final case class Balance2(rate: Rate, inL: GE, inR: GE, pos: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    An equal power two channel balancing UGen.

    An equal power two channel balancing UGen. It takes a left and right input signal and attenuates them according to the pos value, producing again a stereophonic output.

    inL

    The left input signal

    inR

    The right input signal

    pos

    The balance position from -1 (left only, right muted) to +1 (right only, left muted). The curve follows an equal power law, such that left.squared + right.squared == 1 , e.g. at the middle position 0 , both channels are multiplied with factor sqrt(0.5) = 0.707 = -3 dB .

    See also

    Pan2

    XFade2

  26. final case class Ball(rate: MaybeRate, in: GE, g: GE = 1.0f, damp: GE = 0.0f, friction: GE = 0.01f) extends SingleOut with Product with Serializable

    Permalink
  27. final case class BeatTrack(chain: GE, lock: GE = 0.0f) extends SingleOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    An autocorrelation based beat tracker UGen.

    An autocorrelation based beat tracker UGen.

    The underlying model assumes 4/4, but it should work on any isochronous beat structure, though there are biases to 100-120 bpm; a fast 7/8 may not be tracked in that sense. There are four control-rate outputs, being ticks at quarter, eighth and sixteenth level from the determined beat, and the current detected tempo. Note that the sixteenth note output won't necessarily make much sense if the music being tracked has swing; it is provided just as a convenience.

    This beat tracker determines the beat, biased to the mid-tempo range by weighting functions. It does not determine the measure level, only a tactus. It is also slow reacting, using a 6 second temporal window for its autocorrelation maneuvres. Don't expect human musician level predictive tracking.

    On the other hand, it is tireless, relatively general (though obviously best at transient 4/4 heavy material without much expressive tempo variation), and can form the basis of computer processing that is decidedly faster than human.

    Warning: This UGen only works properly at 44.1 or 48.0 kHz.

    chain

    the output (buffer) of an FFT UGen which transforms the audio input to track. The expected size of FFT is 1024 for 44100 and 48000 sampling rate, and 2048 for double those. No other sampling rates are supported.

    lock

    If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase. Whilst it updates the model's phase and period, this is not reflected in the output until lock goes back below 0.5. Can be control-rate modulated.

  28. final case class BeatTrack2(bus: GE, numChannels: GE, winSize: GE = 2, phaseSpacing: GE = 0.02f, lock: GE = 0, weighting: GE = 2.1f) extends MultiOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    A template matching beat tracker UGen.

    A template matching beat tracker UGen. This beat tracker is based on exhaustively testing particular template patterns against feature streams; the testing takes place every 0.5 seconds. The two basic templates are a straight (groove=0) and a swung triplet (groove=1) pattern of 16th notes; this pattern is tried out at scaling factors corresponding to the tempi from 60 to 180 bpm. This is the cross-correlation method of beat tracking. A majority vote is taken on the best tempo detected, but this must be confirmed by a consistency check after a phase estimate. Such a consistency check helps to avoid wild fluctuating estimates, but is at the expense of an additional half second delay. The latency of the beat tracker with default settings is thus at least 2.5 seconds; because of block-based amortisation of calculation, it is actually around 2.8 seconds latency for a 2.0 second temporal window.

    This beat tracker is designed to be flexible for user needs; you can try out different window sizes, tempo weights and combinations of features. However, there are no guarantees on stability and effectiveness, and you will need to explore such parameters for a particular situation.

    The UGen has six outputs corresponding to beat-tick, eighth-tick, groove-tick, tempo, phase, and groove. Warning: it reads from input control bus instead of taking a regular control input signal as its first argument!

    bus

    index of a control bus to read from. the number of channels of that bus are expected to match the numChannels argument. To track a particular audio signal, analyse it first into numChannels features, that is onset-detection-triggers, as generated by Onsets , and write the trigger-output to this control bus.

    numChannels

    (scalar) How many features (ie how many control bus channels) are provided (init-time only)

    winSize

    (scalar) Size of the temporal window desired (2.0 to 3.0 seconds models the human temporal window). You might use longer values for stability of estimate at the expense of reactiveness.

    phaseSpacing

    (scalar) Relates to how many different phases to test. At the default of 0.02 seconds, 50 different phases spaced by those 0.02 seconds would be tried out for 60bpm; 16 would be trialed for 180 bpm. Larger phaseSpacing means more tests and more CPU cost.

    lock

    If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase. Whilst it updates the model's phase and period, this is not reflected in the output until lock goes back below 0.5. Can be control-rate modulated.

    weighting

    (scalar) Use (-2.5) for flat weighting of tempi, (-1.5) for compensation weighting based on the number of events tested (because different periods allow different numbers of events within the temporal window). If an integer from 0 upwards is given, this is specifying the ID of a buffer containing 120 frames which represent individual tempo weights; tempi go from 60 to 179 bpm in steps of one bpm, so you make sure the buffer has 120 frames.

  29. final case class BiPanB2(rate: Rate, inA: GE, inB: GE, azimuth: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    A two dimensional Ambisonics B-format encoder UGen for a two-channel input signal.

    A two dimensional Ambisonics B-format encoder UGen for a two-channel input signal. ambisonic B-format. It places the two input channels at opposite poles of the 2D (W, X, Y) Ambisonics field. It is equivalent to:

    PanB2(_, inA, azimuth, level) + PanB2(_, inB, azimuth + 1, level)
    inA

    the first (monophonic) input signal, which will appear opposite to the first second signal

    inB

    the second (monophonic) input signal, which will appear opposite to the first input signal

    See also

    DecodeB2

    PanB2

  30. sealed trait BinaryOpUGen extends SingleOut

    Permalink
  31. final case class Blip(rate: Rate, freq: GE = 440.0f, numHarm: GE = 200) extends SingleOut with Product with Serializable

    Permalink

    Band Limited ImPulse generator UGen.

    Band Limited ImPulse generator UGen. All harmonics have equal amplitude. This is the equivalent of 'buzz' in Music-N languages. It is capable of cross-fading during a control period block if the number of harmonics changes, avoiding audible pops.

    freq

    Fundamental frequency in Hertz

    numHarm

    Number of harmonics. This will be automatically limited to avoid aliasing.

    See also

    Impulse

  32. final case class BrownNoise(rate: Rate, mul: GE = 1.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A noise generator UGen whose spectrum falls off in power by 6 dB per octave.

    A noise generator UGen whose spectrum falls off in power by 6 dB per octave. The values produced by this UGen lie between -1 and +1 , the RMS is approx. -4.8 dB (the same as white noise).

    mul

    Not actually a UGen input, this argument produces a multiplication of the output by this factor. A multi-channel mul argument will cause the generation of multiple independent noise generators.

    See also

    RandSeed

    ClipNoise

    GrayNoise

    PinkNoise

    WhiteNoise

  33. final case class BufAllpassC(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    All pass delay line with cubic interpolation which uses a buffer for its internal memory.

    All pass delay line with cubic interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    BufAllpassL

    BufAllpassN

  34. final case class BufAllpassL(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    All pass delay line with linear interpolation which uses a buffer for its internal memory.

    All pass delay line with linear interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    BufAllpassC

    BufAllpassN

  35. final case class BufAllpassN(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    All pass delay line with no interpolation which uses a buffer for its internal memory.

    All pass delay line with no interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    BufAllpassC

    BufAllpassL

  36. final case class BufChannels(rate: Rate, buf: GE) extends SingleOut with Product with Serializable

    Permalink

    Returns the current number of channels of the buffer at the provided index.

    Returns the current number of channels of the buffer at the provided index.

    buf

    Buffer id.

    See also

    BufSamples

    BufFrames

  37. final case class BufCombC(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Comb delay line with cubic interpolation which uses a buffer for its internal memory.

    Comb delay line with cubic interpolation which uses a buffer for its internal memory.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower. Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    See also

    BufCombL

    BufCombN

  38. final case class BufCombL(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Comb delay line with linear interpolation which uses a buffer for its internal memory.

    Comb delay line with linear interpolation which uses a buffer for its internal memory.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower. Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    See also

    BufCombC

    BufCombN

  39. final case class BufCombN(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Comb delay line with no interpolation which uses a buffer for its internal memory.

    Comb delay line with no interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    BufCombC

    BufCombL

  40. final case class BufDelayC(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Simple delay line with cubic interpolation which uses a buffer for its internal memory.

    Simple delay line with cubic interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    See also

    BufDelayL

    BufDelayN

  41. final case class BufDelayL(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Simple delay line with linear interpolation which uses a buffer for its internal memory.

    Simple delay line with linear interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    See also

    BufDelayC

    BufDelayN

  42. final case class BufDelayN(rate: Rate, buf: GE, in: GE, delayTime: GE = 0.2f) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Simple delay line with no interpolation which uses a buffer for its internal memory.

    Simple delay line with no interpolation which uses a buffer for its internal memory.

    Warning: For reasons of efficiency, the effective buffer size is the allocated size rounded down to the next power of two. For example, if 44100 samples are allocated, the maximum delay would be 32768 samples. Also note that the buffer must be monophonic.

    buf

    Buffer id.

    in

    The input signal.

    delayTime

    Delay time in seconds.

    See also

    BufDelayC

    BufDelayL

  43. final case class BufDur(rate: Rate, buf: GE) extends SingleOut with Product with Serializable

    Permalink

    Returns the current duration of the buffer at the provided index.

    Returns the current duration of the buffer at the provided index.

    buf

    Buffer id.

    See also

    SampleDur

    BufRateScale

    BufFrames

  44. final case class BufFrames(rate: Rate, buf: GE) extends SingleOut with Product with Serializable

    Permalink

    Returns the number of allocated frames of the buffer at the provided index.

    Returns the number of allocated frames of the buffer at the provided index.

    buf

    Buffer id.

    See also

    BufDur

    BufChannels

    BufSamples

  45. final case class BufMax(rate: Rate, buf: GE, gate: GE = 1) extends MultiOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that finds the largest value in a buffer, providing both the value and the index.

    A UGen that finds the largest value in a buffer, providing both the value and the index.

    buf

    identifier of the buffer containing the values to analyze. It treats multi-channel buffers as monophonic, and indices will refer to the de-interleaved frames and channels.

    gate

    when closed (zero), holds the last output value.

    See also

    ArrayMax

    BufMin

  46. final case class BufMin(rate: Rate, buf: GE, gate: GE = 1) extends MultiOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that finds the smallest value in a buffer, providing both the value and the index.

    A UGen that finds the smallest value in a buffer, providing both the value and the index.

    buf

    identifier of the buffer containing the values to analyze. It treats multi-channel buffers as monophonic, and indices will refer to the de-interleaved frames and channels.

    gate

    when closed (zero), holds the last output value.

    See also

    ArrayMin

    BufMax

  47. final case class BufRateScale(rate: Rate, buf: GE) extends SingleOut with Product with Serializable

    Permalink

    Returns a ratio by which the playback of the buffer at the provided index is to be scaled relative to the current sample rate of the server.

    Returns a ratio by which the playback of the buffer at the provided index is to be scaled relative to the current sample rate of the server.

    buffer sample rate / server sample rate
    buf

    Buffer id.

    See also

    PlayBuf

    SampleRate

    BufSampleRate

  48. final case class BufRd(rate: Rate, numChannels: Int, buf: GE, index: GE = 0.0f, loop: GE = 1, interp: GE = 2) extends MultiOut with IsIndividual with HasDoneFlag with Product with Serializable

    Permalink

    A UGen which reads the content of a buffer, using an index pointer.

    A UGen which reads the content of a buffer, using an index pointer.

    Warning: if the supplied bufID refers to a buffer whose number of channels differs from numChannels , the UGen will fail silently.

    An alternative to BufRd is PlayBuf . While PlayBuf plays through the buffer by itself, BufRd only moves its read point by the index input and therefore has no pitch input. PlayBuf uses cubic interpolation, while BufRd has variable interpolation. PlayBuf can determine the end of the buffer and issue a done-action.

    numChannels

    number of channels that the buffer will be. Since this is an integer constant, a change in the number of channels must be reflected by creating different SynthDefs.

    buf

    the identifier of the buffer to use

    index

    audio rate frame-index into the buffer. Can be fractional.

    loop

    1 to enable looping, 0 to disable looping. this can be modulated.

    interp

    1 for no interpolation, 2 for linear, and 4 for cubic interpolation. (init-time only)

    See also

    BufRateScale

    BufFrames

    Phasor

    BufWr

    PlayBuf

  49. final case class BufSampleRate(rate: Rate, buf: GE) extends SingleOut with Product with Serializable

    Permalink

    Returns the buffer's current sample rate.

    Returns the buffer's current sample rate.

    buf

    Buffer id.

    See also

    BufRateScale

    SampleRate

  50. final case class BufSamples(rate: Rate, buf: GE) extends SingleOut with Product with Serializable

    Permalink

    Returns the current number of allocated samples in the Buffer at the provided index.

    Returns the current number of allocated samples in the Buffer at the provided index. A sample is not the same as a frame (compare with BufFrames ); a frame includes the samples in each channel of the buffer. Only for a mono buffer are samples the same as frames.

    samples = frames * numChannels
    buf

    Buffer id.

    See also

    BufDur

    BufChannels

    BufFrames

  51. final case class BufWr(rate: Rate, in: GE, buf: GE, index: GE = 0.0f, loop: GE = 1) extends SingleOut with HasSideEffect with IsIndividual with HasDoneFlag with Product with Serializable

    Permalink

    A UGen that writes a signal to a buffer, using an index pointer.

    A UGen that writes a signal to a buffer, using an index pointer.

    Warning: if the supplied bufID refers to a buffer whose number of channels differs from those of the input signal, the UGen will fail silently.

    An alternative to BufWr is RecordBuf . While RecordBuf advances the index into the buffer by itself, BufWr only moves its write point by the index input, making it possible to adjust the writing speed or to access the buffer in a non-linear way. RecordBuf can determine the end of the buffer and issue a done-action.

    in

    input signal to record

    buf

    the identifier of the buffer to use

    index

    audio rate frame-index into the buffer.

    loop

    1 to enable looping, 0 to disable looping. this can be modulated.

    See also

    BufRateScale

    BufFrames

    Phasor

    BufRd

    RecordBuf

  52. final case class COsc(rate: Rate, buf: GE, freq: GE = 440.0f, beats: GE = 0.5f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink
  53. final case class ChannelIndices(in: GE) extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A graph element that produces an integer sequence from zero until the number-of-channels of the input element.

    A graph element that produces an integer sequence from zero until the number-of-channels of the input element.

    Examples
    // cross-faded select
    play {
      val sines: GE = Seq.fill(4)(SinOsc.ar(ExpRand(200, 2000)))
      val index   = MouseX.kr(lo = 0, hi = NumChannels(sines) - 1)
      val indices = ChannelIndices(sines)
      indices.poll(0, "indices")
      val select  = 1 - (indices absdif index).min(1)
      val sig     = Mix(sines * select)
      sig * 0.2
    }
    in

    the element whose indices to produce

    See also

    NumChannels

  54. final case class ChannelProxy(elem: GE, index: Int) extends GE.Lazy with Product with Serializable

    Permalink

    A helper graph element that selects a particular output channel of another element.

    A helper graph element that selects a particular output channel of another element. The index is an Integer and thus cannot be determined at graph expansion time. If this is desired, the Select UGen can be used.

    Usually the graph element operator \ (backlash) can be used instead of explicitly writing ChannelProxy. Thus elem \ index is equivalent to ChannelProxy(elem, index). UGens with a fixed number of outputs often have auxiliary methods to access the channels in meaningful way, e.g. Pitch has method freq and hasFreq, which are equivalent to pitch \ 0 and pitch \ 1.

    Because ScalaCollider allows late-expanding graph elements, we have no direct way to get some array of a UGen's outputs.

    Examples
    // frequency of a pitch estimator
    play {
      val sin = SinOsc.ar(MouseX.kr(10, 10000, warp = 1))
      val pch = Pitch.kr(sin)
      val freq = pch \ 0  // same as pch.freq
      freq.poll(label = "freq")
      ()
    }
    elem

    a multi-channel element from which to select a channel.

    index

    channel index starting at zero. It automatically wraps around the actual number of channels the input elem expands to.

    See also

    Select

    NumChannels

  55. final case class ChannelRangeProxy(elem: GE, from: Int, until: Int, step: Int) extends GE.Lazy with Product with Serializable

    Permalink

    A helper graph element that selects a particular range of output channel of another element.

    A helper graph element that selects a particular range of output channel of another element. The range is specified with integers and thus cannot be determined at graph expansion time. If this is desired, the Select UGen can be used.

    Usually the graph element operator \ (backlash) along with a standard Scala Range argument can be used instead of explicitly writing ChannelRangeProxy. Thus elem \ (0 until 4) selects the first four channels and is equivalent to ChannelRangeProxy(elem, from = 0, until = 4, step = 1).

    Behind the scene, ChannelProxy instances are created, thus ChannelRangeProxy(x, a, b) is the same as (a until b).map(ChannelProxy(x, _)): GE.

    Because ScalaCollider allows late-expanding graph elements, we have no direct way to get some array of a UGen's outputs.

    elem

    a multi-channel element from which to select channels.

    from

    the first index (inclusive) of the channel range, counting from zero.

    until

    the end index (exclusive) of the channel range, counting from zero.

    step

    the increment from index to index in the range. A value of one means all channels from from until until will be selected. A value of two means, every second channel will be skipped. A negative value can be used to count down from high to low indices.

    See also

    RepeatChannels

    ChannelProxy

    Select

    NumChannels

  56. final case class CheckBadValues(rate: Rate, in: GE, id: GE = 0, post: GE = 2) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen to test for infinity, not-a-number (NaN), and denormal numbers.

    A UGen to test for infinity, not-a-number (NaN), and denormal numbers. Its output is as follows: 0 = a normal float, 1 = NaN, 2 = infinity, and 3 = a denormal. According to the post settings it will print the information to the console along with a given identifier.

    in

    the signal to be tested

    id

    an identifier showing up with the values in the console

    post

    One of three post modes: 0 = no posting; 1 = post a line for every bad value; 2 = post a line only when the floating-point classification changes (e.g., normal -> NaN and vice versa)

  57. final case class CircleRamp(rate: MaybeRate, in: GE, dur: GE = 0.1f, lo: GE = 180, hi: GE = 180) extends SingleOut with Product with Serializable

    Permalink

    This is a UGen like Ramp , but it always takes the shortest way around a defined circle, wrapping values where appropriate.

    This is a UGen like Ramp , but it always takes the shortest way around a defined circle, wrapping values where appropriate. This can be useful when smoothing panning signals for speaker rings, for instance in Vector Base Amplitude Panning.

    in

    The signal to be smoothed.

    dur

    Ramp duration in seconds

    lo

    The lower wrap value

    hi

    The upper wrap value

    See also

    Lag

    Ramp

    VBAP

  58. final class ClassGenerator extends Refactoring with Tracing with CompilerProvider with CompilerAccess with TreeFactory

    Permalink
  59. final case class ClearBuf(buf: GE) extends SingleOut with ScalarRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A scalar (init-time) UGen that fills the contents of a buffer with zeroes.

    A scalar (init-time) UGen that fills the contents of a buffer with zeroes.

    buf

    the buffer to clear

    See also

    SetBuf

    LocalBuf

  60. final case class Clip(rate: Rate, in: GE, lo: GE = 0.0f, hi: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that constrains a signal to a given range, by limiting values outside the range to the range margins.

    A UGen that constrains a signal to a given range, by limiting values outside the range to the range margins. This is similar to the clip2 binary operator but permits both a lower range value lo and an upper range value hi .

    Mathematically, this is equivalent to in.max(lo).min(hi).

    Be aware that there seems to be an initialization bug. The following crashes, indicating that Clip.ar outputs a zero initially:

    {{ play { val bar = Integrator.ar(DC.ar(0), coeff = 0.999) val foo = Clip.ar(bar, lo = 1.0, hi = 44100.0) // .max(1.0) val sum = RunningSum.ar(DC.ar(0), length = foo) sum.poll(1, "sum") () } }}

    in

    input signal to constrain

    lo

    lower margin of clipping

    hi

    upper margin of clipping

    See also

    Fold

    Wrap

  61. final case class ClipNoise(rate: Rate, mul: GE = 1.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A noise generator UGen whose values are either -1 or +1 (before being multiplied by mul ).

    A noise generator UGen whose values are either -1 or +1 (before being multiplied by mul ). This produces the maximum energy (an RMS of 0 dB) for the least peak to peak amplitude.

    mul

    Not actually a UGen input, this argument produces a multiplication of the output by this factor. A multi-channel mul argument will cause the generation of multiple independent noise generators.

    See also

    Dust

    LFNoise0

    RandSeed

    GrayNoise

    BrownNoise

    PinkNoise

    WhiteNoise

    LFClipNoise

  62. final case class CoinGate(rate: MaybeRate, in: GE, prob: GE = 0.5f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that randomly filters an input trigger signal.

    A UGen that randomly filters an input trigger signal. When a trigger arrives, it may pass with a probability given by the prob argument.

    in

    the input triggers to filter

    prob

    the probability between zero (no trigger passed) and 1 (all triggers passed)

    Note

    The argument order is different from its sclang counterpart.

    See also

    TRand

    PulseDivider

    Gate

  63. final case class CombC(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    Comb delay line with cubic interpolation.

    Comb delay line with cubic interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    CombL

    CombN

  64. final case class CombL(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    Comb delay line with linear interpolation.

    Comb delay line with linear interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    CombC

    CombN

  65. final case class CombN(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    Comb delay line with no interpolation.

    Comb delay line with no interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. If this time is negative then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.

    See also

    CombC

    CombL

  66. final case class Compander(rate: Rate, in: GE, ctrl: GE, thresh: GE = 0.5f, ratioBelow: GE = 1.0f, ratioAbove: GE = 1.0f, attack: GE = 0.01f, release: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A compressor, expander, limiter, gate and ducking UGen.

    A compressor, expander, limiter, gate and ducking UGen. This dynamic processor uses a hard-knee characteristic. All of the thresholds and ratios are given as direct values, not in decibels!

    in

    The signal to be compressed / expanded / gated.

    ctrl

    The signal whose amplitude controls the processor. Often the same as in, but one may wish to apply equalization or delay to it to change the compressor character (side-chaining), or even feed a completely different signal, for instance in a ducking application.

    thresh

    Control signal amplitude threshold, which determines the break point between slopeBelow and slopeAbove. Usually 0..1. The control signal amplitude is calculated using RMS.

    ratioBelow

    Slope of the amplitude curve below the threshold. If this slope > 1.0, the amplitude will drop off more quickly the softer the control signal gets; when the control signal is close to 0 amplitude, the output should be exactly zero -- hence, noise gating. Values < 1.0 are possible, but it means that a very low-level control signal will cause the input signal to be amplified, which would raise the noise floor.

    ratioAbove

    Slope of the amplitude curve above the threshold. Values < 1.0 achieve compression (louder signals are attenuated); > 1.0, you get expansion (louder signals are made even louder). For 3:1 compression, you would use a value of 1/3 here.

    attack

    The amount of time it takes for the amplitude adjustment to kick in fully. This is usually pretty small, not much more than 10 milliseconds (the default value). I often set it as low as 2 milliseconds (0.002).

    release

    The amount of time for the amplitude adjustment to be released. Usually a bit longer than attack; if both times are too short, you can get some (possibly unwanted) artifacts.

    See also

    Normalizer

    Limiter

  67. final case class Constant(value: Float) extends UGenIn with ScalarRated with Product with Serializable

    Permalink

    A scalar constant used as an input to a UGen.

    A scalar constant used as an input to a UGen. These constants are stored in a separate table of the synth graph.

  68. final case class Control(rate: Rate, values: IndexedSeq[Float], ctrlName: Option[String]) extends MultiOut with Product with Serializable

    Permalink
  69. final case class ControlDur() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A UGen that reports the server's current control period in seconds.

    A UGen that reports the server's current control period in seconds. This is equivalent to the reciprocal of ControlRate

    See also

    SampleDur

    ControlRate

  70. final class ControlFactory extends ControlFactoryLike

    Permalink
  71. trait ControlFactoryLike extends AnyRef

    Permalink
  72. final case class ControlProxy(rate: Rate, values: IndexedSeq[Float], name: Option[String]) extends ControlProxyLike with Product with Serializable

    Permalink
  73. final class ControlProxyFactory extends AnyVal

    Permalink
  74. trait ControlProxyLike extends GE

    Permalink
  75. final case class ControlRate() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A UGen that reports the server's current control rate.

    A UGen that reports the server's current control rate. This is equivalent to the reciprocal of ControlDur

    See also

    SampleRate

    ControlDur

  76. final case class ControlUGenOutProxy(source: ControlProxyLike, outputIndex: Int) extends UGenIn with Product with Serializable

    Permalink

    A ControlOutProxy is similar to a UGenOutProxy in that it denotes an output channel of a control UGen.

    A ControlOutProxy is similar to a UGenOutProxy in that it denotes an output channel of a control UGen. However it refers to a control-proxy instead of a real control ugen, since the proxies are synthesized into actual ugens only at the end of a synth graph creation, in order to clump several controls together. ControlOutProxy instance are typically returned from the ControlProxyFactory class, that is, using the package implicits, from calls such as "myControl".kr.

  77. final case class ControlValues(seq: IndexedSeq[Float]) extends Product with Serializable

    Permalink
  78. final case class Convolution(rate: Rate, in: GE, kernel: GE, frameSize: GE) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that performs a convolution with an continuously changing kernel.

    A UGen that performs a convolution with an continuously changing kernel. If the kernel is static or must only change occasionally, Convolution2 will be a more CPU friendly alternative. The process introduces a delay of frameSize - blockSize .

    in

    first operand of the convolution

    kernel

    second operand of the convolution

    frameSize

    convolution size in sample frames, which is half of the FFT size. Must be a power of two. There is maximum frame-size of 16384 (if exceeded, the server may crash). (init-time only)

    See also

    Convolution2

    Convolution2L

    PartConv

  79. final case class Convolution2(rate: Rate, in: GE, kernel: GE, trig: GE = 1, frameSize: GE) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A frequency-domain convolution UGen using a fixed kernel which can be updated by a trigger signal.

    A frequency-domain convolution UGen using a fixed kernel which can be updated by a trigger signal. The delay caused by the convolution when the kernel is a dirac impulse is equal to frameSize - controlBlockSize , so for a frameSize of 2048 and a control-block size of 64, this is 1984 sample frames.

    in

    the realtime input to be convolved

    kernel

    buffer identifier for the fixed kernel, which may be modulated in combination with the trigger. Even a trigger input of zero is used, upon UGen initialization the kernel must point to a valid buffer, otherwise the UGen aborts.

    trig

    updates the kernel on a change from non-positive to positive (<= 0 to >0)

    frameSize

    size of the kernel. this must be a power of two. the FFT calculated internally by the UGen has a size of twice this value. The maximum allowed frameSize is 16384. (init-time only)

    See also

    Convolution

    Convolution2L

    PartConv

  80. final case class Convolution2L(rate: Rate, in: GE, kernel: GE, trig: GE = 1, frameSize: GE, fadePeriods: GE = 1) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A frequency-domain convolution UGen using two linearly interpolated fixed kernels.

    A frequency-domain convolution UGen using two linearly interpolated fixed kernels. When a trigger is received, a linear fade will be performed from the previously used kernel (internally stored by the UGen) towards the snapshot of the current kernel content upon receiving the trigger.

    The delay caused by the convolution when the kernel is a dirac impulse is equal to frameSize - controlBlockSize , so for a frameSize of 2048 and a control-block size of 64, this is 1984 sample frames.

    Note: If a trigger is received before the previous fade is complete, the interpolation is broken and the kernel instead jumps straight to one of the two buffers.

    in

    the realtime input to be convolved

    kernel

    buffer identifier for the fixed kernel, which may be modulated in combination with the trigger. Even a trigger input of zero is used, upon UGen initialization the kernel must point to a valid buffer, otherwise the UGen aborts.

    trig

    begins a fade to update the kernel on a change from non-positive to positive (<= 0 to >0).

    frameSize

    size of the kernel. this must be a power of two. the FFT calculated internally by the UGen has a size of twice this value. The maximum allowed frameSize is 16384. (init-time only)

    fadePeriods

    fade duration expressed as number of convolved blocks. If the desired duration in seconds is dur , then the number of periods can be calculated as fadePeriods = dur * SampleRate.ir / frameSize . (init-time only)

    See also

    Convolution

    Convolution2

    PartConv

  81. final case class Convolution3(rate: Rate, in: GE, kernel: GE, trig: GE = 1, frameSize: GE) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen for triggered convolution in the time domain.

    A UGen for triggered convolution in the time domain.

    Warning: This UGen seems currently broken (SC 3.6.3)

    in

    the realtime input to be convolved

    kernel

    buffer identifier for the fixed kernel, which may be modulated in combination with the trigger. Even a trigger input of zero is used, upon UGen initialization the kernel must point to a valid buffer, otherwise the UGen aborts.

    frameSize

    (init-time only)

    See also

    Convolution2L

    Convolution

    Convolution2

    PartConv

  82. final case class Crackle(rate: Rate, chaos: GE = 1.5f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A noise generator UGen based on a chaotic function.

    A noise generator UGen based on a chaotic function. Output values lie between zero and one. Although this is a deterministic process, it is randomly seeded.

    chaos

    A parameter of the chaotic function with useful values from just below 1.0 to just above 2.0. Towards 2.0 the sound crackles. Values greater than 2.01 are not safe, as the UGen can switch to outputting NaNs. A early more crackling sound appears with a value of 1.33 .

    See also

    Logistic

    LatoocarfianN

    Dust

  83. final case class CuspL(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 1.9f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A linear-interpolating sound generator based on the difference equation:

    A linear-interpolating sound generator based on the difference equation:

    x[n+1] = a - b * sqrt(abs(x[n]))
    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    xi

    Initial value of x

    See also

    CuspN

  84. final case class CuspN(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 1.9f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equation:

    A non-interpolating sound generator based on the difference equation:

    x[n+1] = a - b * sqrt(abs(x[n]))
    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    xi

    Initial value of x

    See also

    CuspL

  85. final case class DC(rate: Rate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that creates a constant signal at a given calculation rate.

    A UGen that creates a constant signal at a given calculation rate.

    in

    constant value to output, fixed at initialisation time. (init-time only)

    See also

    LeakDC

  86. final case class DFM1(rate: Rate, in: GE, freq: GE = 440, res: GE = 0.1f, gain: GE = 1.0f, mode: GE = 0, noise: GE = 3.0E-4f) extends SingleOut with Product with Serializable

    Permalink

    A digital filter UGen which aims at accurately modeling an analog filter.

    A digital filter UGen which aims at accurately modeling an analog filter. It provides low-pass and high-pass modes, and the filter can be overdriven and will self-oscillate at high resonances.

    in

    Input signal to filter.

    freq

    Cutoff frequency in Hertz.

    res

    Resonance of the filter. Resonance is minimal at 0.0 and high at 1.0 , above which the filter starts overdrive and sound saturated (e.g. 1.2 ).

    gain

    Linear gain applied to the input signal.

    mode

    The filter can be used in low-pass ( 0 ) or high-pass ( 1 ) mode.

    noise

    Amount (amplitude) of noise added to the model.

  87. final case class Dbrown(lo: GE = 0.0f, hi: GE = 1.0f, step: GE = 0.01f, length: GE = inf) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen that produces random decimal numbers, analogous to a Brownian motion.

    A demand-rate UGen that produces random decimal numbers, analogous to a Brownian motion.

    lo

    minimum value (inclusive)

    hi

    minimum value (inclusive)

    step

    the maximum step a value can take from the previous value

    length

    length of the sequence or inf

    See also

    Demand

    BrownNoise

    Dibrown

    Dwhite

  88. final case class Dbufrd(buf: GE, index: GE = 0, loop: GE = 1) extends SingleOut with DemandRated with IsIndividual with HasDoneFlag with Product with Serializable

    Permalink

    A demand-rate UGen that reads out a buffer.

    A demand-rate UGen that reads out a buffer. All inputs can be either demand UGens or any other UGens.

    buf

    the identifier of the buffer to read out

    index

    the frame index into the buffer

    loop

    whether to wrap an exceeding phase around the buffer length (1) or not (0)

    See also

    Dbufwr

    BufRd

  89. final case class Dbufwr(in: GE, buf: GE, index: GE = 0, loop: GE = 1) extends SingleOut with DemandRated with HasSideEffect with IsIndividual with HasDoneFlag with Product with Serializable

    Permalink
  90. final case class Decay(rate: MaybeRate, in: GE, time: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    An integrator UGen with exponential decay of past values.

    An integrator UGen with exponential decay of past values. This is essentially the same as Integrator except that instead of supplying the coefficient directly, it is calculated from a 60 dB decay time. This is the time required for the integrator to lose 99.9 % of its value or -60dB.

    Note: This should not be confused with Lag which does not overshoot due to integration, but asymptotically follows the input signal.

    in

    input signal to be processed

    See also

    Lag

    Decay2

    Integrator

  91. final case class Decay2(rate: MaybeRate, in: GE, attack: GE = 0.01f, release: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A integrator UGen with controllable attack and release times.

    A integrator UGen with controllable attack and release times. While Decay has a very sharp attack and can produce clicks, Decay2 rounds off the attack by subtracting one Decay from another. It can be seen as equivalent to

    Decay.ar(in, release) - Decay.ar(in, attack)

    Note: This should not be confused with LagUD which does not overshoot due to integration, but asymptotically follows the input signal.

    in

    input signal to be processed

    See also

    LagUD

    Integrator

    Decay

  92. final case class DecodeB2(rate: Rate, numChannels: Int, w: GE, x: GE, y: GE, orient: GE = 0.5f) extends MultiOut with Product with Serializable

    Permalink

    A two dimensional Ambisonics B-format decoding UGen.

    A two dimensional Ambisonics B-format decoding UGen. It assumes a set of speakers in a regular polygon. The output channels are in clockwise order. The position of the first speaker is specified by the orient argument.

    numChannels

    the number of output channels to produce

    w

    W (first) channel of B-format input signal

    x

    X (second) channel of B-format input signal

    y

    Y (third) channel of B-format input signal

    orient

    orientation of the first channel. If zero, the first channel corresponds to the front vertex of the polygon. If the polygon does not have an edge at the front but a vertex, then an orient of 0.5 indicates that the first channel corresponds to the speaker left of the center.

    See also

    PanB2

    PanB

  93. final case class DegreeToKey(rate: Rate, buf: GE, in: GE, octave: GE = 12) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that uses an input signal as an index into an octave repeating table of pitch classes.

    A UGen that uses an input signal as an index into an octave repeating table of pitch classes. The input is truncated to an integer, and indices wrap around the table and shift octaves as they do.

    buf

    buffer which contains the steps for each scale degree.

    in

    input index signal

    octave

    number of steps per octave in the scale.

    See also

    WrapIndex

  94. final case class DelTapRd(rate: Rate, buf: GE, phase: GE, delayTime: GE, interp: GE = 1) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    Tap a delay line from a DelTapWr UGen.

    Tap a delay line from a DelTapWr UGen.

    buf

    Buffer where DelTapWr has written signal. Max delay time is based on buffer size.

    phase

    the current phase of the DelTapWr UGen. This is the output of DelTapWr.

    delayTime

    Delay time in seconds.

    interp

    The kind of interpolation to be used. 1 is none, 2 is linear, 4 is cubic..

    See also

    DelTapWr

  95. final case class DelTapWr(rate: Rate, buf: GE, in: GE) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    Write to a buffer for a DelTapRd UGen

    Write to a buffer for a DelTapRd UGen

    buf

    The buffer to write signal into. Max delay time is based on buffer size. DelTapWr outputs its current sample value for use in the phase argument of DelTapRd .

    in

    The input signal.

    See also

    DelTapRd

  96. final case class Delay1(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that delays the input by 1 audio frame or control period.

    A UGen that delays the input by 1 audio frame or control period.

    For audio-rate signals the delay is 1 audio frame, and for control-rate signals the delay is 1 control period.

    Note: The first value output is not zero but the same as the first input value! In this respect the UGen behaves different than DelayN .

    in

    input to be delayed

    See also

    DelayN

    Delay2

  97. final case class Delay2(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that delays the input by 2 audio frames or control periods.

    A UGen that delays the input by 2 audio frames or control periods.

    For audio-rate signals the delay is 2 audio frames, and for control-rate signals the delay is 2 control periods.

    Warning: the The first value output is zero, while both the second and the third value output equal the first input value! In this respect the UGen behaves different than DelayN .

    in

    input to be delayed

    See also

    DelayN

    Delay1

  98. final case class DelayC(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f) extends SingleOut with Product with Serializable

    Permalink

    Simple delay line with cubic interpolation.

    Simple delay line with cubic interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    See also

    DelayL

    DelayN

  99. final case class DelayL(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f) extends SingleOut with Product with Serializable

    Permalink

    Simple delay line with linear interpolation.

    Simple delay line with linear interpolation.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    See also

    DelayC

    DelayN

  100. final case class DelayN(rate: Rate, in: GE, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f) extends SingleOut with Product with Serializable

    Permalink

    Simple delay line with no interpolation.

    Simple delay line with no interpolation. The initial buffer contents is zero.

    in

    The input signal.

    maxDelayTime

    The maximum delay time in seconds. used to initialize the delay buffer size. (init-time only)

    delayTime

    Delay time in seconds.

    See also

    DelayC

    DelayL

  101. final case class Demand(rate: MaybeRate, trig: GE, in: GE, reset: GE = 0) extends MultiOut with HasDoneFlag with Product with Serializable

    Permalink

    A UGen which polls results from demand-rate ugens when receiving a trigger.

    A UGen which polls results from demand-rate ugens when receiving a trigger. When there is a trigger at the trig input, a value is demanded from each ugen in the in input and output. The unit generators in the list should be demand-rate. When there is a trigger at the reset input, the demand rate ugens in the list are reset.

    Note: By design, a reset trigger only resets the demand ugens; it does not reset the value at Demand's output. Demand continues to hold its value until the next value is demanded, at which point its output value will be the first expected item in the in argument.

    Note: One demand-rate ugen represents a single stream of values, so that embedding the same ugen twice calls this stream twice per demand, possibly yielding different values. To embed the same sequence twice, either make sure the ugen is demanded only once, or create two instances of the ugen.

    Warning: Demand currently seems to have problems with infinite sequences. As a workaround use a very large length instead. E.g. instead of Dbrown(0, 1, inf) use Dbrown(0, 1, 0xFFFFFFFF) !

    Warning: Demand seems to have a problem with initial triggers. For example Demand.kr(Impulse.kr(0), 1) will have a spurious zero value output first.

    trig

    trigger. Can be any signal. A trigger happens when the signal changes from non-positive to positive.

    in

    a demand-rate signal (possibly multi-channel) which is read at each trigger

    reset

    trigger. Resets the list of ugens (in) when triggered.

    Note

    The argument order is different from its sclang counterpart.

    See also

    TDuty

    Duty

  102. final case class DemandEnvGen(rate: Rate, levels: GE, durs: GE, shapes: GE = 1, curvatures: GE = 0.0f, gate: GE = 1.0f, reset: GE = 1.0f, levelScale: GE = 1.0f, levelBias: GE = 0.0f, timeScale: GE = 1.0f, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    An envelope generator UGen using demand-rate inputs for the envelope segments.

    An envelope generator UGen using demand-rate inputs for the envelope segments. For each parameter of the envelope (levels, durations and shapes), values are polled every time a new segment starts.

    levels

    demand-rate ugen (or other ugen) returning level values

    durs

    demand-rate ugen (or other ugen) returning duration values

    shapes

    demand-rate ugen (or other ugen) returning shape number for the envelope segment.

    curvatures

    demand-rate ugen (or other ugen) returning curvature values. these are used for curveShape segments (shape number 5) and should be zero for other shapes.

    gate

    a control rate gate: if gate is x >= 1, the ugen runs. if gate is 0 > x > 1, the ugen is released at the next level (according to doneAction). if gate is x <= 0, the ugen is sampled and held.

    reset

    a trigger signal. a trigger occurs when passing from non-positive to positive. when the trigger amplitude is < 1, the input ugens (those that are demand-rated) are reset when the current segment ends. if the trigger amplitude is > 1, the reset is performed immediately.

    levelScale

    demand-rate ugen returning level scaling values

    levelBias

    demand-rate ugen returning level offset values

    timeScale

    demand-rate ugen returning time scaling values

    doneAction

    a done action performed when one of the demand-rated series ends

    See also

    DoneAction

    Env

    EnvGen

  103. final case class DetectIndex(rate: Rate, buf: GE, in: GE) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen which determines the index in a buffer at which the value matches a given input signal.

    A UGen which determines the index in a buffer at which the value matches a given input signal. If the input value is not found, it outputs -1.

    For example, if the buffer contains values 5, 3, 2, 8, and the input signal is 3, the output will be 1. If the input is 3.001, the output will be -1. Unlike IndexInBetween , this UGen always searches through the entire buffer until the value is found or the end has been reached (returning -1).

    See also

    IndexInBetween

    Index

  104. final case class DetectSilence(rate: MaybeRate, in: GE, amp: GE = 1.0E-4f, dur: GE = 0.1f, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen which detects whether its input signal falls below a given amplitude for a given amount of time (becoming "silent").

    A UGen which detects whether its input signal falls below a given amplitude for a given amount of time (becoming "silent"). A silence is detected if the absolute sample values of the input remain less than or equal to the amp threshold for a consecutive amount of time given by the dur argument.

    A value of 1 is output when this condition is met, and a value of 0 is output when the condition is not met (i.e. at least one sample occurs in the input whose absolute value is greater than amp ). Besides, when the output changes from zero to one, the doneAction is executed (unless it is doNothing ).

    A special case is the initial condition of the UGen: It will begin with an output value of 0 (no silence detected), even if the input signal is below the amplitude threshold. It is only after the first input sample rising above the threshold that the actual monitoring begins and a trigger of 1 or the firing of the done-action may occur.

    in

    input signal to be measured.

    amp

    minimum amplitude threshold which must be exceeded for the input signal to be considered non-silent. (init-time only)

    dur

    The duration in seconds for which the input signal must be continuously smaller than or equal to the threshold to be considered silent. (init-time only)

    doneAction

    an action to be performed when the output changes from zero to one (silence detected).

    See also

    Amplitude

  105. final case class Dgeom(start: GE = 1.0f, grow: GE = 2.0f, length: GE = inf) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen that produces a geometric series.

    A demand-rate UGen that produces a geometric series. Each value is calculated as

    x[t] = x[t-1] * grow

    With x[0] given as argument start.

    start

    initial value

    grow

    factor (multiplier) by which values grow

    length

    length of the sequence or inf

    See also

    Demand

    Dseries

  106. final case class Dibrown(lo: GE = 0, hi: GE = 1, step: GE = 1, length: GE = inf) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen that produces random integer numbers, analogous to a Brownian motion, or the drunk object in Max.

    A demand-rate UGen that produces random integer numbers, analogous to a Brownian motion, or the drunk object in Max.

    Note: The length parameter seems currently broken.

    lo

    minimum value (inclusive)

    hi

    maximum value (inclusive)

    step

    the maximum step a value can take from the previous value

    length

    length of the sequence or inf . This is currently (SuperCollider 3.7.2) broken, and the sequence always has infinite length.

    See also

    Demand

    BrownNoise

    Dbrown

    Diwhite

  107. final case class DiskIn(rate: Rate, numChannels: Int, buf: GE, loop: GE = 0) extends MultiOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen to stream in a signal from an audio file.

    A UGen to stream in a signal from an audio file. Continuously plays a longer audio file from disk. This requires a buffer to be preloaded with one buffer size of sound. If loop is set to 1, the file will loop.

    Note: The buffer size must be a multiple of (2 * the server's block size). See Buffer#cue for details.

    numChannels

    the amount of channels the file and the buffer will have. This is an Int and hence must be pre-determined. Different SynthDefs must be created for different numbers of channels.

    buf

    the id of the buffer with the correct number of channels and frames

    loop

    whether the file should loop when its end is reached

    See also

    PlayBuf

    VDiskIn

    Buffer#cue

  108. final case class DiskOut(rate: Rate, buf: GE, in: GE) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen which writes a signal to a sound file on disk.

    A UGen which writes a signal to a sound file on disk. To achieve this efficiently, a buffer is needs to be provides which is used to buffer the incoming signal.

    Note: It might be that the buffer size must be a multiple of (2 * the server's block size). We haven't currently verified this, but to be safe, you should make sure this property is met.

    The signal output by the UGen represents the number of frames written.

    buf

    the buffer used internally by the UGen. this number of frames in the buffer must be a power of two (this is currently not checked!). The buffer must have been initialized with a write command whose leaveOpen argument is true. Note that the number of channels of the buffer and of the input signal must be the same, otherwise DiskOut will fail silently (and not write anything to the file). Warning: Crashes the server if the number of channels exceeds 32.

    in

    the signal to be recorded

    See also

    RecordBuf

    DiskIn

    Buffer#write

  109. final case class Diwhite(lo: GE = 0, hi: GE = 1, length: GE = inf) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen that produces equally distributed random integer numbers.

    A demand-rate UGen that produces equally distributed random integer numbers.

    lo

    minimum value (inclusive)

    hi

    maximum value (inclusive)

    length

    length of the sequence or inf

    See also

    Demand

    TIRand

    IRand

    Dibrown

    Dwhite

  110. final case class Donce(in: GE) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink
  111. final case class Done(src: GE with HasDoneFlag) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen which monitors another UGen to see when it is finished.

    A UGen which monitors another UGen to see when it is finished. Some UGens, such as PlayBuf , RecordBuf , Line , XLine , EnvGen , Linen , BufRd , BufWr , DbufRd , and the Buffer delay UGens set a 'done' flag when they are finished playing. This UGen echoes that flag as an explicit output signal when it is set to track a particular UGen. When the tracked UGen changes to done, the output signal changes from zero to one.

    src

    the UGen to track

    See also

    EnvGen

    Line

    PlayBuf

  112. final case class Dpoll(in: GE, label: String = "poll", run: GE = 1, trigID: GE = 1) extends SingleOut with DemandRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A demand rate UGen printing the current output value of its input to the console when polled.

    A demand rate UGen printing the current output value of its input to the console when polled.

    in

    the signal you want to poll

    label

    a string or symbol to be printed with the polled value (init-time only)

    run

    if 1 the polling is active, if 0 it is inactive.

    trigID

    if greater then 0, a "/tr" OSC message is sent back to the client (similar to SendTrig )

    See also

    Poll

    SendTrig

  113. final case class Drand(seq: GE, repeats: GE = 1) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen which outputs random elements from a sequence.

    A demand-rate UGen which outputs random elements from a sequence. Drand allows duplicate elements to appear, whereas Dxrand forbids repetitions.

    seq

    A multi-channel signal providing the values at each step of the sequence. Typically (but not necessarily) a sequence of constant values.

    repeats

    The number of items polled from the sequence

    See also

    Diwhite

    Dxrand

    Dser

    Demand

  114. final case class Dreset(in: GE, reset: GE) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen that, when triggered, resets the state of its in argument.

    A demand-rate UGen that, when triggered, resets the state of its in argument.

    in

    a demand-rate UGen, producing values which are passed through, and which will be reset by this UGen

    reset

    a demand-rate or any other UGen. When crossing from non-positive to positive, Dreset resets its in argument.

    See also

    Duty

    Demand

  115. final case class Dseq(seq: GE, repeats: GE = 1) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen which reproduces and repeats a sequence of values.

    A demand-rate UGen which reproduces and repeats a sequence of values.

    The arguments can be constant or any other ugens, where demand rate UGens are normally polled, proceeding to the next value when the sub-sequence ends.

    seq

    A multi-channel signal providing the values at each step of the sequence. Typically (but not necessarily) a sequence of constant values.

    repeats

    The number of repetitions of the entire sequence

    See also

    Dser

    Demand

  116. final case class Dser(seq: GE, repeats: GE = 1) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen which reproduces and repeats values of a sequence.

    A demand-rate UGen which reproduces and repeats values of a sequence. It is very similar to Dseq , the difference being that the repeats parameter specifies the length of output sequence, not the number of repetitions of the input sequence. The input sequence is repeated if repeats is greater than the length of the input sequence.

    The arguments can be constant or any other ugens, where demand rate UGens are normally polled, proceeding to the next value when the sub-sequence ends.

    seq

    A multi-channel signal providing the values at each step of the sequence. Typically (but not necessarily) a sequence of constant values.

    repeats

    The number of items polled from the sequence

    See also

    Dseq

    Demand

  117. final case class Dseries(start: GE = 0.0f, step: GE = 1.0f, length: GE = inf) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen which produces an arithmetic (linear) series.

    A demand-rate UGen which produces an arithmetic (linear) series.

    The arguments can be constant or any other ugens.

    start

    the start value of the series

    step

    the incremental step by which the series changes. the step is added to the previous value on each demand.

    length

    the number of elements to produces (maybe be infinite)

    See also

    Dseq

    Dgeom

  118. final case class Dshuf(seq: GE, repeats: GE = 1) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen which outputs a randomly shuffled version of an input sequence.

    A demand-rate UGen which outputs a randomly shuffled version of an input sequence. The sequence is only shuffled once, thus when repeats is greater than one, the same randomized sequence will be repeated, until the UGen is reset. This happens for example, when it is nested inside a Dseq , as shown in the example "reshuffle".

    seq

    A multi-channel signal providing the values at each step of the sequence. Typically (but not necessarily) a sequence of constant values.

    repeats

    The number of repetitions of the entire sequence

    See also

    Dshuf

    Drand

    Dser

    Demand

  119. final case class Dstutter(n: GE, in: GE) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink
  120. final case class Dswitch(seq: GE, index: GE) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink
  121. final case class Dswitch1(seq: GE, index: GE) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink
  122. final case class Dust(rate: Rate, density: GE = 1.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen generating random impulses with values ranging from 0 to +1 .

    A UGen generating random impulses with values ranging from 0 to +1 . The pulse duration is one sample for audio-rate and one block for control-rate operation.

    The approximate RMS energy is (density/sr).log2 * 3 - 4.8 where sr is the sample-rate. For example, at 44.1 kHz, a density of 1000 Hz yields an RMS of approx. -21.2 dB.

    density

    the average number of impulses per second

    See also

    CoinGate

    GrayNoise

    ClipNoise

    RandSeed

    TRand

    Dust2

  123. final case class Dust2(rate: Rate, density: GE = 1.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen generating random impulses with values ranging from -1 to +1 .

    A UGen generating random impulses with values ranging from -1 to +1 . The pulse duration is one sample for audio-rate and one block for control-rate operation.

    density

    the average number of impulses per second

    See also

    CoinGate

    ClipNoise

    RandSeed

    TRand

    Dust

  124. final case class Duty(rate: Rate, dur: GE = 1.0f, level: GE, reset: GE = 0, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen which polls results from demand-rate ugens in intervals specified by a duration input.

    A UGen which polls results from demand-rate ugens in intervals specified by a duration input. A value from the level ugen is demanded and output according to a stream of duration values. When there is a trigger at the reset input, the level and the dur input are reset.

    dur

    the provider of time values. Can be a demand-rate ugen or any signal. The next poll is acquired after the previous duration.

    level

    a demand-rate ugen providing the output values.

    reset

    a trigger which resets the dur input (if demand-rated) and the the level input ugen. The reset input may also be a demand-rate ugen, in this case providing a stream of reset times.

    doneAction

    a doneAction that is evaluated when the duration stream ends.

    Note

    The argument order is different from its sclang counterpart.

    See also

    DoneAction

    Demand

    TDuty

  125. final case class Dwhite(lo: GE = 0.0f, hi: GE = 1.0f, length: GE = inf) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen that produces random decimal numbers with a constant spectral density, equivalent to WhiteNoise for audio- or control-rate.

    A demand-rate UGen that produces random decimal numbers with a constant spectral density, equivalent to WhiteNoise for audio- or control-rate.

    lo

    minimum value (inclusive)

    hi

    maximum value (inclusive)

    length

    length of the sequence or inf

    See also

    Demand

    WhiteNoise

    Dbrown

    Diwhite

  126. final case class Dxrand(seq: GE, repeats: GE = 1) extends SingleOut with DemandRated with IsIndividual with Product with Serializable

    Permalink

    A demand-rate UGen which outputs random elements from a sequence.

    A demand-rate UGen which outputs random elements from a sequence. Dxrand forbid repetitions, whereas Drand allows duplicate elements to appear.

    seq

    A multi-channel signal providing the values at each step of the sequence. Typically (but not necessarily) a sequence of constant values.

    repeats

    The number of items polled from the sequence

    See also

    Dshuf

    Drand

    Dser

    Demand

  127. final case class Env(startLevel: GE, segments: Seq[Segment], releaseNode: GE = 99, loopNode: GE = 99) extends EnvLike with Product with Serializable

    Permalink
  128. sealed trait EnvFactory[V] extends AnyRef

    Permalink
  129. final case class EnvGen(rate: Rate, envelope: GE, gate: GE = 1, levelScale: GE = 1.0f, levelBias: GE = 0.0f, timeScale: GE = 1.0f, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with HasDoneFlag with Product with Serializable

    Permalink

    An envelope generator UGen.

    An envelope generator UGen. It uses a break point description in its envelope input, typically coming from an Env object. The envelope may be re-triggered using the gate input. Upon start and upon re-triggering, the envelope , levelScale , levelBias and timeScale parameters are polled and remain constant for the duration of the envelope.

    To construct a manual envelope without the use of the Env class, the format should be as follows:

    val env = Seq[GE](startLevel, numSegments, releaseNode, loopNode,
    targetLevel1, duration1, curveType1, curvature1,
    targetLevel2, duration2, curveType2, curvature2,
    ...)

    Where the curve-type is one of Curve.step.id , Curve.lin.id , Curve.exp.id , etc. The curvature values are only relevant for the parametric curve type. The releaseNode and loopNode parameters are segment indices or the special value -99 indicating that there are no release or loop segments.

    Note: The actual minimum duration of a segment is not zero, but one sample step for audio rate and one block for control rate. This may result in asynchronicity when in two envelopes of different number of levels, the envelope times add up to the same total duration. Similarly, when modulating times, the new time is only updated at the end of the current segment; this may lead to asynchronicity of two envelopes with modulated times.

    envelope

    the description of the envelope break-points. Typically you pass an instance of Env which will then automatically expand to the correct format.

    gate

    triggers the envelope and holds it open while greater than zero. If the envelope is of fixed duration (e.g. Env.linen , Env.perc ), the gate argument is used as a simple trigger. If it contains a sustained segment (e.g. Env.adsr , Env.asr ), the envelope is held open until the gate becomes 0, at which point is released. If gate is less than zero, a release is enforced with duration -1.0 - gate .

    levelScale

    amplitude factor with which the nominal envelope is multiplied.

    levelBias

    amplitude offset which is added to the nominal envelope.

    timeScale

    time scale factor with which the envelope segment durations are multiplied.

    doneAction

    action to be performed when the envelope reaches its end point.

    See also

    Decay

    Linen

    XLine

    Line

    IEnvGen

    Env

  130. sealed trait EnvLike extends GE

    Permalink
  131. final case class ExpRand(lo: GE = 0.01f, hi: GE = 1.0f) extends SingleOut with ScalarRated with IsIndividual with Product with Serializable

    Permalink

    A scalar UGen that generates a single random decimal value, using an exponential distribution from lo to hi .

    A scalar UGen that generates a single random decimal value, using an exponential distribution from lo to hi . Values lo and hi must both have the same sign and be non-zero.

    lo

    lower limit of the output range

    hi

    upper limit of the output range

    See also

    RandSeed

    TExpRand

    Rand

  132. final case class FBSineC(rate: Rate, freq: GE = Nyquist(), im: GE = 1.0f, fb: GE = 0.1f, a: GE = 1.1f, c: GE = 0.5f, xi: GE = 0.1f, yi: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equations:

    A non-interpolating sound generator based on the difference equations:

    x[n+1] = sin(im * y[n] + fb * x[n])
    y[n+1] = (a * y[n] + c) % 2pi

    This uses a linear congruential function to drive the phase indexing of a sine wave. For im = 1, fb = 0 , and a = 1 a normal sine wave results.

    freq

    Iteration frequency in Hertz

    im

    Index multiplier amount

    fb

    Feedback amount

    a

    Phase multiplier amount

    c

    Phase increment amount

    xi

    Initial value of x

    yi

    Initial value of y

    See also

    FBSineL

    FBSineN

  133. final case class FBSineL(rate: Rate, freq: GE = Nyquist(), im: GE = 1.0f, fb: GE = 0.1f, a: GE = 1.1f, c: GE = 0.5f, xi: GE = 0.1f, yi: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equations:

    A non-interpolating sound generator based on the difference equations:

    x[n+1] = sin(im * y[n] + fb * x[n])
    y[n+1] = (a * y[n] + c) % 2pi

    This uses a linear congruential function to drive the phase indexing of a sine wave. For im = 1, fb = 0, and a = 1 a normal sine wave results.

    freq

    Iteration frequency in Hertz

    im

    Index multiplier amount

    fb

    Feedback amount

    a

    Phase multiplier amount

    c

    Phase increment amount

    xi

    Initial value of x

    yi

    Initial value of y

    See also

    FBSineC

    FBSineN

  134. final case class FBSineN(rate: Rate, freq: GE = Nyquist(), im: GE = 1.0f, fb: GE = 0.1f, a: GE = 1.1f, c: GE = 0.5f, xi: GE = 0.1f, yi: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equations:

    A non-interpolating sound generator based on the difference equations:

    x[n+1] = sin(im * y[n] + fb * x[n])
    y[n+1] = (a * y[n] + c) % 2pi

    This uses a linear congruential function to drive the phase indexing of a sine wave. For im = 1, fb = 0, and a = 1 a normal sine wave results.

    freq

    Iteration frequency in Hertz

    im

    Index multiplier amount

    fb

    Feedback amount

    a

    Phase multiplier amount

    c

    Phase increment amount

    xi

    Initial value of x

    yi

    Initial value of y

    See also

    FBSineC

    FBSineL

  135. final case class FFT(buf: GE, in: GE, hop: GE = 0.5f, winType: GE = 0, active: GE = 1, winSize: GE = 0) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen performing short-time forward fourier transformations.

    A UGen performing short-time forward fourier transformations. In order to properly link the spectral ugens ( PV_... ), you should begin by using the output of each UGen (which is just the fft buffer identifier), and use that as buffer input of the next UGen. That way, the UGen graph is correctly sorted. E.g. IFFT(PV_...(FFT(buf, in))) .

    The UGen will initially output zero until the first FFT can be performed. This is the case after hop * fftSize . Thus for a default fft buffer size of 1024 and a hop of 0.5, and for a default control block size of 64, for the first 1024*0.5/64 = 8 control blocks the UGen will output zero. This also implies that the first FFT in this case if performed on the first 512 samples of the in signal (prepended by 512 zeros). In other words, the first 'full' FFT of the input happens after fftSize/controlBlockSize cycles, no matter what hop size was chosen.

    If you use FFT for performing signal analysis and not phase vocoder effects, make sure you change the window type accordingly.

    buf

    The buffer to use for writing the FFT to. The size must be a power of two. Since FFT operates at control rate (also being a power of two), the buffer should probably be at least as long as the control block size. (init-time only)

    in

    The time domain signal to be transformed into the spectral domain.

    hop

    A factor determining the step size between successive FFTs. That is, FFTs are performed every fftSize * hop sample frames. The default of 0.5 means thus a 50% overlap, while a hope of 1.0 means no overlapping. Choosing 0.0 will most likely crash the server! (init-time only)

    winType

    The window function applied before each FFT is taken. The default of 0 is a sine window which is good for phase vocoder applications (using the PV_... UGens). For analysis applications, you may want to use -1 which is a rectangle window (effectively no windowing) or 1 which is a Hann window. A Hann window gives perfect overlap-add reconstruction for a hope size of 0.5 (or 0.25 etc.) (init-time only)

    active

    This parameter can be temporarily set to <= 0 to pause the FFT operation.

    winSize

    With the default value of zero, the window size equals the fft size. If you wish to perform zero padding, an explicit window size can be specified. (init-time only)

    See also

    FFTTrigger

    IFFT

  136. final case class FFTTrigger(buf: GE, hop: GE = 0.5f, polar: GE = 0) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that takes a buffer and prepares it to be used in FFT chains, without doing an actual FFT on a signal.

    A phase vocoder UGen that takes a buffer and prepares it to be used in FFT chains, without doing an actual FFT on a signal. This is useful if you want to provide a buffer whose content had already been transformed into the Fourier domain.

    buf

    the identifier of the buffer to use (init-time only)

    hop

    the hop size for timing triggers (init-time only)

    polar

    whether the complex buffer content is given in cartesian coordinates (0) or in polar coordinates (1) (init-time only)

  137. final case class FOS(rate: MaybeRate, in: GE, a0: GE = 0.0f, a1: GE = 0.0f, b1: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A first order filter section UGen.

    A first order filter section UGen. Filter coefficients are given directly rather than calculated for you. The formula is equivalent to:

    out(i) = a0 * in(i) + a1 * in(i-1) + b1 * out(i-1)
    in

    input signal to be filtered

    See also

    OneZero

    OnePole

    SOS

  138. final case class FSinOsc(rate: Rate, freq: GE = 440.0f, iphase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A sine oscillator UGen using a fast approximation.

    A sine oscillator UGen using a fast approximation. It uses a ringing filter and is less CPU expensive than SinOsc . However, the amplitude of the wave will vary with frequency. Generally the amplitude will go down when the frequency rises and it will go up as if the frequency is lowered.

    Warning: In the current implementation, the amplitude can blow up if the frequency is modulated by certain alternating signals (e.g. abruptly by TRand ).

    freq

    frequency in Hertz

    iphase

    initial phase of the oscillator in radians. This cannot be modulated. A value of 0.5 Pi means the output starts at +1. A value of 1.5 Pi means the output starts at -1, (init-time only)

    See also

    SinOscFB

    SinOsc

  139. final case class Flatten(elem: GE) extends GE.Lazy with Product with Serializable

    Permalink

    A graph element that flattens the channels from a nested multi-channel structure.

    A graph element that flattens the channels from a nested multi-channel structure.

    elem

    the element to flatten

  140. final case class Fold(rate: Rate, in: GE, lo: GE = 0.0f, hi: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that constrains a signal to a given range, by "folding" values outside the range.

    A UGen that constrains a signal to a given range, by "folding" values outside the range. This is similar to the fold2 binary operator but permits both a lower range value lo and an upper range value hi .

    Folding can be understood as "reflecting" around the boundaries. For example, if the upper margin is 3, then if an input value exceeds 3, the excess is negatively reflected; 3.1 becomes 2.9, 3.2 becomes 2.8, etc. until the lower margin is reached again where another reflection occurs. Likewise, if the lower margin is 1, then if an input value falls below 1, the undershoot is reflected; 0.9 becomes 1.1, 0.8 becomes 1.2, etc. until the upper margin is reached again where another reflection occurs.

    in

    input signal to constrain

    lo

    lower margin of folding

    hi

    upper margin of folding

    See also

    Clip

    Wrap

  141. final case class FoldIndex(rate: Rate, buf: GE, in: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen which reads a single sample value from a buffer at a given index.

    A UGen which reads a single sample value from a buffer at a given index.

    It uses the in argument as index into the buffer, truncating that argument to an integer. Out-of-range index values are "folded" inside the valid range. Folding means reflecting the excess at the valid range's boundaries.

    For example, if the buffer has four samples, index 4 is wrapped to index 2 (the excess beyond the maximum index of 3 is 4 - 3 = 1, and the excess is folded so that and 3 - 1 = 2), index 5 is folded to index 1, index -1 is folded to index 1, index -2 is folded to index 2, etc.

    While designed for monophonic buffers, it works with multi-channel buffers by treating them as de-interleaved. See the Index UGen for details.

    buf

    The buffer to read from.

    in

    The sample index into the buffer. This is truncated to an integer automatically.

    See also

    IndexL

    WrapIndex

    Index

  142. final case class Formant(rate: Rate, fundFreq: GE = 440.0f, formFreq: GE = 1760.0f, bw: GE = 880.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that generates a set of harmonics around a formant frequency at a given fundamental frequency.

    A UGen that generates a set of harmonics around a formant frequency at a given fundamental frequency.

    fundFreq

    Fundamental frequency in Hertz. Read at control-rate, so if input is audio-rate, it will be sub-sampled.

    formFreq

    Formant frequency in Hertz. This determines the overtone(s) most prominently perceived. Read at control-rate, so if input is audio-rate, it will be sub-sampled.

    bw

    Pulse width frequency in Hertz. Controls the bandwidth of the formant. Must be greater than or equal to fundFreq . Read at control-rate, so if input is audio-rate, it will be sub-sampled.

  143. final case class Formlet(rate: MaybeRate, in: GE, freq: GE = 440.0f, attack: GE = 1.0f, decay: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A FOF-like resonant filter UGen.

    A FOF-like resonant filter UGen. Its impulse response is like that of a sine wave with a Decay2 envelope over it. It is possible to control the attack and decay times.

    Formlet is equivalent to:

    Ringz(in, freq, decay) - Ringz(in, freq, attack)

    The great advantage to this filter over FOF (Fonction d'onde formantique) is that there is no limit to the number of overlapping grains since the grain is just the impulse response of the filter.

    in

    input signal to be filtered

    freq

    resonant frequency in Hertz

    attack

    the 60 dB attack time in seconds

    decay

    the 60 dB decay time in seconds

    See also

    RHPF

    RLPF

    Resonz

    Ringz

  144. final case class Free(trig: GE, node: GE) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen that, when triggered, frees a given node.

    A UGen that, when triggered, frees a given node.

    This UGen outputs its trig input signal for convenience.

    trig

    the trigger to cause the action

    node

    the id of the target node to free upon receiving the trigger

    See also

    FreeSelf

    Pause

  145. final case class FreeSelf(trig: GE) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen that, when triggered, frees enclosing synth.

    A UGen that, when triggered, frees enclosing synth. It frees the enclosing synth when the input signal crosses from non-positive to positive.

    Note that if the trigger is initially high the UGen will not react. For example, FreeSelf.kr("foo".kr) will not work if the control is initially 1 . A work-around is to wrap the input in this case in a Trig object: FreeSelf.kr(Trig.kr("foo".kr)) . This is most likely a bug.

    This UGen outputs its input signal for convenience.

    trig

    the input signal which will trigger the action.

    See also

    PauseSelf

    Free

  146. final case class FreeSelfWhenDone(src: GE with HasDoneFlag) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen that, when its input UGen is finished, frees enclosing synth.

    A UGen that, when its input UGen is finished, frees enclosing synth. This is essentially a shortcut for FreeSelf.kr(Done.kr(src)) , so instead of providing a trigger signal it reads directly the done flag of an appropriate ugen (such as Line or PlayBuf ).

    This UGen outputs its input signal for convenience.

    src

    the input UGen which when finished will trigger the action.

    See also

    Done

    PauseSelfWhenDone

    FreeSelf

    Free

  147. final case class FreeVerb(in: GE, mix: GE = 0.33f, room: GE = 0.5f, damp: GE = 0.5f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A monophonic reverb UGen.

    A monophonic reverb UGen. All parameters are specified in and automatically clipped to the range 0 to 1. The UGen is stateless insofar it does not use a random number generator.

    in

    input signal to reverberate

    mix

    dry/wet balance from zero (only dry) to one (only wet)

    room

    room size

    damp

    high frequency attenuation (1 is maximum attenuation)

    See also

    GVerb

    FreeVerb2

  148. final case class FreeVerb2(inL: GE, inR: GE, mix: GE = 0.33f, room: GE = 0.5f, damp: GE = 0.5f) extends MultiOut with AudioRated with Product with Serializable

    Permalink

    A stereophonic reverb UGen.

    A stereophonic reverb UGen. All parameters are specified in and automatically clipped to the range 0 to 1. The UGen is stateless insofar it does not use a random number generator. However, if the same input is used for left and right channel, the output channels are different and uncorrelated. There is also some cross-feed between the two channels.

    inL

    left channel of input signal to reverberate

    inR

    right channel of input signal to reverberate

    mix

    dry/wet balance from zero (only dry) to one (only wet)

    room

    room size

    damp

    high frequency attenuation (1 is maximum attenuation)

    See also

    GVerb

    FreeVerb

  149. final case class FreqShift(rate: Rate, in: GE, freq: GE = 0.0f, phase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A frequency shifting UGen.

    A frequency shifting UGen. It implements single sideband (SSB) amplitude modulation, also known as frequency shifting, but not to be confused with pitch shifting. Frequency shifting moves all the components of a signal by a fixed amount but does not preserve the original harmonic relationships.

    freq

    the shift amount in Hertz. Positive values shift upwards, negative values shift downwards.

    phase

    a phase parameter in radians (0 to 2 Pi).

    See also

    PV_MagShift

    Hilbert

  150. final case class GESeq(elems: IndexedSeq[GE]) extends GE with Product with Serializable

    Permalink
  151. final case class GVerb(in: GE, roomSize: GE = 10.0f, revTime: GE = 3.0f, damping: GE = 0.5f, inputBW: GE = 0.5f, spread: GE = 15.0f, dryLevel: GE = 1.0f, earlyRefLevel: GE = 0.7f, tailLevel: GE = 0.5f, maxRoomSize: GE = 300.0f) extends MultiOut with AudioRated with Product with Serializable

    Permalink

    A stereophonic reverb UGen.

    A stereophonic reverb UGen. It is based on the GVerb LADSPA effect by Juhana Sadeharju.

    Note: A CPU spike may occur when the synth is instantiated. Warning: The UGen has a bug which results in loud noise if the room size is increased during playback. It seems safe to start with a large room size and decrease the value during playing. Warning: The UGen may crash the server if roomSize becomes larger than maxRoomSize .

    roomSize

    Size of the virtual room in meters. It must not be greater than maxRoomSize . Note that quick changes in roomSize may result in zipper noise and an audible Doppler effect.

    revTime

    reverberation time in seconds.

    damping

    high frequency attenuation (1 is maximum attenuation)

    inputBW

    high frequency attenuation of the input signal (0 to 1)

    spread

    stereo spread of the reverb signal. Units?

    dryLevel

    amount of dry signal

    earlyRefLevel

    amount of early reflections

    tailLevel

    amount of late reverberation

    maxRoomSize

    maximum value that roomSize can take. This is used for the early reflection delay lines and is only read at initialization time. (init-time only)

    See also

    FreeVerb2

    FreeVerb

  152. final case class Gate(rate: MaybeRate, in: GE, gate: GE) extends SingleOut with Product with Serializable

    Permalink

    A gate or hold UGen.

    A gate or hold UGen. It allows the input signal value to pass when the gate argument is positive, otherwise it holds last value.

    Before the first high gate value is registered, this UGen outputs zero.

    in

    the input signal to gate

    gate

    the signal specifying whether to pass the input signal (when greater than zero) or whether to close the gate and hold the last value (when less than or equal to zero)

    See also

    Latch

  153. final case class GbmanL(rate: Rate, freq: GE = Nyquist(), xi: GE = 1.2f, yi: GE = 2.1f) extends SingleOut with Product with Serializable

    Permalink

    freq

    Iteration frequency in Hertz

    yi

    Initial value of y

  154. final case class GbmanN(rate: Rate, freq: GE = Nyquist(), xi: GE = 1.2f, yi: GE = 2.1f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equations:

    A non-interpolating sound generator based on the difference equations:

    x[n+1] = 1 - y[n] + abs(x[n])
    y[n+1] = x[n]

    The behavior of the system is only dependent on its initial conditions. Reference: Devaney, R. L. "The Gingerbreadman." Algorithm 3, 15-16, Jan. 1992.

    freq

    Iteration frequency in Hertz

    yi

    Initial value of y

    See also

    GbmanL

  155. final case class Gendy1(rate: Rate, ampDist: GE = 1.0f, durDist: GE = 1.0f, adParam: GE = 1.0f, ddParam: GE = 1.0f, minFreq: GE = 440.0f, maxFreq: GE = 660.0f, ampScale: GE = 0.5f, durScale: GE = 0.5f, initCPs: GE = 12, kNum: GE = 12) extends SingleOut with IsIndividual with Product with Serializable

    Permalink
  156. final case class Gendy2(rate: Rate, ampDist: GE = 1.0f, durDist: GE = 1.0f, adParam: GE = 1.0f, ddParam: GE = 1.0f, minFreq: GE = 440.0f, maxFreq: GE = 660.0f, ampScale: GE = 0.5f, durScale: GE = 0.5f, initCPs: GE = 12, kNum: GE = 12, a: GE = 1.17f, c: GE = 0.31f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink
  157. final case class Gendy3(rate: Rate, ampDist: GE = 1.0f, durDist: GE = 1.0f, adParam: GE = 1.0f, ddParam: GE = 1.0f, freq: GE = 440.0f, ampScale: GE = 0.5f, durScale: GE = 0.5f, initCPs: GE = 12, kNum: GE = 12) extends SingleOut with IsIndividual with Product with Serializable

    Permalink
  158. final case class GrainBuf(numChannels: Int = 1, trig: GE, dur: GE = 1.0f, buf: GE, speed: GE = 1.0f, pos: GE = 0.0f, interp: GE = 2, pan: GE = 0.0f, envBuf: GE = 1, maxGrains: GE = 512) extends MultiOut with AudioRated with IsIndividual with Product with Serializable

    Permalink

    A granular synthesis UGen taking sound stored in a buffer.

    A granular synthesis UGen taking sound stored in a buffer. Another buffer can be used to provide an amplitude envelope. The input sound buffer must be monophonic, but output may be multi-channel, using a panorama control.

    All arguments except numChannels and maxGrain are polled at grain creation (trigger) time.

    numChannels

    the number of channels to output. If 1 , a monophonic signal is returned and the pan argument is ignored.

    trig

    a control- or audio-rate trigger to start a new grain. For audio-rate, timing is sample frame accurate.

    dur

    grain duration in seconds

    buf

    buffer holding a mono audio signal portions of which are read as grains

    speed

    playback speed of the grain, where 1.0 is original rate, 0.5 is half speed etc.

    pos

    grain start position, where 0 is beginning and 1 is the end of the input buffer

    interp

    interpolation type when using pitch-shifting via speed . 1 for no interpolation (nearest sample), 2 for linear interpolation, and 4 for cubic interpolation.

    pan

    panning position when numChannels is greater than one. Equivalent to the pan position of Pan2 (for stereo output) or PanAz (for more than two channels)

    envBuf

    identifier of a buffer containing a signal to use for the grain envelope. The default value of -1 means that a built-in Hann envelope is used.

    maxGrains

    maximum number of overlapping grains that can be used at a given time. This value is set at the UGens init time and cannot be modified later. Lower value mean that less memory is used.

    See also

    PanAz

    PlayBuf

    TGrains

  159. final case class GrainFM(numChannels: Int = 1, trig: GE, dur: GE = 1.0f, carFreq: GE = 440.0f, modFreq: GE = 200.0f, index: GE = 1.0f, pan: GE = 0.0f, envBuf: GE = 1, maxGrains: GE = 512) extends MultiOut with AudioRated with IsIndividual with Product with Serializable

    Permalink
  160. final case class GrainIn(numChannels: Int = 1, trig: GE, dur: GE = 1.0f, in: GE, pan: GE = 0.0f, envBuf: GE = 1, maxGrains: GE = 512) extends MultiOut with AudioRated with IsIndividual with Product with Serializable

    Permalink
  161. final case class GrainSin(numChannels: Int = 1, trig: GE, dur: GE = 1.0f, freq: GE = 440.0f, pan: GE = 0.0f, envBuf: GE = 1, maxGrains: GE = 512) extends MultiOut with AudioRated with IsIndividual with Product with Serializable

    Permalink
  162. final case class GrayNoise(rate: Rate, mul: GE = 1.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A noise generator UGen which results from flipping random bits in a word.

    A noise generator UGen which results from flipping random bits in a word. The resulting waveform looks like a sample-and-hold function with values between -1 and +1 (before being multiplied by mul ).

    This type of noise has a high RMS level relative to its peak to peak level. With approx. -4.8 dB, the RMS is the same as white noise, but the spectrum is emphasized towards lower frequencies.

    mul

    Not actually a UGen input, this argument produces a multiplication of the output by this factor. A multi-channel mul argument will cause the generation of multiple independent noise generators.

    See also

    Dust

    LFNoise0

    RandSeed

    ClipNoise

    BrownNoise

    PinkNoise

    WhiteNoise

  163. final case class HPF(rate: MaybeRate, in: GE, freq: GE = 440.0f) extends SingleOut with Product with Serializable

    Permalink

    A second order high pass filter UGen.

    A second order high pass filter UGen.

    in

    input signal to be filtered

    freq

    cutoff frequency in Hertz

    See also

    HPZ1

    RHPF

    BRF

    BPF

    LPF

  164. final case class HPZ1(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    A two point difference filter UGen.

    A two point difference filter UGen. Implements the formula :

    out(i) = 0.5 * (in(i) - in(i-1))

    Note: the filter's memory is initialized with the first input sample, so for HPZ1.ar(DC.ar(x)) the output will be zero, even at the beginning.

    in

    input signal to be filtered

    See also

    Delay1

    LPZ1

    OneZero

  165. final case class HPZ2(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    three point difference filter UGen.

    three point difference filter UGen. Implements the formula :

    out(i) = 0.25 * (in(i) - 2 * in(i-1) + in(i-2))
    in

    input signal to be filtered

    See also

    BRZ2

    BPZ2

    HPZ2

    LPZ1

  166. final case class Hasher(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that returns a unique output value from zero to one for each input value according to a hash function.

    A UGen that returns a unique output value from zero to one for each input value according to a hash function. The same input value will always produce the same output value. The input values can have any range.

    in

    input to calculate the hash function for

  167. final case class HenonC(rate: Rate, freq: GE = Nyquist(), a: GE = 1.4f, b: GE = 0.3f, x0: GE = 0.0f, x1: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A cubic-interpolating sound generator based on the difference equation:

    A cubic-interpolating sound generator based on the difference equation:

    x[n+2] = 1 - a * pow(x[n+1], 2) + b * x[n]

    This equation was discovered by French astronomer Michel Hénon while studying the orbits of stars in globular clusters.

    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    x0

    Initial value of x

    x1

    Second value of x

    See also

    HenonC

    HenonL

  168. final case class HenonL(rate: Rate, freq: GE = Nyquist(), a: GE = 1.4f, b: GE = 0.3f, x0: GE = 0.0f, x1: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A linear-interpolating sound generator based on the difference equation:

    A linear-interpolating sound generator based on the difference equation:

    x[n+2] = 1 - a * pow(x[n+1], 2) + b * x[n]

    This equation was discovered by French astronomer Michel Hénon while studying the orbits of stars in globular clusters.

    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    x0

    Initial value of x

    x1

    Second value of x

    See also

    HenonC

    HenonL

  169. final case class HenonN(rate: Rate, freq: GE = Nyquist(), a: GE = 1.4f, b: GE = 0.3f, x0: GE = 0.0f, x1: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equation:

    A non-interpolating sound generator based on the difference equation:

    x[n+2] = 1 - a * pow(x[n+1], 2) + b * x[n]

    This equation was discovered by French astronomer Michel Hénon while studying the orbits of stars in globular clusters.

    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    x0

    Initial value of x

    x1

    Second value of x

    See also

    HenonC

    HenonL

  170. final case class Hilbert(rate: Rate, in: GE) extends MultiOut with Product with Serializable

    Permalink

    A Hilbert transform UGen.

    A Hilbert transform UGen. This transformation produces two signals from a given input with identical frequency content, but with their respective phases shifted to be 90 degrees apart (0.5 pi radians).

    The two signals output by Hilbert correspond to the real and imaginary part of the complex transformed signal. Due to the method used (an IIR filter), distortion occurs in the upper octave of the frequency spectrum.

    The transform can be used to implemented single-side-band (SSB) modulation, but a dedicated UGen FreqShift is already provided for this case.

    in

    input signal to be processed

    See also

    FreqShift

  171. final case class IEnv(startLevel: GE, segments: Seq[Segment], offset: GE = 0) extends EnvLike with Product with Serializable

    Permalink
  172. final case class IEnvGen(rate: Rate, envelope: GE, index: GE) extends SingleOut with Product with Serializable

    Permalink

    Envelope generator UGen with random access index pointer into the break-point function.

    Envelope generator UGen with random access index pointer into the break-point function.

    Warning: The envelope must be generated using IEnv not Env . IEnv has a completely different format. Using the wrong format ( Env ) may crash the server.

    To construct a manual envelope without the use of the IEnv class, the format should be as follows:

    val env = Seq[GE](offset, startLevel, numSegments, totalDuration,
    duration1, curveType1, curvature1, targetLevel1,
    duration2, curveType2, curvature2, targetLevel2
    ...)
    envelope

    the description of the envelope break-points. Typically you pass an instance of IEnv which will then automatically expand to the correct format.

    index

    index point into the envelope, given as time in seconds

    See also

    EnvGen

    IEnv

  173. final case class IFFT(rate: Rate, chain: GE, winType: GE = 0, winSize: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen performing an inverse FFT, transforming a buffer containing a spectral domain signal back into the time domain.

    A UGen performing an inverse FFT, transforming a buffer containing a spectral domain signal back into the time domain.

    chain

    reference to the spectral signal, returned as a buffer-identifier from FFT or the PV_... UGens.

    winType

    The window function applied after each IFFT is taken. The default of 0 is a sine window, -1 is a rectangle window, and 1 is a Hann window. (init-time only)

    winSize

    With the default value of zero, the window size equals the fft size. If you wish to perform zero padding, an explicit window size can be specified. (init-time only)

    See also

    FFT

  174. final case class IRand(lo: GE = 0, hi: GE = 127) extends SingleOut with ScalarRated with IsIndividual with Product with Serializable

    Permalink

    A scalar UGen that generates a single random integer value, using a uniform distribution from lo to hi .

    A scalar UGen that generates a single random integer value, using a uniform distribution from lo to hi .

    lo

    lower limit of the output range

    hi

    upper limit of the output range (inclusive)

    See also

    RandSeed

    ExpRand

    TIRand

    Rand

  175. final case class Impulse(rate: Rate, freq: GE = 440.0f, phase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A non-band-limited generator UGen for single sample impulses.

    A non-band-limited generator UGen for single sample impulses.

    freq

    frequency in Hertz. A value of zero can be used to generate a singular impulse.

    phase

    phase offset in cycles (0 to 1)

    See also

    Blip

    Dust

    LFPulse

  176. final case class In(rate: Rate, bus: GE, numChannels: Int = 1) extends MultiOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that reads a signal from a bus.

    A UGen that reads a signal from a bus. Whether an audio- or control-bus is used depends on the rate of the UGen.

    In.ar and In.kr behave differently with respect to signals left on the bus in the previous calculation cycle (control block): In.ar can access audio signals that were generated in the current calculation cycle by synths appearing earlier in the node tree. It does not read signals produced by nodes in the previous calculation cycle (i.e. synths appearing later in the node tree), the input would instead be zero. To allow such "feedback", InFeedback can be used.

    In contrast, In.kr does not distinguish between "new" and "old" data: It will always read the most recent value found on the bus, whether it was generated earlier in this calculation cycle, left over from the last one, or set before by the client.

    Note: The server uses the first NumOutputBuses channels to write to the sound card, followed by another NumInputBuses to read from the sound card. For convenience, the pseudo-UGens PhysicalOut and PhysicalIn can be used.

    bus

    index of the bus to read from. When numChannels is greater than one, the other channels or read from the adjacent indices.

    numChannels

    number of channels to read

    See also

    Bus

    LocalIn

    InFeedback

    PhysicalIn

    Out

  177. final case class InFeedback(bus: GE, numChannels: Int = 1) extends MultiOut with AudioRated with IsIndividual with Product with Serializable

    Permalink

    A UGen which reads a signal from an audio bus with a current or one cycle old timestamp.

    A UGen which reads a signal from an audio bus with a current or one cycle old timestamp.

    Audio buses adhere to the concept of a cycle timestamp, which increases for each audio block calculated. When the various output ugens ( Out , OffsetOut , XOut ) write data to a bus, they mix it with any data from the current cycle, but overwrite any data from the previous cycle. ( ReplaceOut overwrites all data regardless.) Thus depending on node order and what synths are writing to the bus, the data on a given bus may be from the current cycle or be one cycle old at the time of reading.

    In.ar checks the timestamp of any data it reads in and zeros any data from the previous cycle (for use within that node; the data remains on the bus). This is fine for audio data, as it avoids feedback, but for control data it is useful to be able to read data from any place in the node order. For this reason In.kr also reads data that is older than the current cycle.

    In some cases one might also want to read audio from a node later in the current node order. This can be achieved with InFeedback . It reads from the previous cycle, and hence introduces a delay of one block size, which by default is 64 sample frames (equal to about 1.45 ms at 44.1 kHz sample rate).

    Note that no delay occurs when the bus contains a signal which has been written already in the current cycle. The delay is only introduced when no present signal exists.

    bus

    the index of the audio bus to read in from.

    numChannels

    the number of channels (i.e. adjacent buses) to read in. Since this is a constant, a change in number of channels of the underlying bus must be reflected by creating different SynthDefs.

    See also

    ControlDur

    LocalIn

    In

  178. final case class InRange(rate: Rate, in: GE, lo: GE = 0.0f, hi: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that tests if a signal is within a given range.

    A UGen that tests if a signal is within a given range. If in >= lo and in <= hi , outputs 1.0, otherwise outputs 0.0.

    in

    input signal to test

    lo

    lower margin of test range (inclusive)

    hi

    upper margin of test range (inclusive)

    See also

    Schmidt

    Clip

    InRect

  179. final case class InRect(rate: Rate, x: GE, y: GE, left: GE = 0.0f, top: GE = 0.0f, right: GE = 1.0f, bottom: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that tests if two signals lie both within a given ranges.

    A UGen that tests if two signals lie both within a given ranges. The two input signals can be understood as horizontal and vertical coordinates, therefore the test become one that determines whether the input is within a given "rectangle".

    If x >= left and x <= right and y > top and y <= bottom , outputs 1.0, otherwise outputs 0.0.

    x

    "horizontal" signal to test

    y

    "vertical" signal to test

    left

    lower margin of horizontal test range (inclusive)

    top

    lower margin of vertical test range (inclusive)

    right

    upper margin of horizontal test range (inclusive)

    bottom

    upper margin of vertical test range (inclusive)

    See also

    Clip

    InRange

  180. final case class InTrig(bus: GE, numChannels: Int = 1) extends MultiOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    A UGen which generates a trigger anytime a control bus is set.

    A UGen which generates a trigger anytime a control bus is set.

    Any time the bus is "touched" i.e. has its value set (using "/c_set" etc.), a single impulse trigger will be generated. Its amplitude is the value that the bus was set to. Note that if a signal is continuously written to that bus, for instance using Out.kr , only one initial trigger is generated once that ugen starts writing, but no successive triggers are generated.

    bus

    the index of the control bus to read in from.

    numChannels

    the number of channels (i.e. adjacent buses) to read in. Since this is a constant, a change in number of channels of the underlying bus must be reflected by creating different SynthDefs.

    See also

    TrigControl

    In

  181. final case class Index(rate: Rate, buf: GE, in: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen which reads a single sample value from a buffer at a given index.

    A UGen which reads a single sample value from a buffer at a given index.

    It uses the in argument as index into the buffer, truncating that argument to an integer. Out-of-range index values are clipped to the valid range.

    While designed for monophonic buffers, it works with multi-channel buffers by treating them as de-interleaved. For example, if the buffer has two frames and two channels, index 0 corresponds to frame 0, channel 0, index 1 correspond to frame 0, channel 1, index 2 corresponds to frame 1, channel 0, and index 3 corresponds to frame 1, channel 1.

    buf

    The buffer to read from.

    in

    The sample index into the buffer. This is truncated to an integer automatically.

    See also

    DetectIndex

    IndexInBetween

    IndexL

    WrapIndex

    BufRd

  182. final case class IndexInBetween(rate: Rate, buf: GE, in: GE) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen which determines the (lowest) index in a buffer at which the two neighboring values contain a given input signal.

    A UGen which determines the (lowest) index in a buffer at which the two neighboring values contain a given input signal. The output index is a decimal whose fractional part is suitable for linearly interpolating between the buffer slot values.

    For example, if the Buffer contains values 3, 21, 25, 26 and the input signal has the value 22, then the output will be 1.25, because the value 22 is in-between the values stored at indices 1 and 2 and the linear location of 22 is one-quarter of the way along the interval between them: 21 * (1 - 0.25) + 25 * (1 - 0.75) = 22.

    If the input value is smaller than the first sample, the output will be zero. If the input value is larger than any sample in the buffer, the output will be the buffer size minus one.

    While designed for monophonic buffers, it works with multi-channel buffers by treating them as de-interleaved. For example, if the buffer has two frames and two channels, and the algorithm finds the frame 1 in channel 0, the reported index is 2 (frame * numChannels + channel).

    IndexInBetween is the complement of the IndexL UGen.

    buf

    The buffer to search in.

    in

    The input signal whose value is looked up in the buffer.

    See also

    IndexL

    DetectIndex

  183. final case class IndexL(rate: Rate, buf: GE, in: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen which reads from a buffer at a given index, linearly interpolating between neighboring points.

    A UGen which reads from a buffer at a given index, linearly interpolating between neighboring points.

    It uses the in argument as index into the buffer. Out-of-range index values are clipped to the valid range. If the index has a fractional part, it is used to interpolate between the buffer index at the floor and the buffer index at the ceiling of the index argument.

    While designed for monophonic buffers, it works with multi-channel buffers by treating them as de-interleaved. See the Index UGen for details.

    buf

    The buffer to read from.

    in

    The sample index into the buffer. This can have a fractional part.

    See also

    IndexInBetween

    Index

  184. final case class Integrator(rate: MaybeRate, in: GE, coeff: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A filter UGen to integrate an input signal with a leak.

    A filter UGen to integrate an input signal with a leak. Implements the formula :

    out(i) = in(i) + (coef * out(i-1))
    in

    input signal to be processed

    coeff

    the leak coefficient. Should be between -1 and +1

    See also

    LPZ1

    HPZ1

    OnePole

  185. final case class K2A(in: GE) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A converter UGen that takes a control-rate input and produces an audio-rate output by means of linear interpolation.

    A converter UGen that takes a control-rate input and produces an audio-rate output by means of linear interpolation. The current control input value is always reached in at the beginning of the subsequent control block. A special case is the initialization which begins directly at the first control input value (therefore, the first control block of the audio-rate output is is always constant.)

    For example, if the block size is 64, and the first three input values are -0.5, 0.6, 0.3, then the output signal will be 65 samples of value -0.5, followed by a linear ramp of 64 samples towards 0.6, followed by a linear ramp of 64 samples to towards 0.3.

    in

    control-rate signal to convert

    See also

    DC

    T2A

    A2K

  186. final case class KeyState(keyCode: GE, lo: GE = 0.0f, hi: GE = 1.0f, lag: GE = 0.2f) extends SingleOut with ControlRated with Product with Serializable

    Permalink

    A UGen that detects a specific keyboard stroke.

    A UGen that detects a specific keyboard stroke. When the given key is not pressed, the lo value is output, while the key is pressed the hi value is output. If lag is greater than zero, a Lag -type operation is applied for a smoother transition between lo and hi .

    keyCode

    hardware code for the key to monitor. This is likely platform dependent. For example, on Linux, key-codes 24 to 29 correspond to 'Q', 'W', 'E', 'R', 'T', 'Y'.

    lo

    value output when the currently pressed does not match the code

    hi

    value output when the currently pressed does match the code

    lag

    60 dB lag time in seconds.

    See also

    MouseButton

    MouseY

    MouseX

  187. final case class KeyTrack(chain: GE, keyDecay: GE = 2.0f, chromaLeak: GE = 0.5f) extends SingleOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    A (12TET major/minor) key tracker UGen.

    A (12TET major/minor) key tracker UGen. It is based on a pitch class profile of energy across FFT bins and matching this to templates for major and minor scales in all transpositions. It assumes a 440 Hz concert A reference. Output is 0-11 C major to B major, 12-23 C minor to B minor.

    chain

    the output (buffer) of an FFT UGen which transforms the audio input to track. For the FFT chain, with a standard hop of half FFT size, the FFT size should be 4096 at 44.1 or 48 kHz and 8192 at 88.2 or 96 kHz sampling rate.

    keyDecay

    Number of seconds for the influence of a window on the final key decision to decay by 40dB (to 0.01 its original value). Can be control-rate modulated.

    chromaLeak

    Each frame, the chroma values are set to the previous value multiplied by this chroma decay. 0.0 will start each frame afresh with no memory. Can be control-rate modulated.

  188. final case class Klang(specs: GE, freqScale: GE = 1.0f, freqOffset: GE = 0.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink
  189. final case class KlangSpec(freq: GE, amp: GE = 1, decay: GE = 0) extends GE with Product with Serializable

    Permalink
  190. final case class Klank(specs: GE, in: GE, freqScale: GE = 1.0f, freqOffset: GE = 0.0f, decayScale: GE = 1.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink
  191. final case class LFClipNoise(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that randomly generates the values -1 or +1 at a rate given by the nearest integer division of the sample rate by the frequency argument.

    A UGen that randomly generates the values -1 or +1 at a rate given by the nearest integer division of the sample rate by the frequency argument. The difference to LFClipNoise is that this UGen quantizes time to the nearest integer division of the sample-rate, and the frequency input is only polled at the moment a new output value is scheduled.

    freq

    rate at which to generate random values.

    See also

    LFDClipNoise

    LFNoise0

    ClipNoise

  192. final case class LFCub(rate: Rate, freq: GE = 440.0f, iphase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A sine-like oscillator UGen with a shape made of two cubic pieces.

    A sine-like oscillator UGen with a shape made of two cubic pieces. It is smoother than LFPar .

    freq

    oscillator frequency in Hertz

    iphase

    initial phase in cycle (0 to 1) (init-time only)

    See also

    LFPar

  193. final case class LFDClipNoise(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that randomly generates the values -1 or +1 at a rate given by the nearest integer division of the sample rate by the frequency argument.

    A UGen that randomly generates the values -1 or +1 at a rate given by the nearest integer division of the sample rate by the frequency argument. The difference to LFClipNoise is that this UGen does not quantize time and recovers fast from frequency input changes.

    freq

    rate at which to generate random values.

    See also

    GrayNoise

    Schmidt

    CoinGate

    LFNoise1

    LFNoise0

    LFClipNoise

  194. final case class LFDNoise0(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A dynamic step noise UGen.

    A dynamic step noise UGen. Like LFNoise0 , it generates abruptly changing random values between -1 and +1 at a rate given by the freq argument, with two differences: There is no time quantization, and it there is fast recovery from low freq values.

    In contrast, LFNoise0 , LFNoise1 , and LFNoise2 quantize to the nearest integer division of the sample rate, and they poll the freq argument only when scheduled, and thus seem to hang when the frequencies get very low.

    If very high or very low frequencies are not needed, or fixed frequencies are used, LFNoise0 is more efficient.

    freq

    rate at which to generate random values.

    See also

    TRand

    LFDNoise3

    LFDNoise1

    LFNoise0

  195. final case class LFDNoise1(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A dynamic ramp noise UGen.

    A dynamic ramp noise UGen. Like LFNoise1 , it generates linearly interpolated random values between -1 and +1 at a rate given by the freq argument, with two differences: There is no time quantization, and it there is fast recovery from low freq values.

    In contrast, LFNoise0 , LFNoise1 , and LFNoise2 quantize to the nearest integer division of the sample rate, and they poll the freq argument only when scheduled, and thus seem to hang when the frequencies get very low.

    If very high or very low frequencies are not needed, or fixed frequencies are used, LFNoise1 is more efficient.

    freq

    rate at which to generate random values.

    See also

    Ramp

    LFDNoise3

    LFDNoise0

    LFNoise1

  196. final case class LFDNoise3(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A dynamic ramp noise UGen.

    A dynamic ramp noise UGen. It is similar to LFNoise2 , with three differences: It uses cubic instead of quadratic interpolation for the random values between -1 and +1 at a rate given by the freq argument. There is no time quantization, and it there is fast recovery from low freq values.

    In contrast, LFNoise0 , LFNoise1 , and LFNoise2 quantize to the nearest integer division of the sample rate, and they poll the freq argument only when scheduled, and thus seem to hang when the frequencies get very low.

    freq

    rate at which to generate random values.

    See also

    LFDNoise1

    LFDNoise0

    LFNoise2

  197. final case class LFGauss(rate: Rate, dur: GE = 1.0f, width: GE = 0.1f, phase: GE = 0.0f, loop: GE = 1, doneAction: GE = doNothing) extends SingleOut with Product with Serializable

    Permalink

    A non-band-limited gaussian function oscillator UGen.

    A non-band-limited gaussian function oscillator UGen. Output ranges from minVal to 1. It implements the formula:

    f(x) = exp((x - phase).squared / (-2 * width.squared))

    where x is to vary in the range -1 to 1 over the period dur . minVal is the initial value at -1. E.g. for default parameters, it is exp(-50) or roughly zero.

    dur

    duration in seconds of a full -1 <= x <= 1 cycle, or the reciprocal of the frequency

    width

    relative width of the bell. Best to keep below 0.25 when used as envelope.

    phase

    phase offset

    loop

    if greater than zero, the UGen oscillates. Otherwise it calls doneAction after one cycle.

    doneAction

    evaluated after cycle completes

  198. final case class LFNoise0(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A step noise UGen.

    A step noise UGen. It generates abruptly changing random values between -1 and +1 at a rate given by the freq argument.

    The frequency is quantized to the nearest integer division of the sample rate, and changes in frequency are only picked up at the next trigger. In contrast, variant LFDNoise0 has precise frequency and reacts to frequency changes instantly.

    freq

    rate at which to generate random values.

    See also

    RandSeed

    Dust

    WhiteNoise

    TRand

    LFNoise2

    LFNoise1

    LFDNoise0

  199. final case class LFNoise1(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A ramp noise UGen.

    A ramp noise UGen. It generates line segments whose start and end points are chosen randomly between -1 and +1 . New breakpoints are generated at a specified frequency.

    The frequency is quantized to the nearest integer division of the sample rate, and changes in frequency are only picked up at the next trigger. In contrast, variant LFDNoise1 has precise frequency and reacts to frequency changes instantly.

    freq

    rate at which to generate new breakpoints.

    See also

    Ramp

    LFNoise2

    LFNoise0

    LFDNoise1

  200. final case class LFNoise2(rate: Rate, freq: GE = 500.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A quadratically interpolating noise UGen.

    A quadratically interpolating noise UGen. This interpolation happens between breakpoints chosen randomly between -1 and +1 at a specified frequency.

    The frequency is quantized to the nearest integer division of the sample rate, and changes in frequency are only picked up at the next trigger. In contrast, variant LFDNoise3 has precise frequency and reacts to frequency changes instantly.

    Note: Due to the interpolation, the output values can occasionally extend beyond the normal range of -1 to +1, if the frequency varies in certain ways.

    freq

    rate at which to generate new breakpoints.

    See also

    LFNoise1

    LFNoise0

    LFDNoise3

  201. final case class LFPar(rate: Rate, freq: GE = 440.0f, iphase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A sine-like oscillator UGen with a shape made of two parabolas.

    A sine-like oscillator UGen with a shape made of two parabolas. It has audible odd harmonics and is non-band-limited. Its output ranges from -1 to +1.

    freq

    oscillator frequency in Hertz

    iphase

    initial phase in cycle (0 to 1) (init-time only)

    See also

    LFCub

  202. final case class LFPulse(rate: Rate, freq: GE = 440.0f, iphase: GE = 0.0f, width: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A non-band-limited pulse oscillator UGen.

    A non-band-limited pulse oscillator UGen. Outputs a high value of one and a low value of zero.

    freq

    oscillator frequency in Hertz

    iphase

    initial phase offset in cycles ( 0..1 ). If you think of a buffer of one cycle of the waveform, this is the starting offset into this buffer. Hence, an iphase of 0.25 means that you will hear the first impulse after 0.75 periods! If you prefer to specify the perceived delay instead, you could use an iphase of -0.25 + 1 which is more intuitive. Note that the phase is not automatically wrapped into the range of 0..1 , so putting an iphase of -0.25 currently results in a strange initial signal which only stabilizes to the correct behaviour after one period! (init-time only)

    width

    pulse width duty cycle from zero to one. If you want to specify the width rather in seconds, you can use the formula width = freq * dur , e.g. for a single sample impulse use width = freq * SampleDur.ir .

    See also

    Pulse

  203. final case class LFSaw(rate: Rate, freq: GE = 440.0f, iphase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A sawtooth oscillator UGen.

    A sawtooth oscillator UGen. The oscillator is creating an aliased sawtooth, that is it does not use band-limiting. For a band-limited version use Saw instead. The signal range is -1 to +1.

    freq

    oscillator frequency in Hertz

    iphase

    initial phase offset. For efficiency reasons this is a value ranging from -1 to 1 (thus equal to the initial output value). Note that a phase of zero (default) means the wave starts at 0 and rises to +1 before jumping down to -1. Use a phase of 1 to have the wave start at -1. (init-time only)

    See also

    Saw

  204. final case class LFTri(rate: Rate, freq: GE = 440.0f, iphase: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A triangle oscillator UGen designed for low frequency control signals (being non-band-limited).

    A triangle oscillator UGen designed for low frequency control signals (being non-band-limited). The output varies from -1 to 1.

    With an initial phase of zero, the oscillator begins at 0, rises to 1, then falls to -1 and goes back to zero after one complete phase. With an initial phase of 1 (corresponding to 90 degrees), the oscillator begins at 1 and then falls to -1. With an initial phase of 3 (or 270 degrees), the oscillator begins at -1 and then rises to 1.

    freq

    frequency in Hertz

    iphase

    initial phase of the oscillator. A full phase (2 Pi or 360 degrees) is represented by an iphase value of 4. The initial phase cannot be modulated. (init-time only)

  205. final case class LPF(rate: MaybeRate, in: GE, freq: GE = 440.0f) extends SingleOut with Product with Serializable

    Permalink

    A second order low pass filter UGen.

    A second order low pass filter UGen.

    in

    input signal to be filtered

    freq

    cutoff frequency in Hertz

    See also

    LPZ1

    RLPF

    BRF

    BPF

    HPF

  206. final case class LPZ1(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    two point average filter UGen.

    two point average filter UGen. Implements the formula :

    out(i) = 0.5 * (in(i) + in(i-1))
    in

    input signal to be filtered

    See also

    Delay1

    Integrator

    LPZ2

    HPZ1

    OnePole

  207. final case class LPZ2(rate: MaybeRate, in: GE) extends SingleOut with Product with Serializable

    Permalink

    three point average filter UGen.

    three point average filter UGen. Implements the formula :

    out(i) = 0.25 * (in(i) + 2 * in(i-1) + in(i-2))
    in

    input signal to be filtered

    See also

    BRZ2

    BPZ2

    HPZ2

    LPZ1

  208. final case class Lag(rate: MaybeRate, in: GE, time: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    An exponential lag UGen.

    An exponential lag UGen. This is essentially the same as OnePole except that instead of supplying the coefficient directly, it is calculated from a 60 dB lag time. This is the time required for the filter to converge to within 0.01 % of a value. This is useful for smoothing out control signals.

    in

    input signal.

    time

    60 dB lag time in seconds.

    See also

    Ramp

    Lag2

    LagUD

    OnePole

  209. final case class Lag2(rate: MaybeRate, in: GE, time: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A cascaded exponential lag UGen.

    A cascaded exponential lag UGen. Lag2.kr(in, time) is equivalent to Lag.kr(Lag.kr(in, time), time) , thus resulting in a smoother transition. This saves on CPU as you only have to calculate the decay factor once instead of twice.

    in

    input signal.

    time

    60 dB lag time in seconds.

    See also

    Lag3

    Lag2UD

    Lag

  210. final case class Lag2UD(rate: MaybeRate, in: GE, timeUp: GE = 0.1f, timeDown: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A cascaded exponential lag UGen with separate inputs for up and down slope.

    A cascaded exponential lag UGen with separate inputs for up and down slope. Lag2UD.kr(in, up, down) is equivalent to LagUD.kr(LagUD.kr(in, up, down), up, down) , thus resulting in a smoother transition. This saves on CPU as you only have to calculate the decay factors once instead of twice.

    in

    input signal.

    timeUp

    60 dB lag time in seconds effective during a rising slope in the input signal

    timeDown

    60 dB lag time in seconds effective during a falling slope in the input signal

    See also

    Lag3UD

    Lag2

    LagUD

  211. final case class Lag3(rate: MaybeRate, in: GE, time: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A cascaded exponential lag UGen.

    A cascaded exponential lag UGen. Lag3.kr(in, time) is equivalent to Lag.kr(Lag.kr(Lag.kr(Lag.kr(in, time), time), time) , thus resulting in a smoother transition. This saves on CPU as you only have to calculate the decay factor once instead of three times.

    in

    input signal.

    time

    60 dB lag time in seconds.

    See also

    Lag2

    Lag3UD

    Lag

  212. final case class Lag3UD(rate: MaybeRate, in: GE, timeUp: GE = 0.1f, timeDown: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A cascaded exponential lag UGen with separate inputs for up and down slope.

    A cascaded exponential lag UGen with separate inputs for up and down slope. Lag3UD.kr(in, up, down) is equivalent to LagUD.kr(LagUD.kr(LagUD.kr(in, up, down), up, down), up, down) , thus resulting in a smoother transition. This saves on CPU as you only have to calculate the decay factors once instead of three times.

    in

    input signal.

    timeUp

    60 dB lag time in seconds effective during a rising slope in the input signal

    timeDown

    60 dB lag time in seconds effective during a falling slope in the input signal

    See also

    Lag2UD

    Lag3

    LagUD

  213. final case class LagIn(rate: Rate, bus: GE, numChannels: Int = 1, time: GE = 0.1f) extends MultiOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that reads a signal from a control bus and applies a lag filter to it.

    A UGen that reads a signal from a control bus and applies a lag filter to it. This is essentially the same as Lag.kr(In.kr(...), time) .

    bus

    index of the bus to read from. When numChannels is greater than one, the other channels or read from the adjacent indices.

    numChannels

    number of channels to read

    time

    60 dB lag time in seconds.

    See also

    Lag

    Out

    In

  214. final case class LagUD(rate: MaybeRate, in: GE, timeUp: GE = 0.1f, timeDown: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    An exponential lag UGen with separate inputs for up and down slope.

    An exponential lag UGen with separate inputs for up and down slope. This is essentially the same as Lag except that you can supply a different 60 dB time for when the signal goes up, from when the signal goes down.

    in

    input signal.

    timeUp

    60 dB lag time in seconds effective during a rising slope in the input signal

    timeDown

    60 dB lag time in seconds effective during a falling slope in the input signal

    See also

    Lag2UD

    Lag

  215. final case class LastValue(rate: Rate, in: GE, thresh: GE = 0.01f) extends SingleOut with Product with Serializable

    Permalink

    A sample-and-hold UGen that outputs the last value before the input changed more than a threshold.

    A sample-and-hold UGen that outputs the last value before the input changed more than a threshold. Change is based on the absolute of the differentiation of input signal.

    in

    input signal to analyze and filter

    thresh

    threshold below which the input sign

    See also

    Slew

  216. final case class Latch(rate: Rate, in: GE, trig: GE = 1) extends SingleOut with Product with Serializable

    Permalink

    A sample-and-hold UGen.

    A sample-and-hold UGen. When triggered, a new value is taken from the input and hold until the next trigger occurs.

    Before the first trigger is registered, this UGen outputs zero.

    in

    the input signal

    trig

    the trigger. The can be any signal. A trigger happens when the signal changes from non-positive to positive.

    See also

    Demand

    Gate

  217. final case class LatoocarfianC(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 3.0f, c: GE = 0.5f, d: GE = 0.5f, xi: GE = 0.5f, yi: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A cubic-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26.

    A cubic-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26. The function is:

    x[n+1] = sin(b * y[n]) + c * sin(b * x[n])
    y[n+1] = sin(a * y[n]) + d * sin(a * x[n])

    According to Pickover, parameters a and b should be in the range from -3 to +3, and parameters c and d should be in the range from 0.5 to 1.5. The function can, depending on the parameters given, give continuous chaotic output, converge to a single value (silence) or oscillate in a cycle (tone). NOTE: This UGen is experimental and not optimized currently, so is rather hoggish of CPU.

    freq

    Iteration frequency in Hertz.

    a

    Equation variable

    b

    Equation variable

    c

    Equation variable

    d

    Equation variable

    xi

    Initial value of x

    yi

    Initial value of y

    See also

    LatoocarfianL

    LatoocarfianN

  218. final case class LatoocarfianL(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 3.0f, c: GE = 0.5f, d: GE = 0.5f, xi: GE = 0.5f, yi: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A linear-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26.

    A linear-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26. The function is:

    x[n+1] = sin(b * y[n]) + c * sin(b * x[n])
    y[n+1] = sin(a * y[n]) + d * sin(a * x[n])

    According to Pickover, parameters a and b should be in the range from -3 to +3, and parameters c and d should be in the range from 0.5 to 1.5. The function can, depending on the parameters given, give continuous chaotic output, converge to a single value (silence) or oscillate in a cycle (tone). NOTE: This UGen is experimental and not optimized currently, so is rather hoggish of CPU.

    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    c

    Equation variable

    d

    Equation variable

    xi

    Initial value of x

    yi

    Initial value of y

    See also

    LatoocarfianC

    LatoocarfianN

  219. final case class LatoocarfianN(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 3.0f, c: GE = 0.5f, d: GE = 0.5f, xi: GE = 0.5f, yi: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26.

    A non-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26. The function is:

    x[n+1] = sin(b * y[n]) + c * sin(b * x[n])
    y[n+1] = sin(a * y[n]) + d * sin(a * x[n])

    According to Pickover, parameters a and b should be in the range from -3 to +3, and parameters c and d should be in the range from 0.5 to 1.5. The function can, depending on the parameters given, give continuous chaotic output, converge to a single value (silence) or oscillate in a cycle (tone). NOTE: This UGen is experimental and not optimized currently, so is rather hoggish of CPU.

    freq

    Iteration frequency in Hertz.

    a

    Equation variable

    b

    Equation variable

    c

    Equation variable

    d

    Equation variable

    xi

    Initial value of x

    yi

    Initial value of y

    See also

    LatoocarfianC

    LatoocarfianL

  220. final case class LeakDC(rate: MaybeRate, in: GE, coeff: GE) extends SingleOut with Product with Serializable

    Permalink

    A filter UGen to remove very low frequency content DC offset.

    A filter UGen to remove very low frequency content DC offset.

    in

    input signal to be filtered

    coeff

    the leak coefficient determines the filter strength. the value must be between zero and one (exclusive) for the filter to remain stable. values closer to one produce less bass attenuation.

    See also

    DC

  221. final case class LeastChange(rate: MaybeRate, a: GE, b: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that switches between two input signal depending on which is changing less.

    A UGen that switches between two input signal depending on which is changing less. Change is based on the absolute of the differentiation of the respective signals.

    a

    first input signal to select from

    b

    second input signal to select from

    See also

    MostChange

  222. final case class Limiter(rate: Rate, in: GE, level: GE = 1.0f, dur: GE = 0.01f) extends SingleOut with Product with Serializable

    Permalink

    Limits the input amplitude to the given level.

    Limits the input amplitude to the given level. Unlike Compander , this UGen will never overshoot, but it needs to look ahead in the input signal, introducing a delay in its output. The delay time is equal to twice the value of the dur parameter (the buffer internally used).

    in

    input signal to be limited

    level

    maximum amplitude to which the signal is limited. The limiter will kick in when the input signal exceeds +level or falls below -level .

    dur

    look-ahead time in seconds (init-time only)

    See also

    Compander

    Normalizer

  223. final case class LinCongC(rate: Rate, freq: GE = Nyquist(), a: GE = 1.1f, c: GE = 0.13f, m: GE = 1.0f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A cubic-interpolating sound generator based on the difference equation:

    A cubic-interpolating sound generator based on the difference equation:

    x[n+1] = (a * x[n] + c) % m

    The output signal is automatically scaled to a range of [-1, 1].

    freq

    Iteration frequency in Hertz

    a

    Multiplier amount

    c

    Increment amount

    m

    Modulus amount

    xi

    Initial value of x

    See also

    LinCongL

    LinCongN

  224. final case class LinCongL(rate: Rate, freq: GE = Nyquist(), a: GE = 1.1f, c: GE = 0.13f, m: GE = 1.0f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A linear-interpolating sound generator based on the difference equation:

    A linear-interpolating sound generator based on the difference equation:

    x[n+1] = (a * x[n] + c) % m

    The output signal is automatically scaled to a range of [-1, 1].

    freq

    Iteration frequency in Hertz

    a

    Multiplier amount

    c

    Increment amount

    m

    Modulus amount

    xi

    Initial value of x

    See also

    LinCongC

    LinCongN

  225. final case class LinCongN(rate: Rate, freq: GE = Nyquist(), a: GE = 1.1f, c: GE = 0.13f, m: GE = 1.0f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equation:

    A non-interpolating sound generator based on the difference equation:

    x[n+1] = (a * x[n] + c) % m

    The output signal is automatically scaled to a range of [-1, 1].

    freq

    Iteration frequency in Hertz

    a

    Multiplier amount

    c

    Increment amount

    m

    Modulus amount

    xi

    Initial value of x

    See also

    LinCongC

    LinCongL

  226. final case class LinExp(rate: MaybeRate, in: GE, srcLo: GE = 0.0f, srcHi: GE = 1.0f, dstLo: GE = 1.0f, dstHi: GE = 2.0f) extends SingleOut with Product with Serializable

    Permalink

    A UGen which maps a linear range to an exponential range.

    A UGen which maps a linear range to an exponential range. The equivalent formula is (dstHi / dstLo).pow((in - srcLo) / (srcHi - srcLo)) * dstLo .

    Note: No clipping is performed. If the input signal exceeds the input range, the output will also exceed its range.

    in

    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

    See also

    Clip

    LinExp

  227. final case class LinLin(in: GE, srcLo: GE = 0f, srcHi: GE = 1f, dstLo: GE = 0f, dstHi: GE = 1f) extends GE.Lazy with Product with Serializable

    Permalink

    A graph element which maps a linear range to another linear range.

    A graph element which maps a linear range to another linear range. The equivalent formula is (in - srcLo) / (srcHi - srcLo) * (dstHi - dstLo) + dstLo.

    Note: No clipping is performed. If the input signal exceeds the input range, the output will also exceed its range.

    Examples
    // oscillator to frequency range
    play {
      val mod = SinOsc.kr(Line.kr(1, 10, 10))
      SinOsc.ar(LinLin(mod, -1, 1, 100, 900)) * 0.1
    }
    in

    The input signal to convert.

    srcLo

    The lower limit of input range.

    srcHi

    The upper limit of input range.

    dstLo

    The lower limit of output range.

    dstHi

    The upper limit of output range.

    See also

    MulAdd

    Clip

    LinExp

  228. final case class LinPan2(rate: Rate, in: GE, pos: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    A stereo panorama UGen based on linear amplitude control.

    A stereo panorama UGen based on linear amplitude control. When in center position ( pos = 0 ), the signal is attenuated by 0.5 or approx. -6 dB.

    in

    (monophonic) input signal to be panned

    pos

    panorama position between -1 (hard left) via 0 (center) to +1 (hard right)

    level

    additional gain control

    See also

    LinXFade2

    Balance2

    PanAz

    Pan2

  229. final case class LinRand(lo: GE = 0.0f, hi: GE = 1.0f, minMax: GE = 0) extends SingleOut with ScalarRated with IsIndividual with Product with Serializable

    Permalink

    A scalar UGen that generates a single random decimal value between lo and hi with a selectable skew towards either end.

    A scalar UGen that generates a single random decimal value between lo and hi with a selectable skew towards either end.

    The minMax <= 0 behaves rather odd: If minMax is less than 1, the distribution is skewed towards lo (with lo = 0 and hi = 1 , the mean is approx. 0.33). If minMax is greater than or equal to 1, the distribution is skewed towards hi (with lo = 0 and hi = 1 , the mean is approx 0.66).

    lo

    lower limit of the output range

    hi

    upper limit of the output range

    minMax

    if 0 , the output is skewed towards lo , if 1 , the output is skewed towards hi .

    See also

    RandSeed

    NRand

    ExpRand

    Rand

  230. final case class LinXFade2(rate: Rate, inA: GE, inB: GE = 0.0f, pan: GE = 0.0f, level: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    An linear two channel cross fading UGen.

    An linear two channel cross fading UGen. In center position ( pan = 0 ), both input signals are attenuated by 0.5 or approx. -6 dB.

    inA

    The first input signal

    inB

    The second input signal

    pan

    the cross-fade position from -1 (only input A audible) to +1 (only input B audible)

    level

    An overall amplitude multiplier that is applied to the output signal

    See also

    XOut

    LinPan2

    LinXFade2

  231. final case class Line(rate: Rate, start: GE = 0.0f, end: GE = 1.0f, dur: GE = 1.0f, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with HasDoneFlag with Product with Serializable

    Permalink

    A line generator UGen that moves from a start value to the end value in a given duration.

    A line generator UGen that moves from a start value to the end value in a given duration.

    start

    Starting value (init-time only)

    end

    Ending value (init-time only)

    dur

    Duration in seconds (init-time only)

    doneAction

    A done-action that is evaluated when the Line has reached the end value after the given duration

    See also

    Ramp

    EnvGen

    XLine

  232. final case class Linen(rate: Rate, gate: GE = 1, attack: GE = 0.01f, sustain: GE = 1.0f, release: GE = 1.0f, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with HasDoneFlag with Product with Serializable

    Permalink

    A linear ASR-type envelope generator UGen.

    A linear ASR-type envelope generator UGen.

    gate

    triggers the envelope and holds it open while greater than zero. A value of less than zero enforces a release with duration -1.0 - gate .

    attack

    duration (seconds) of the attack segment

    sustain

    level of the sustain segment

    release

    duration (seconds) of the release segment

    doneAction

    action to be performed when the envelope reaches its end point.

    See also

    EnvGen

  233. final case class ListTrig(rate: Rate, buf: GE, size: GE, reset: GE = 0, delay: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that produces a scheduled sequences of trigger impulses.

    A UGen that produces a scheduled sequences of trigger impulses. Trigger times are provided as a list (buffer) of absolute offsets from time zero. A trigger is output as a single control period of value 1 , after which output returns to zero.

    buf

    identifier of the buffer containing the offsets for the triggers in seconds. The offsets are taken against the start time of the synth or the last time a reset was received. They are not accumulative, and the behavior is undefined if the values are not sorted in ascending order. The buffer should be monophonic.

    size

    the number of values to use from the buffer. Typically, this should be BufFrames.kr(buf) .

    reset

    resets the timer and begins reading the time offsets again at the start of the buffer.

    delay

    this value is added to each of the buffer values. For example, to delay the list of values all by half a second, use a delay of 0.5 . This parameter is only updated at initialization or reset.

    Note

    The argument order is different from its sclang counterpart.

    See also

    Timer

    Dbufrd

    DemandEnvGen

    Logger

    ListTrig2

  234. final case class ListTrig2(rate: Rate, buf: GE, size: GE, reset: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen that produces a scheduled sequences of trigger impulses.

    A UGen that produces a scheduled sequences of trigger impulses. Trigger times are provided as a list (buffer) of relative durations between consecutive events. A trigger is output as a single control period of value 1 , after which output returns to zero.

    buf

    identifier of the buffer containing the durations for the triggers in seconds. A value represents a relative offsets with respect to its predecessor. The first value indicates the time between the start of the synth or last reset received and the first trigger. The buffer should be monophonic.

    size

    the number of values to use from the buffer. Typically, this should be BufFrames.kr(buf) .

    reset

    resets the timer and begins reading the time deltas again at the start of the buffer.

    Note

    The argument order is different from its sclang counterpart.

    See also

    ListTrig2

    Dbufrd

    DemandEnvGen

    Logger

    ListTrig

  235. final case class LocalBuf(numFrames: GE, numChannels: GE = 1) extends SingleOut with ScalarRated with IsIndividual with Product with Serializable

    Permalink

    A UGen that allocates a buffer local to the synth.

    A UGen that allocates a buffer local to the synth. This is convenient for example when using an FFT chain.

    numFrames

    number of sample frames for the buffer

    numChannels

    number of channels for the buffer

    See also

    de.sciss.synth.ugen.FFT

  236. final case class LocalIn(rate: Rate, init: GE = 0) extends MultiOut with Product with Serializable

    Permalink

    A UGen that reads buses that are local to the enclosing synth.

    A UGen that reads buses that are local to the enclosing synth. These buses should be written using a LocalOut ugen. They behave like regular buses, but are more convenient for the implementation of a self contained effect that uses a feedback processing loop.

    In a synth, there can be only each one control-rate and audio-rate LocalIn / LocalOut pair. The signal written to a LocalOut will not be read by the LocalIn until the next control block cycle, introducing a delay of ControlDur .

    Warning: The argument has been changed numChannels: Int in version 1.15.3 to init: GE in version 1.16.0. The previous version was incompatible with SuperCollider 3.6.x. A previous usage such as LocalIn.ar(2) to create two channels must now be expressed as LocalIn.ar(Seq(0, 0)) !

    init

    the initial state of the UGen. The number of channels of this signal should match with the number of channels written via LocalOut .

    See also

    ControlDur

    InFeedback

    LocalOut

  237. final case class LocalOut(rate: Rate, in: GE) extends ZeroOut with Product with Serializable

    Permalink

    A UGen that writes to buses that are local to the enclosing synth.

    A UGen that writes to buses that are local to the enclosing synth. These buses should have been defined by a LocalIn ugen. These behave like regular buses, but are more convenient for the implementation of a self contained effect that uses a feedback processing loop.

    In a synth, there can be only each one control-rate and audio-rate LocalIn / LocalOut pair. The signal written to a LocalOut will not be read by the LocalIn until the next control block cycle, introducing a delay of ControlDur .

    For more examples, see LocalIn.

    in

    signal to be written to the synth-local bus. The signal's number of channels must be the same number of channels as were declared in the corresponding LocalIn .

    See also

    ControlDur

    Out

    LocalIn

  238. final case class Logger(rate: Rate, buf: GE, in: GE, trig: GE, reset: GE = 0) extends SingleOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen to store values in a buffer upon receiving a trigger.

    A UGen to store values in a buffer upon receiving a trigger. When a trigger happens, the current input values are sampled and stored as the next consecutive frame of the buffer.

    Storage starts at the buffer beginning and increments the write position until the buffer is full. While the buffer is not yet full, the UGen outputs 1 , then it outputs 0 . The buffer position can be reset using the reset input.

    Note that the UGen zeroes the buffer upon first instantiation, to ensure that out-of-date data is not confused with new data.

    buf

    identifier of the buffer to write to. Its number of channels should match those of in .

    in

    (multi-channel) signal to write to the buffer. Its number of channels should match those of buf .

    trig

    a non-positive to positive transition causes the UGen to append the current input values to the buffer

    reset

    a non-positive to positive transition causes the write index into the buffer to be reset to zero. The contents of the buffer will also be filled with zeroes. If the buffer was full, the UGen output switches back to zero.

    Note

    The argument order is different from its sclang counterpart.

    See also

    ListTrig

  239. final case class Logistic(rate: Rate, chaos: GE = 3.0f, freq: GE = 1000.0f, init: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A noise generator UGen based on the logistic map.

    A noise generator UGen based on the logistic map. Its formula is

    y[n+1] = chaos * y[n] * (1.0 - y[n])
    chaos

    a parameter of the chaotic function with useful values from 0.0 to 4.0. Chaotic behavior occurs from 3.57 up. Using values outside this range can make the UGen blow up, resulting in NaNs.

    freq

    Frequency of calculation in Hertz. The value is limited by the sampling rate.

    init

    Initial value of the recursive function

    See also

    LatoocarfianN

    Crackle

  240. final case class LorenzL(rate: Rate, freq: GE = Nyquist(), s: GE = 10.0f, r: GE = 28.0f, b: GE = 2.667f, h: GE = 0.05f, xi: GE = 0.1f, yi: GE = 0.0f, zi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A strange attractor discovered by Edward N.

    A strange attractor discovered by Edward N. Lorenz while studying mathematical models of the atmosphere. The system is composed of three ordinary differential equations:

    x' = s * (y - x)
    y' = x * (r - z) - y
    z' = x * y - b * z

    The time step amount h determines the rate at which the ODE is evaluated. Higher values will increase the rate, but cause more instability. A safe choice is the default amount of 0.05.

    freq

    Iteration frequency in Hertz

    s

    Equation variable

    r

    Equation variable

    b

    Equation variable

    h

    Integration time step

    xi

    Initial value of x

    yi

    Initial value of y

    zi

    Initial value of z

  241. final case class Loudness(chain: GE, smask: GE = 0.25f, tmask: GE = 1.0f) extends SingleOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    A UGen for the extraction of instantaneous loudness.

    A UGen for the extraction of instantaneous loudness. A perceptual loudness function which outputs loudness in sones; this is a variant of an MP3 perceptual model, summing excitation in ERB bands. It models simple spectral and temporal masking, with equal loudness contour correction in ERB bands to obtain phons (relative dB), then a phon to sone transform. The final output is typically in the range of 0 to 64 sones, though higher values can occur with specific synthesised stimuli.

    Note that despite running at control-rate, the output remains constant for each FFT frame. E.g. with an FFT size of 1024 and 50% overlap, a new measure is generated every 512 audio frames, or (at control block size 64) every 8 control blocks.

    chain

    the output (buffer) of an FFT UGen which transforms the audio input to track. The FFT size should be 1024 for 44.1 and 48 kHz sampling rate, and 2048 for 88.2 and 96 kHz sampling rate.

    smask

    Spectral masking parameter: lower bins mask higher bin power within ERB bands, with a power falloff (leaky integration multiplier) of smask per bin. Can be control-rate modulated.

    tmask

    Temporal masking parameter: the phon level let through in an ERB band is the maximum of the new measurement, and the previous minus tmask phons. Can be control-rate modulated.

  242. final case class MFCC(chain: GE, numCoeffs: Int = 13) extends MultiOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    A UGen for extracting mel frequency cepstral coefficients.

    A UGen for extracting mel frequency cepstral coefficients. It generates a set of MFCCs; these are obtained from a band-based frequency representation (using the Mel scale by default), and then a discrete cosine transform (DCT). The DCT is an efficient approximation for principal components analysis, so that it allows a compression, or reduction of dimensionality, of the data, in this case reducing 42 band readings to a smaller set of MFCCs. A small number of features (the coefficients) end up describing the spectrum. The MFCCs are commonly used as timbral descriptors.

    The output values are somewhat normalised for the range 0.0 to 1.0, but there are no guarantees on exact conformance to this. Commonly, the first coefficient will be the highest value. The number of output channels corresponds to the number of coefficients specified. Technical note: The 0th coefficient is not generated as it consists of multiplying all bands by 1 and summing

    Note that despite running at control-rate, the output remains constant for each FFT frame. E.g. with an FFT size of 1024 and 50% overlap, a new measure is generated every 512 audio frames, or (at control block size 64) every 8 control blocks.

    chain

    the output (buffer) of an FFT UGen which transforms the audio input to track. For the FFT chain, with a standard hop of half FFT size, the FFT size should be 1024 at 44.1 or 48 kHz and 2048 at 88.2 or 96 kHz sampling rate.

    numCoeffs

    the number of coefficients, defaults to 13, maximum of 42; more efficient to use less of course! Since this number determines the number of output channels of the UGen, it has to be an Int .

  243. final case class MantissaMask(rate: MaybeRate, in: GE, bits: GE = 3) extends SingleOut with Product with Serializable

    Permalink

    A UGen that masks off bits in the mantissa of the floating point sample value.

    A UGen that masks off bits in the mantissa of the floating point sample value. This introduces a quantization noise, but is less severe than linearly quantizing the signal.

    in

    input signal to quantize

    bits

    The number of mantissa bits to preserve, from 0 to 23.

  244. final case class Median(rate: Rate, in: GE, length: GE = 3) extends SingleOut with Product with Serializable

    Permalink

    A filter UGen that calculates the median of a running window over its input signal.

    A filter UGen that calculates the median of a running window over its input signal. This non-linear filter can be used to reduce impulse noise from a signal.

    length

    window size. I.e., the number of input samples in which to find the median. Must be an odd number from 1 to 31. A value of 1 has no effect. Warning: This parameter is only read an initialization time and cannot be modulated while the UGen is running. (init-time only)

    Note

    The argument order is different from its sclang counterpart.

    See also

    RunningSum

    LeakDC

    LPF

  245. final case class MidEQ(rate: MaybeRate, in: GE, freq: GE = 440.0f, rq: GE = 1.0f, gain: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A single band parametric equalizer UGen.

    A single band parametric equalizer UGen. It attenuates or boosts a frequency band.

    in

    input signal to be filtered

    freq

    center frequency in Hertz

    rq

    reciprocal of Q. The Q (or quality) is conventionally defined as center-frequency / bandwidth, meaning that rq  = bandwidth / center-frequency. A higher Q or lower rq produces a steeper filter. Too high values for rq may blow the filter up!

    gain

    The amount of boost (when positive) or attenuation (when negative) applied to the frequency band, in decibels.

    See also

    Resonz

    LPF

    HPF

    BRF

    BPF

  246. final case class Mix(elem: GE) extends SingleOut with Product with Serializable

    Permalink

    A graph element that mixes the channels of a signal together.

    A graph element that mixes the channels of a signal together. It works like the sclang counterpart.

    The Mix companion object contains various useful mixing idioms:

    - Mix.tabulate(n: Int)(fun: Int => GE): corresponds to Seq.tabulate and to Array.fill in sclang. - Mix.fill(n: Int)(thunk: => GE): corresponds to Seq.fill. - Mix.seq(elems: GE*): A shortcut for Mix(GESeq(elems: _*)).

    A separate graph element is Mix.mono. Mix.mono(elem: GE) flattens all channels of the input element before summing them, guaranteeing that the result is monophonic.

    Finally, Mix.fold is an idiom that not actually adds elements, but recursively folds them. Thus, Mix.fold(elem: GE, n: Int)(fun: GE => GE) is equivalent to

    (1 to n).foldLeft(elem) { (res, _) => fun(res) }

    Mix.fold is often used in the SuperCollider examples to apply a filtering process such as reverberation several times. For cases where the iteration index is needed, the full form as shown above can be used instead.

    elem

    the graph element whose channels to mix together

    See also

    BinaryOpUGen

    Reduce

  247. final case class MoogFF(rate: MaybeRate, in: GE, freq: GE = 200.0f, gain: GE = 2.0f, reset: GE = 0) extends SingleOut with Product with Serializable

    Permalink

    A Moog VCF style UGen.

    A Moog VCF style UGen. This is a type of resonant low pass filter.

    The design of this filter is described in Federico Fontana, "Preserving the Digital Structure of the Moog VCF." In: Proceedings of the ICMC, Copenhagen 2007. Ported to SuperCollider by Dan Stowell.

    freq

    cutoff frequency in Hertz

    gain

    filter resonance gain, between 0 and 4

    reset

    when greater than zero, this will reset the state of the digital filters at the beginning of the next control block.

  248. final case class MostChange(rate: Rate, a: GE, b: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that switches between two input signal depending on which is changing more.

    A UGen that switches between two input signal depending on which is changing more. Change is based on the absolute of the differentiation of the respective signals.

    a

    first input signal to select from

    b

    second input signal to select from

    See also

    LeastChange

  249. final case class MouseButton(lo: GE = 0.0f, hi: GE = 1.0f, lag: GE = 0.2f) extends SingleOut with ControlRated with Product with Serializable

    Permalink

    A UGen that outputs two different values depending on whether the mouse button is pressed.

    A UGen that outputs two different values depending on whether the mouse button is pressed. This is useful for testing purposes. Mouse interaction with the regular desktop and windowing system is in no way altered by running this UGen.

    lo

    value output while button is not pressed

    hi

    value output while button is pressed

    lag

    60 dB decay time of a lag-time smoothing. Use zero to avoid any smoothing.

    See also

    KeyState

    MouseY

    MouseX

  250. final case class MouseX(lo: GE = 0.0f, hi: GE = 1.0f, warp: GE = 0.0f, lag: GE = 0.2f) extends SingleOut with ControlRated with Product with Serializable

    Permalink

    A UGen that maps the horizontal screen location of the mouse to a given linear or exponential range.

    A UGen that maps the horizontal screen location of the mouse to a given linear or exponential range. This is useful for testing purposes. Mouse interaction with the regular desktop and windowing system is in no way altered by running this UGen.

    lo

    value when the mouse is on the left side of the screen

    hi

    value when the mouse is on the right side of the screen. Note: this value is never reached, because the maximum mouse coordinate is one pixel less than the screen size. For example, if the screen width is 1440, lo is 0.0 and hi is 1.0, the maximum value output is 1.0 * 1439/1440 = 0.999306 .

    warp

    curve shape. Either zero (default) for a linear mapping, or 1 for an exponential mapping. Note: When using exponential mapping, make sure the lo value is greater than zero, otherwise NaN values will be output.

    lag

    60 dB decay time of a lag-time smoothing. Use zero to avoid any smoothing.

    See also

    KeyState

    MouseButton

    MouseY

  251. final case class MouseY(lo: GE = 0.0f, hi: GE = 1.0f, warp: GE = 0.0f, lag: GE = 0.2f) extends SingleOut with ControlRated with Product with Serializable

    Permalink

    A UGen that maps the vertical screen location of the mouse to a given linear or exponential range.

    A UGen that maps the vertical screen location of the mouse to a given linear or exponential range. The lo value corresponds to the bottom of the screen, and the hi value corresponds to the top of the screen (not vice-versa).

    This UGen is useful for testing purposes. Mouse interaction with the regular desktop and windowing system is in no way altered by running this UGen.

    lo

    value when the mouse is on the bottom side of the screen. Note: this value is never reached, because the maximum mouse coordinate is one pixel less than the screen height. For example, if the screen height is 900, lo is 0.0 and hi is 1.0, the minimum value output is 1.0 - 1.0 * 899.0/900 = 0.001111 .

    hi

    value when the mouse is on the top side of the screen

    warp

    curve shape. Either zero (default) for a linear mapping, or 1 for an exponential mapping. Note: When using exponential mapping, make sure the lo value is greater than zero, otherwise NaN values will be output.

    lag

    60 dB decay time of a lag-time smoothing. Use zero to avoid any smoothing.

    See also

    KeyState

    MouseButton

    MouseX

  252. final case class MulAdd(in: GE, mul: GE, add: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen that multiplies an input with another signal and then adds a third signal.

    A UGen that multiplies an input with another signal and then adds a third signal. This can be used to translate an element into a different value range.

    Usually the graph element operator madd is used instead of explicitly writing MulAdd.

    MulAdd(in, mul, add) == in.madd(mul, add) == in * mul + add
    Examples
    // scale value range
    play {
      // input range -1 to +1,
      // output range ((-1 * 100) + 300) = 200
      // to           ((+1 * 100) + 300) = 400
      val freq = SinOsc.kr(1).madd(100, 300) // or MulAdd(..., 100, 300)
      freq.poll(label = "freq")
      SinOsc.ar(freq) * 0.1
    }
    in

    the input signal to scale and offset

    mul

    the scaling factor, applied first to the input

    add

    the offset, added after applying the multiplication

    See also

    Sum4

    Sum3

    BinaryOpUGen

  253. final case class NRand(lo: GE = 0.0f, hi: GE = 1.0f, n: GE = 2) extends SingleOut with ScalarRated with IsIndividual with Product with Serializable

    Permalink

    A scalar UGen that generates a single random decimal value, averaging a given number of samples from a uniform distribution between lo and hi .

    A scalar UGen that generates a single random decimal value, averaging a given number of samples from a uniform distribution between lo and hi .

    lo

    lower limit of the output range

    hi

    upper limit of the output range

    n

    the number of random numbers to average. For n = 1 , the result is identical to Rand , for n = 2 , the distribution is triangular, and for larger values the distribution converges towards a Gaussian. Warning: The value should be not be less than one.

    See also

    RandSeed

    ExpRand

    TRand

    IRand

  254. final case class NodeID() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Identifier of the node which contains the UGen.

    Identifier of the node which contains the UGen.

    See also

    NumRunningSynths

    Poll

    Free

  255. final case class Normalizer(rate: Rate, in: GE, level: GE = 1, dur: GE = 0.01f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that normalizes the input amplitude to the given level.

    A UGen that normalizes the input amplitude to the given level. Unlike Compander , this UGen will not overshoot, but it needs to look ahead in the input signal, introducing a delay in its output. The delay time is equal to twice the value of the dur parameter (the buffer internally used).

    in

    input signal to be normalized

    level

    peak output amplitude level to which to normalize the input

    dur

    look-ahead time in seconds. Shorter times will produce smaller delays and quicker transient response times, but may introduce amplitude modulation artifacts. (init-time only)

    See also

    Compander

    Limiter

  256. final case class NumAudioBuses() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Number of audio buses.

  257. final case class NumBuffers() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Maximum number of audio buffers.

  258. final case class NumChannels(in: GE) extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A graph element that produces an integer with number-of-channels of the input element.

    A graph element that produces an integer with number-of-channels of the input element.

    Because ScalaCollider allows late-expanding graph elements, we have no direct way to get an integer of some array-size of a UGen's outputs. On the other hand, there may be sound synthesis definitions that can abstract over the number of channels at definition time.

    Examples
    // amplitude compensation
    play {
      val sines: GE = Seq.fill(8)(SinOsc.ar(ExpRand(200, 2000)))
      val norm = Mix(sines) / NumChannels(sines)   // guarantee that they don't clip
      norm * 0.2
    }
    in

    the element whose number-of-channels to produce

    See also

    ChannelIndices

  259. final case class NumControlBuses() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Number of control buses.

  260. final case class NumInputBuses() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Number of input buses.

  261. final case class NumOutputBuses() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Number of output buses.

  262. final case class NumRunningSynths() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    Number of currently running synths.

    Number of currently running synths.

    See also

    NumOutputBuses

    NumInputBuses

    NumBuffers

    NumControlBuses

    NumAudioBuses

  263. final case class Nyquist() extends GE with ScalarRated with Product with Serializable

    Permalink

    A helper graph element equivalent to SampleRate.ir * 0.5.

    A helper graph element equivalent to SampleRate.ir * 0.5.

    See also

    SampleRate

  264. final case class OffsetOut(bus: GE, in: GE) extends ZeroOut with AudioRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen that writes a signal onto a bus, delaying the signal such that the input will begin to appear on the bus precisely when the encompassing Synth was scheduled according to its OSC bundle.

    A UGen that writes a signal onto a bus, delaying the signal such that the input will begin to appear on the bus precisely when the encompassing Synth was scheduled according to its OSC bundle. I.e. if the synth is scheduled to be started part way through a control cycle, OffsetOut will maintain the correct offset by buffering the output and delaying it until the exact time that the synth was scheduled for.

    This UGen adds ("mixes") the input-signal to the existing contents of the bus.

    Multi-channel input signals, for example a PanAz , are written as such to the bus without expansion. That is, the bus index argument is used for the first channel, the second channel will appear on bus + 1 , etc.

    If you have an expanding multi-channel input, however, you have to be careful. For example, if you have PanAz.ar(2, SinOsc.ar(Seq(444, 555, 666)) * 0.2, Seq(-1, 0, 1)) , this results in one output UGen carrying one channel, and another one carrying two channels. (The way this works is consistent with SCLang). In order to get the correct behaviour (left outputs of the PanAz summed, and right output of the PanAz summed), wrap this expression in a Mix(...) before passing it to the output UGen.

    Note: You cannot currently achieve sample accurate scheduling in SuperCollider. This UGen is therefore more or less useless.

    bus

    bus index to write to. For an audio-rate UGen, this is an audio-bus, for a control-rate UGen, this is a control-bus.

    in

    signal to write to the bus. If the UGen is audio-rate, the input must also be audio-rate.

    See also

    SubsampleOffset

    XOut

    ReplaceOut

    Out

  265. final case class OnePole(rate: MaybeRate, in: GE, coeff: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A one pole (IIR) filter UGen.

    A one pole (IIR) filter UGen. Implements the formula :

    out(i) = ((1 - abs(coef)) * in(i)) + (coef * out(i-1))
    in

    input signal to be processed

    coeff

    feedback coefficient. Should be between -1 and +1

    See also

    Lag

    TwoPole

    OneZero

  266. final case class OneZero(rate: MaybeRate, in: GE, coeff: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A one zero (FIR) filter UGen.

    A one zero (FIR) filter UGen. Implements the formula :

    out(i) = ((1 - abs(coef)) * in(i)) + (coef * in(i-1))
    in

    input signal to be processed

    coeff

    feed forward coefficient. +0.5 makes a two point averaging filter (see also LPZ1 ), -0.5 makes a differentiator (see also HPZ1 ), +1 makes a single sample delay (see also Delay1 ), -1 makes an inverted single sample delay.

    See also

    Integrator

    Delay1

    HPZ1

    LPZ1

    TwoZero

    OnePole

  267. final case class Onsets(chain: GE, thresh: GE = 0.5f, fun: GE = 3, decay: GE = 1.0f, noiseFloor: GE = 0.1f, minGap: GE = 10, medianSpan: GE = 11, whType: GE = 1, raw: GE = 0) extends SingleOut with ControlRated with IsIndividual with Product with Serializable

    Permalink

    An onset detecting UGen for musical audio signals.

    An onset detecting UGen for musical audio signals. It detects the beginning of notes/drumbeats/etc. Outputs a control-rate trigger signal which is 1 when an onset is detected, and 0 otherwise.

    The onset detection should work well for a general range of monophonic and polyphonic audio signals. The onset detection is purely based on signal analysis and does not make use of any "top-down" inferences such as tempo.

    There are different functions available for the analysis:

    - 0 "power" -- generally OK, good for percussive input, and also very efficient - 1 "magsum" -- generally OK, good for percussive input, and also very efficient - 2 "complex" -- performs generally very well, but more CPU-intensive - 3 "rcomplex" (default) -- performs generally very well, and slightly more efficient than "complex" - 4 "phase" -- generally good, especially for tonal input, medium efficiency - 5 "wphase" -- generally very good, especially for tonal input, medium efficiency - 6 "mkl" -- generally very good, medium efficiency, pretty different from the other methods

    The differences aren't large, so it is recommended you stick with the default "rcomplex" unless you find specific problems with it. Then maybe try "wphase". The "mkl" type is a bit different from the others so maybe try that too. They all have slightly different characteristics, and in tests perform at a similar quality level.

    chain

    the output (buffer) of an FFT UGen which transforms the audio input to track. For the FFT chain, you should typically use a frame size of 512 or 1024 (at 44.1 kHz sampling rate) and 50% hop size (which is the default setting in SC). For different sampling rates choose an FFT size to cover a similar time-span (around 10 to 20 ms).

    thresh

    the detection threshold, typically between 0 and 1, although in rare cases you may find values outside this range useful

    fun

    index of a function to be used to analyse the signal. See main paragraph for possible values (usually can be left to default).

    decay

    (advanced setting) Specifies the time (in seconds) for the normalisation to "forget" about a recent onset. If you find too much re-triggering (e.g. as a note dies away unevenly) then you might wish to increase this value. Not used with "mkl".

    noiseFloor

    (advanced setting) This is a lower limit, connected to the idea of how quiet the sound is expected to get without becoming indistinguishable from noise. For some cleanly-recorded classical music with wide dynamic variations, it was found helpful to go down as far as 1e-6. Not used with "mkl".

    minGap

    (advanced setting) Specifies a minimum gap (in FFT frames) between onset detections, a brute-force way to prevent too many doubled detections.

    medianSpan

    (advanced setting) Specifies the size (in FFT frames) of the median window used for smoothing the detection function before triggering.

    whType

    (advanced setting) ?

    raw

    (advanced setting) ? (init-time only)

    See also

    PV_HainsworthFoote

    PV_JensenAndersen

  268. final case class Osc(rate: Rate, buf: GE, freq: GE = 440.0f, phase: GE = 0.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    An oscillator UGen that linearly interpolates a wavetable.

    An oscillator UGen that linearly interpolates a wavetable. It has frequency and phase modulation inputs. The wave table is provided by a buffer filled with a wavetable format signal. The buffer size must be a power of 2.

    The buffer is typically filled by a b_gen OSC message. (e.g. buf.sine1(...) , buf.sine2(...) etc.)

    buf

    the buffer with the wavetable in special wavetable format. the size must be a power of two.

    freq

    frequency of table scans in Hz, corresponding to the fundamental frequency of the sound.

    phase

    phase offset or modulator in radians. The value should be within the range of -8*Pi to +8*Pi.

    See also

    SinOsc

    VOsc

    COsc

    OscN

  269. final case class OscN(rate: Rate, buf: GE, freq: GE = 440.0f, phase: GE = 0.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink
  270. final case class Out(rate: Rate, bus: GE, in: GE) extends ZeroOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen that writes a signal onto a bus.

    A UGen that writes a signal onto a bus. It adds ("mixes") the input-signal to the existing contents of the bus.

    Multi-channel input signals, for example a PanAz , are written as such to the bus without expansion. That is, the bus index argument is used for the first channel, the second channel will appear on bus + 1 , etc.

    If you have an expanding multi-channel input, however, you have to be careful. For example, if you have PanAz.ar(2, SinOsc.ar(Seq(444, 555, 666)) * 0.2, Seq(-1, 0, 1)) , this results in one output UGen carrying one channel, and another one carrying two channels. (The way this works is consistent with SCLang). In order to get the correct behaviour (left outputs of the PanAz summed, and right output of the PanAz summed), wrap this expression in a Mix(...) before passing it to the output UGen.

    bus

    bus index to write to. For an audio-rate UGen, this is an audio-bus, for a control-rate UGen, this is a control-bus. Note that the bus index can only be modulated at control-rate.

    in

    signal to write to the bus. If the UGen is audio-rate, the input must also be audio-rate.

    See also

    Bus

    LocalOut

    XOut

    ReplaceOut

    PhysicalOut

    In

  271. final case class PV_Add(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that performs a complex addition of the two inputs.

    A phase vocoder UGen that performs a complex addition of the two inputs. The formula is (Re(A) + Re(B)) + i(Im(A) + Im(B)) .

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  272. final case class PV_BinScramble(chain: GE, wipe: GE = 0.5f, width: GE = 0.2f, trig: GE = 1) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that randomizes the order of the bins.

    A phase vocoder UGen that randomizes the order of the bins. The trigger will select a new random ordering.

    chain

    the FFT'ed buffer

    wipe

    the amount of bins scrambled, from 0 (none) to 1 (all bins scrambled).

    width

    a value from zero to one, indicating the maximum randomized distance of a bin from its original location in the spectrum.

    trig

    causes a new random bin re-ordering to be made. a trigger occurs when passing from non-positive to positive value.

  273. final case class PV_BinShift(chain: GE, stretch: GE = 1.0f, shift: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that stretches and shifts the spectrum.

    A phase vocoder UGen that stretches and shifts the spectrum. It takes each bin, first stretches (scales) its position (bin number) with a given factor, and then adds a shift to it.

    chain

    the FFT'ed buffer

    stretch

    the factor to multiply each bin position with, where 0.5 kind of transposes the signal down by an octave, and 2 transposes it up by an octave.

    shift

    the translation of the spectrum, in number of bins. Since the FFT produces a linear frequency axis, the will produce harmonic distortion.

  274. final case class PV_BinWipe(chainA: GE, chainB: GE, wipe: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that combine low and high bins from two inputs.

    A phase vocoder UGen that combine low and high bins from two inputs. It does so by copying low bins from one input and the high bins of the other, thus realizes a kind of "wipe" between the two input signals.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

    wipe

    can range between -1 and +1. if wipe == 0 then the output is the same as inA. if wipe > 0 then it begins replacing with bins from inB from the bottom up. if wipe < 0 then it begins replacing with bins from inB from the top down.

    See also

    PV_RandWipe

  275. final case class PV_BrickWall(chain: GE, wipe: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that clears bins above or below a cutoff point.

    A phase vocoder UGen that clears bins above or below a cutoff point.

    chain

    the FFT'ed buffer

    wipe

    can range between -1 and +1. if wipe == 0 then there is no effect. if wipe > 0 then it acts like a high pass filter, clearing bins from the bottom up. if wipe < 0 then it acts like a low pass filter, clearing bins from the top down.

  276. final case class PV_ConformalMap(chain: GE, real: GE = 0.0f, imag: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen that applies the conformal mapping z => (z - a) / (1 - za*) to its input FFT bins z .

    A UGen that applies the conformal mapping z => (z - a) / (1 - za*) to its input FFT bins z .

    It makes a transformation of the complex plane so the output is full of phase vocoder artifacts but may be musically interesting. One should usually keep |a| < 1 , although bigger values may be used to produce noise. A value of a = 0 gives back the input mostly unperturbed.

    chain

    the FFT'ed buffer

    real

    real part of the complex parameter a

    imag

    imaginary part of the complex parameter a

  277. final case class PV_Conj(chain: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that converts the bins into their complex conjugate counterparts.

    A phase vocoder UGen that converts the bins into their complex conjugate counterparts. The complex conjugate is equal to the input, but with reversed sign of the imaginary part.

    chain

    the FFT'ed buffer

  278. final case class PV_Copy(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that copies the spectral frames from chainA to chainB.

    A phase vocoder UGen that copies the spectral frames from chainA to chainB. This allows for parallel processing of spectral data without the need for multiple FFT UGens, and to copy out data at that point in the chain for other purposes. chainA and chainB must be the same size. The output will carry further chainA, so you chan insert the ugen at the appropriate place in the signal chain.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  279. final case class PV_CopyPhase(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that combines the magnitudes of first input and phases of the second input.

    A phase vocoder UGen that combines the magnitudes of first input and phases of the second input. phases of the first input.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  280. final case class PV_Diffuser(chain: GE, trig: GE = 1) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that adds a different constant random phase shift to each bin.

    A phase vocoder UGen that adds a different constant random phase shift to each bin. The trigger will select a new set of random phases.

    chain

    the FFT'ed buffer

    trig

    to trigger a new selection of random phases. A trigger occurs when passing from non-positive to positive value.

  281. final case class PV_Div(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that performs a complex division of the two inputs.

    A phase vocoder UGen that performs a complex division of the two inputs. Be careful that chainB , the divisor, does not contain zeroes as they would obviously blow up the division.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  282. final case class PV_HainsworthFoote(rate: Rate, chain: GE, hainsworth: GE = 0.0f, foote: GE = 0.0f, thresh: GE = 1.0f, waitTime: GE = 0.04f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    An FFT based onset detector UGen using a balance of two features.

    An FFT based onset detector UGen using a balance of two features. It is based on work described in Hainsworth (2003), "Techniques for the Automated Analysis of Musical Audio," PhD thesis, University of Cambridge. See especially p. 128. The Hainsworth metric is a modification of the Kullback Liebler distance.

    chain

    the fft signal (buffer) to analyze

    hainsworth

    what strength of detection signal from Hainsworth metric (0 to 1) to use.

    foote

    what strength of detection signal from normalized Foote metric (0 to 1) to use.

    thresh

    threshold level for detection

    waitTime

    after an onset is detected, further detections are suppressed for this period in seconds, preventing multiple rapid triggers

    See also

    PV_JensenAndersen

    Onsets

  283. final case class PV_JensenAndersen(rate: Rate, chain: GE, centroid: GE = 0.25f, hfe: GE = 0.25f, hfc: GE = 0.25f, flux: GE = 0.25f, thresh: GE = 1.0f, waitTime: GE = 0.04f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    An FFT based onset detector UGen using a mix of extracted features.

    An FFT based onset detector UGen using a mix of extracted features. It is based on work described in Jensen and Andersen (2003), "Real-time Beat Estimation Using Feature Extraction," in: Proceedings of the Computer Music Modeling and Retrieval Symposium.

    First order derivatives of the features are taken. The threshold may need to be set low to pick up on changes.

    chain

    the fft signal (buffer) to analyze

    centroid

    proportion (0 to 1) of spectral centroid feature

    hfe

    proportion (0 to 1) of high frequency energy feature

    hfc

    proportion (0 to 1) of high frequency content feature

    flux

    proportion (0 to 1) of spectral flux feature

    thresh

    threshold level for detection

    waitTime

    after an onset is detected, further detections are suppressed for this period in seconds, preventing multiple rapid triggers

    See also

    PV_HainsworthFoote

    Onsets

  284. final case class PV_LocalMax(chain: GE, thresh: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that passes only those bins whose magnitudes constitute local maxima.

    A phase vocoder UGen that passes only those bins whose magnitudes constitute local maxima. Additionally, the given threshold is also used to filter out bins whose magnitude lies below this threshold.

    chain

    the FFT'ed buffer

    thresh

    magnitude threshold used for general filtering, prior to the local-maximum-filtering

  285. final case class PV_MagAbove(chain: GE, thresh: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that passes only those bins whose magnitudes are above a given threshold.

    A phase vocoder UGen that passes only those bins whose magnitudes are above a given threshold.

    chain

    the FFT'ed buffer

    thresh

    magnitude threshold.

  286. final case class PV_MagBelow(chain: GE, thresh: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that passes only those bins whose magnitudes are below a given threshold.

    A phase vocoder UGen that passes only those bins whose magnitudes are below a given threshold.

    chain

    the FFT'ed buffer

    thresh

    magnitude threshold.

  287. final case class PV_MagClip(chain: GE, thresh: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that limits (clips) the magnitude of the bins to a given threshold.

    A phase vocoder UGen that limits (clips) the magnitude of the bins to a given threshold.

    chain

    the FFT'ed buffer

    thresh

    magnitude threshold. Each bin's magnitude is limited to be not greater than this threshold.

  288. final case class PV_MagDiv(chainA: GE, chainB: GE, zeroes: GE = 1.0E-4f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that divides magnitudes of two inputs and keeps the phases of the first input.

    A phase vocoder UGen that divides magnitudes of two inputs and keeps the phases of the first input.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

    zeroes

    the noise floor to assume when detecting zero bins in chainB that would cause a division by zero and hence blow up. The ugen will use divide by this magnitude instead when zeroes are detected, resulting in a maximum boost of zeroes.reciprocal .

  289. final case class PV_MagFreeze(chain: GE, freeze: GE = 1) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that freezes the magnitudes at current levels.

    A phase vocoder UGen that freezes the magnitudes at current levels. Freezing happens when the freeze input has a value of > 0.

    chain

    the FFT'ed buffer

    freeze

    whether the current levels are frozen (> 0) or not (0).

  290. final case class PV_MagMul(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that multiplies the magnitudes of two inputs and keeps the phases of the first input.

    A phase vocoder UGen that multiplies the magnitudes of two inputs and keeps the phases of the first input.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  291. final case class PV_MagNoise(chain: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that multiplies the magnitudes by random noise.

    A phase vocoder UGen that multiplies the magnitudes by random noise.

    chain

    the FFT'ed buffer

  292. final case class PV_MagShift(chain: GE, stretch: GE = 1.0f, shift: GE = 0.0f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that stretches and shifts the magnitudes of the spectrum.

    A phase vocoder UGen that stretches and shifts the magnitudes of the spectrum. This is live PV_BinShift but instead of scaling and shifting the whole complex bins (magnitude and phase), this only operates on the magnitudes and leaves the phases in their original bins.

    chain

    the FFT'ed buffer

    stretch

    the factor to multiply each bin position with

    shift

    the translation of the spectrum, in number of bins

  293. final case class PV_MagSmear(chain: GE, bins: GE = 1) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that averages each bin's magnitude with its neighbors.

    A phase vocoder UGen that averages each bin's magnitude with its neighbors.

    chain

    the FFT'ed buffer

    bins

    number of bins to average on each side of bin. As this number rises, so will CPU usage.

  294. final case class PV_MagSquared(chain: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that squares the magnitudes and re-normalizes to previous peak.

    A phase vocoder UGen that squares the magnitudes and re-normalizes to previous peak. This makes weak bins weaker.

    chain

    the FFT'ed buffer

  295. final case class PV_Max(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that outputs the bins with the maximum magnitude of the two inputs.

    A phase vocoder UGen that outputs the bins with the maximum magnitude of the two inputs.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  296. final case class PV_Min(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that outputs the bins with the minimum magnitude of the two inputs.

    A phase vocoder UGen that outputs the bins with the minimum magnitude of the two inputs.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  297. final case class PV_Mul(chainA: GE, chainB: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that performs a complex multiplication of the two inputs.

    A phase vocoder UGen that performs a complex multiplication of the two inputs. The formula is (Re(A) * Re(B) - Im(A) * Im(B)) + i(Im(A) * Re(B) + Re(A) * Im(B)) .

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

  298. final case class PV_PhaseShift(chain: GE, shift: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that shifts the phase of each bins by a given amount.

    A phase vocoder UGen that shifts the phase of each bins by a given amount.

    chain

    the FFT'ed buffer

    shift

    phase shift in radians

  299. final case class PV_PhaseShift270(chain: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that shift the phase of all bins by 270 (or -90) degrees.

    A phase vocoder UGen that shift the phase of all bins by 270 (or -90) degrees.

    chain

    the FFT'ed buffer

  300. final case class PV_PhaseShift90(chain: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that shift the phase of all bins by 90 degrees.

    A phase vocoder UGen that shift the phase of all bins by 90 degrees.

    chain

    the FFT'ed buffer

  301. final case class PV_RandComb(chain: GE, wipe: GE = 0.5f, trig: GE = 1) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that randomly clears out bins of the signal.

    A phase vocoder UGen that randomly clears out bins of the signal. Which bins are wiped out is subject to a random choice (only the amount is specified) that remains constant between triggers.

    chain

    the FFT'ed buffer

    wipe

    the probability (from 0 to 1) of bins being wiped out, hence 0 means no bins are wiped out, 1 means all bins are wiped out (output will be silence).

    trig

    causes a new random bin selection to be made. a trigger occurs when passing from non-positive to positive value.

  302. final case class PV_RandWipe(chainA: GE, chainB: GE, wipe: GE, trig: GE) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that cross-fades between two input spectra by taking bins randomly from them according to a given probability.

    A phase vocoder UGen that cross-fades between two input spectra by taking bins randomly from them according to a given probability.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

    wipe

    the crossfader position from 0.0 (all bins are taken from chainA ) to 1.0 (all bins are taken from chainB ). For instance, if wipe is 0.5, half of the bins are taken from either input. The decision whether a bin is taken from A or B is random, however remains constant between two triggers.

    trig

    a signal the triggers the re-newed process of determining for each bin whether it will be taken from input A or B. A trigger occurs when passing from non-positive to positive value.

    See also

    PV_BinWipe

  303. final case class PV_RectComb(chain: GE, numTeeth: GE = 1.0f, phase: GE = 0.0f, width: GE = 0.5f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that makes a series of gaps in a spectrum.

    A phase vocoder UGen that makes a series of gaps in a spectrum. This is done by multiplying the spectrum with a kind of rectangle wave that goes from zero to nyquist. The high slope of the rectangle lets the input bins pass (quasi pass-band), the low slope filters them out (quasi stop-band).

    chain

    the FFT'ed buffer

    numTeeth

    the number of periods in the rectangle wave, where zero would mean the input signal is not affected, one means that there is exactly one period of the wave across the spectrum, hence one pass-band and one stop-band.

    phase

    the phase offset of the rectangle wave, where 1.0 is one full period. This is like the offset into the wavetable holding the rectangle, so a value of 0.25 means we start 25% into the basic waveform, and after 0.75 periods the next full period (high slope) begins.

    width

    the pulse width between 0.0 (infinitely small high slope, so all bins filtered out) to 0.5 (half period is high slope, half period is low slope) to 1.0 (maximally wide high slope, no bins filtered out).

    See also

    PV_RectComb2

  304. final case class PV_RectComb2(chainA: GE, chainB: GE, numTeeth: GE = 1.0f, phase: GE = 0.0f, width: GE = 0.5f) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A phase vocoder UGen that switches between two input spectra according to a rectangle wave.

    A phase vocoder UGen that switches between two input spectra according to a rectangle wave. This is basically identical to PV_RectComb , however during the low slopes of the rectangle wave, instead of clearing out the bins, it copies over the corresponding bins of the second fft input buffer.

    chainA

    the first FFT'ed buffer (this gets replaced by the output signal)

    chainB

    the second FFT'ed buffer

    numTeeth

    the number of periods in the rectangle wave, where zero would mean the first input signal is fully passed through, one means that there is exactly one period of the wave across the spectrum, hence one pass-band (first signal passed through) and one stop-band (second signal passed through).

    phase

    the phase offset of the rectangle wave, where 1.0 is one full period. This is like the offset into the wavetable holding the rectangle, so a value of 0.25 means we start 25% into the basic waveform, and after 0.75 periods the next full period (high slope) begins.

    width

    the pulse width between 0.0 (infinitely small high slope, so all bins are copied from the second input) to 0.5 (half period is high slope -- copied from first input --, half period is low slope -- copied from second input) to 1.0 (maximally wide high slope, so all bins passed from the first input).

    See also

    PV_RectComb

  305. final case class PackFFT(chain: GE, fftSize: GE, values: GE, from: GE = 0, to: GE, clear: GE = 0) extends SingleOut with ControlRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen that writes a complex input signal into an FFT buffer.

    A UGen that writes a complex input signal into an FFT buffer. The input is a sequence of interleaved magnitudes and phases. It is written to an FFT buffer ready for transforming it back into time-domain audio using IFFT.

    values

    input data to pack. It should be a flat sequence containing interleaved magnitude and phase components of all bins in ascending order. E.g. [mag0, phase0, mag1, phase1, mag2, phase2, ... magN, phaseN]. This input is typically demand-rate.

    from

    index of lower bin

    to

    index of upper bin (inclusive)

    clear

    if 1 , clears the buffer before packing the values, setting its contents to zero.

    See also

    SetBuf

    IFFT

    FFT

    Unpack1FFT

  306. final case class Pad(in: GE, to: GE) extends SingleOut with Product with Serializable

    Permalink

    A graph element that controls the multi-channel expansion of its in argument to match the to argument by padding (extending and wrapping) it.

    A graph element that controls the multi-channel expansion of its in argument to match the to argument by padding (extending and wrapping) it.

    in

    the element to replicate

    to

    the reference element that controls the multi-channel expansion. the signal itself is not used or output by Pad.

  307. final case class Pan2(rate: Rate, in: GE, pos: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    A stereo panorama UGen based on equal-power amplitude control.

    A stereo panorama UGen based on equal-power amplitude control. When in center position ( pos = 0 ), the signal is attenuated by sqrt(0.5) or approx. -3 dB.

    in

    (monophonic) input signal to be panned

    pos

    panorama position between -1 (hard left) via 0 (center) to +1 (hard right)

    level

    additional gain control

    See also

    XFade2

    Balance2

    Pan4

    PanAz

    LinPan2

  308. final case class Pan4(rate: Rate, in: GE, xpos: GE = 0.0f, ypos: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    A four channel equal-power panorama UGen.

    A four channel equal-power panorama UGen. The outputs are in order leftFront , rightFront , leftBack , rightBack .

    in

    (monophonic) input signal to be panned

    xpos

    horizontal panorama position from -1 (left) to +1 (right)

    ypos

    front-to-back panorama position from -1 (back) to +1 (front)

    level

    additional gain control

    See also

    PanAz

    Pan2

  309. final case class PanAz(rate: Rate, numChannels: Int, in: GE, pos: GE = 0.0f, level: GE = 1.0f, width: GE = 2.0f, orient: GE = 0.0f) extends MultiOut with Product with Serializable

    Permalink

    An azimuth-based panorama UGen.

    An azimuth-based panorama UGen. It uses vector-based-amplitude panning where the arbitrary number of speakers is supposed to be distributed in a circle with even spacing between them. It uses an equal-power-curve to transition between adjacent speakers. Note the different default value for the orient argument!

    Use case: To spread an multi-channel input signal across an output bus with a different number of channels, such that the first input channel is played on the first output channel (no spread to adjacent channels) and the last input channel is played to the last output channel (no spread to adjacent channels), you would create a dedicated PanAz per input channel where the pan position is inChanIdx * 2f / (inChannels - 1) * (outChannels - 1) / outChannels .

    numChannels

    the number of output channels

    in

    the input signal

    pos

    the pan position. Channels are evenly spaced over a cyclic period of 2.0. the output channel position is pos / 2 * numChannels + orient . Thus, assuming an orient of 0.0 , and numChannels being for example 3 , a pos of 0*2.0/3 == 0.0 corresponds to the first output channel, a pos of 1*2.0/3 corresponds to the second output channel, a pos of 2*2.0/3=4.0/3 corresponds to the third and last output channel, and a pos of 3*2.0/3=2.0 completes the circle and wraps again to the first channel. Using a bipolar pan position, such as a sawtooth that ranges from -1 to +1, all channels will be cyclically panned through. Must be control rate.

    level

    a control rate level input (linear multiplier).

    width

    the width of the panning envelope. The default of 2.0 pans between pairs of adjacent speakers. Width values greater than two will spread the pan over greater numbers of speakers. Width values less than one will leave silent gaps between speakers.

    orient

    the offset in the output channels regarding a pan position of zero. Note that ScalaCollider uses a default of zero which means that a pan pos of zero outputs the signal exactly on the first output channel. This is different in sclang where the default is 0.5 which means that a pan position of zero will output the signal between the first and second speaker. Accordingly, an orient of 1.0 would result in a channel offset of one, where a pan position of zero would output the signal exactly on the second output channel, and so forth.

    See also

    SplayAz

    Pan2

  310. final case class PanB(rate: Rate, in: GE, azimuth: GE = 0.0f, elevation: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    An Ambisonics B-format encoding UGen.

    An Ambisonics B-format encoding UGen. B-format is the name for first order Ambisonics which has four channels W, X, Y, Z. By omitting the elevation control, we get a two dimensional planar encoded signal consisting only of the X and Y channels.

    Note that unlike PanB2, azimuth is in radians.

    in

    (monophonic) input signal to be encoded

    azimuth

    position around the circle in radians. -Pi/+Pi is behind, -Pi/2 is left, 0 is front, +Pi/2 is right.

    elevation

    elevation in radians, from -Pi/2 (bottom) to +Pi/2 (top)

    level

    additional gain control

    See also

    DecodeB2

    PanB2

  311. final case class PanB2(rate: Rate, in: GE, azimuth: GE = 0.0f, level: GE = 1.0f) extends MultiOut with Product with Serializable

    Permalink

    A two dimensional Ambisonics B-format encoding UGen.

    A two dimensional Ambisonics B-format encoding UGen. B-format is the name for first order Ambisonics which normally has four channels W, X, Y, Z. By omitting the elevation control, we get a two dimensional planar encoded signal consisting only of the W, X and Y channels.

    Note that unlike PanB, azimuth is normalized between -1 and +1.

    in

    (monophonic) input signal to be encoded

    azimuth

    position around the circle from -1 to +1. -1 and +1 correspond to -180/+180 degrees (behind), -0.5 is 90 degrees to the left, 0 is frontal, +0.5 is 90 degrees to the right.

    level

    additional gain control

    See also

    Pan2

    DecodeB2

    BiPanB2

    PanB

  312. final case class PartConv(rate: Rate, in: GE, fftSize: GE, buf: GE) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A UGen for partitioned convolution.

    A UGen for partitioned convolution. Its advantage over non-partitioning UGens such as Convolution2 is that the impulse response can be arbitrarily large amortization is used to spread processing and avoid CPU spikes.

    The impulse response buffer must be specially prepared, using a /b_gen command that transforms an existing regularly formatted buffer to a new partitioned convolution ready buffer.

    in

    the realtime input to be convolved

    fftSize

    FFT size which is twice the input signal partition size. This must be a multiple of the control-block size, and there must be at least two blocks per partition (to allow for amortization) (init-time only)

    buf

    buffer identifier for the fixed kernel (init-time only). (init-time only)

    See also

    Convolution2

    Convolution

  313. final case class Pause(gate: GE, node: GE) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen which pauses and resumes another node.

    A UGen which pauses and resumes another node. Note that the UGen initially assumes the node is running, that is, if gate is initially 1, this will not resume a paused node. Instead, the gate must go to zero and back to one to resume the node. Additionally, this UGen will only cause action if the gate value changes, that is, if the node is paused or resumed otherwise, this UGen will not interfere with that action, unless the gate value is adjusted.

    gate

    when 0, node is paused, when 1, node is resumed

    node

    the id of the node to be paused or resumed

    See also

    PauseSelf

    Free

  314. final case class PauseSelf(trig: GE) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen that, when triggered, pauses enclosing synth.

    A UGen that, when triggered, pauses enclosing synth. It pauses the enclosing synth when the input signal crosses from non-positive to positive.

    Note that if the trigger is initially high the UGen will not react. For example, PauseSelf.kr("foo".kr) will not work if the control is initially 1 . A work-around is to wrap the input in this case in a Trig object: PauseSelf.kr(Trig.kr("foo".kr)) . This is most likely a bug.

    This UGen outputs its input signal for convenience.

    trig

    the input signal which will trigger the action.

    See also

    FreeSelf

    Pause

  315. final case class PauseSelfWhenDone(src: GE with HasDoneFlag) extends SingleOut with ControlRated with HasSideEffect with Product with Serializable

    Permalink

    A UGen that, when its input UGen is finished, pauses enclosing synth.

    A UGen that, when its input UGen is finished, pauses enclosing synth. This is essentially a shortcut for PauseSelf.kr(Done.kr(src)) , so instead of providing a trigger signal it reads directly the done flag of an appropriate ugen (such as Line or PlayBuf ).

    This UGen outputs its input signal for convenience.

    src

    the input UGen which when finished will trigger the action.

    See also

    Done

    FreeSelfWhenDone

    PauseSelf

    Pause

  316. final case class Peak(rate: Rate, in: GE, trig: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen to measure a signal's peak amplitude.

    A UGen to measure a signal's peak amplitude. Technically, this UGen works like RunningMax after the absolute value of the input signal is taken.

    The UGen keeps an internal state that reflects the maximum absolute input value observed. When a trigger occurs at the reset input, it first copies the current maximum value to its output and then (quasi-simultaneously) resets its internal state to the current absolute input value. This way, the peak value seen from the outside at trigger time is the correct peak value up to that moment. See the 'illustrate timing' example to understand this timing.

    in

    input signal to analyze

    trig

    resets the maximum observed value to the current absolute value of the input signal

    See also

    Amplitude

    PeakFollower

    RunningSum

    RunningMax

    RunningMin

  317. final case class PeakFollower(rate: MaybeRate, in: GE, decay: GE = 0.999f) extends SingleOut with Product with Serializable

    Permalink

    A UGen that continually reports the peak amplitude of the signal received at the input.

    A UGen that continually reports the peak amplitude of the signal received at the input. If the absolute input level drops below the observed peak value, this value decreases by the factor given as decay parameter (but no more than the current absolute input level).

    in

    input signal to trace

    decay

    feedback coefficient controlling the release rate. This should be less than one, otherwise the UGen may blow up.

    See also

    LagUD

    RunningSum

    Amplitude

    Peak

  318. final case class Phasor(rate: Rate, trig: GE = 0, speed: GE = 1.0f, lo: GE = 0.0f, hi: GE = 1.0f, resetVal: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A linear repeating ramp UGen between start and end values.

    A linear repeating ramp UGen between start and end values. Using a trigger input, it can be reset to a specific position. Upon reaching the end of its ramp, Phasor will wrap back to its start value. Note: Since end is defined as the wrap point, its value is never actually output.

    trig

    trigger signal that causes the phasor to jump to the resetVal position

    speed

    amount of increment per sample frame. I.e at a speed of 1, each sample output by the UGen will be 1 greater than the preceding sample. To achieve a specific frequency f in Hertz, use a speed value of f / SampleRate.ir .

    lo

    start value of the ramp

    hi

    end value of the ramp (exclusive)

    resetVal

    value to jump to upon receiving a trigger in the trig input

    See also

    LFSaw

    Line

    Stepper

    Ramp

  319. final case class PhysicalIn(indices: GE, numChannels: Seq[Int]) extends GE.Lazy with AudioRated with Product with Serializable

    Permalink

    A graph element which reads from a connected sound driver input.

    A graph element which reads from a connected sound driver input. This is a convenience element for accessing physical input signals, e.g. from a microphone connected to your audio interface. It expands to a regular In UGen offset by NumOutputBuses.ir.

    For example, consider an audio interface with channels 1 to 8 being analog line inputs, channels 9 and 10 being AES/EBU and channels 11 to 18 being ADAT inputs. To read a combination of the analog and ADAT inputs, either of the following statement can be used:

    PhysicalIn(Seq(0, 8), Seq(8, 8))
    PhysicalIn(Seq(0, 8), Seq(8))      // numChannels wraps!
    indices

    the physical index to read from (beginning at zero which corresponds to the first channel of the audio interface or sound driver). Maybe be a multichannel element to specify discrete indices.

    numChannels

    the number of consecutive channels to read for each index. Wraps around if the sequence has less elements than indices has channels.

  320. final case class PhysicalOut(indices: GE, in: GE) extends ZeroOut with AudioRated with Product with Serializable

    Permalink

    A graph element which writes to a connected sound driver output.

    A graph element which writes to a connected sound driver output. This is a convenience element for Out with the ability to provide a set of discrete indices to which corresponding channels of the input signal are mapped, whereas multichannel expansion with respect to the index argument of Out typically do not achieve what you expect.

    indices

    the physical index to write to (beginning at zero which corresponds to the first channel of the audio interface or sound driver). may be a multichannel argument to specify discrete channels. In this case, any remaining channels in in are associated with the last bus index offset.

    in

    the signal to write

  321. final case class PinkNoise(rate: Rate, mul: GE = 1.0f) extends SingleOut with IsIndividual with Product with Serializable

    Permalink

    A noise generator UGen whose spectrum falls off in power by 3 dB per octave.

    A noise generator UGen whose spectrum falls off in power by 3 dB per octave. This gives equal power over the span of each octave. This version gives 8 octaves of pink noise.

    The values produced by this UGen were observed to lie with very high probability between approx. -0.65 and +0.81 (before being multiplied by mul ). The RMS is approx. -16 dB.

    mul

    Not actually a UGen input, this argument produces a multiplication of the output by this factor. A multi-channel mul argument will cause the generation of multiple independent noise generators.

    See also

    RandSeed

    ClipNoise

    GrayNoise

    BrownNoise

    WhiteNoise

  322. final case class Pitch(rate: Rate, in: GE, initFreq: GE = 440.0f, minFreq: GE = 60.0f, maxFreq: GE = 4000.0f, execFreq: GE = 100.0f, binsPerOct: GE = 16, median: GE = 1, ampThresh: GE = 0.01f, peakThresh: GE = 0.5f, downSample: GE = 1, clarity: GE = 0) extends MultiOut with Product with Serializable

    Permalink

    An autocorrelation based pitch following UGen.

    An autocorrelation based pitch following UGen. It is more accurate than ZeroCrossing , but more also more CPU costly. For most purposes the default settings can be used and only in needs to be supplied.

    The UGen has two outputs: The first output is the frequency estimate in Hertz, the second output is a toggle hasFreq , which tells whether a pitch was found (1) or not (0). If the clarify argument is used, hasFreq has more fine grained information.

    The pitch follower executes periodically at the rate specified by execFreq in cps. First it detects whether the input peak to peak amplitude is above the ampThresh . If it is not then no pitch estimation is performed, the hasFreq output is set to zero and the freq output is held at its previous value. Otherwise, the autocorrelation is calculated, and the first peak after the peak around the lag of zero that is above peakThresh times the amplitude of the peak at lag zero is reported.

    in

    The signal to be analyzed.

    initFreq

    The initial value of the freq output, until the first valid pitch is found. (init-time only)

    minFreq

    The minimum frequency in Hertz to be considered for reporting. (init-time only)

    maxFreq

    The maximum frequency in Hertz to be considered for reporting. (init-time only)

    execFreq

    The frequency at which the pitch is estimated. This will be automatically clipped to be between minFreq and maxFreq . (init-time only)

    binsPerOct

    A value which guides the search for the peak frequency in the first coarse step. Its setting does *not* affect the final pitch resolution; setting it larger will cause the coarse search to take longer, and setting it smaller will cause the fine search to take longer. (init-time only)

    median

    This specifies the length of a median filter applied to the frequency output estimation. With the default value of 1 the filter is defeated. Median filtering can help eliminating single spikes and jitter. This will however add latency to the output. (init-time only)

    ampThresh

    The minimum amplitude threshold above which the pitch follower operates. An input signal below this threshold is not analyzed. (init-time only)

    peakThresh

    This is a threshold used to find the first peak in the autocorrelation signal which gives the reported frequency. It is a factor of the energy of the signal (autocorrelation coefficient at zero). Set this value higher (e.g. to 1 ) to eliminate false frequencies corresponding to overtones. (init-time only)

    downSample

    An integer factor by which the input signal is down sampled to reduce CPU overhead. This will also reduce the pitch resolution. The default value of 1 means that the input signal is not down sampled. (init-time only)

    clarity

    If the clarity argument is greater than zero (it is zero by default) then the hasFreq output is given additional detail. Rather than simply being 1 when a pitch is detected, it is a "clarity" measure in the range between zero and one. (Technically, it's the height of the autocorrelation peak normalised by the height of the zero-lag peak.) It therefore gives a kind of measure of "purity" of the pitched signal. (init-time only)

  323. final case class PitchShift(in: GE, winSize: GE = 0.2f, pitchRatio: GE = 1.0f, pitchDispersion: GE = 0.0f, timeDispersion: GE = 0.0f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A time domain granular pitch shifter.

    A time domain granular pitch shifter. Grains have a triangular amplitude envelope and an overlap of 4:1.

    in

    The input signal.

    winSize

    The size of the grain window in seconds. (init-time only)

    pitchRatio

    The ratio of the pitch shift. Must be from 0 to 4.

    pitchDispersion

    The maximum random deviation of the pitch from the pitchRatio.

    timeDispersion

    A random offset of from zero to timeDispersion seconds is added to the delay of each grain. Use of some dispersion can alleviate a hard comb filter effect due to uniform grain placement. It can also be an effect in itself. timeDispersion can be no larger than windowSize.

  324. final case class PlayBuf(rate: Rate, numChannels: Int, buf: GE, speed: GE = 1.0f, trig: GE = 1, offset: GE = 0.0f, loop: GE = 1, doneAction: GE = doNothing) extends MultiOut with HasSideEffect with IsIndividual with HasDoneFlag with Product with Serializable

    Permalink

    A UGen to play back samples from a buffer in memory.

    A UGen to play back samples from a buffer in memory.

    PlayBuf provides a kind of high-level interface to sample-playback, whereas BufRd represents a kind of lower-level access. While BufRd has a random-access-pointer in the form of a phase input, PlayBuf advances the phase automatically based on a given playback speed. PlayBuf uses cubic interpolation.

    numChannels

    the number of channels that the buffer will be. Since this is a constant, a change in number of channels of the underlying bus must be reflected by creating different SynthDefs. If a buffer identifier is used of a buffer that has a different numChannels then specified in the PlayBuf, it will fail silently.

    buf

    the identifier of the buffer to use

    speed

    1 advances the play head by the server's sample rate each second. So 2 means doubling speed (and pitch), and 0.5 means half speed (and half pitch). Negative numbers can be used for backwards playback. If the underlying buffer represents a sound at a different sample rate, the rate should be multiplied by BufRateScale.kr(bufID) to obtain the correct speed.

    trig

    a trigger which causes a jump to the given offset . A trigger occurs when a signal changes from non-positive to positive (e.g. <= 0 to > 0).

    offset

    sample frame to start playback. This is read when a trigger occurs. It may be fractional.

    loop

    1 to loop after the play head reaches the buffer end, 0 to not loop. This can be modulated.

    doneAction

    what to do when the play head reaches the buffer end. This is only effective when loop is zero.

    See also

    BufFrames

    BufRateScale

    Done

    DoneAction

    RecordBuf

    DiskIn

    BufRd

  325. final case class Pluck(in: GE, trig: GE = 1, maxDelayTime: GE = 0.2f, delayTime: GE = 0.2f, decayTime: GE = 1.0f, coeff: GE = 0.5f) extends SingleOut with AudioRated with Product with Serializable

    Permalink

    A Karplus-Strong UGen.

    A Karplus-Strong UGen.

    in

    An excitation signal.

    trig

    Upon a negative to positive transition, the excitation signal will be fed into the delay line.

    maxDelayTime

    Maximum delay time in seconds (initializes the internal delay buffer). (init-time only)

    delayTime

    Delay time in seconds.

    decayTime

    Time for the echoes to decay by 60 decibels. Negative times emphasize odd partials.

    coeff

    the coefficient of the internal OnePole filter. Values should be between -1 and +1 (larger values will be unstable... so be careful!).

  326. final case class Poll(rate: MaybeRate, trig: GE, in: GE, label: String = "poll", trigID: GE = 1) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen for printing the current output value of its input to the console.

    A UGen for printing the current output value of its input to the console.

    trig

    a non-positive to positive transition telling Poll to return a value

    in

    the signal you want to poll

    label

    a string or symbol to be printed with the polled value

    trigID

    if greater then 0, a "/tr" OSC message is sent back to the client (similar to SendTrig )

    See also

    SendTrig

  327. final case class Pulse(rate: Rate, freq: GE = 440.0f, width: GE = 0.5f) extends SingleOut with Product with Serializable

    Permalink

    A band-limited pulse wave generator UGen, capable of pulse width modulation.

    A band-limited pulse wave generator UGen, capable of pulse width modulation.

    freq

    Fundamental frequency in Hertz

    width

    Pulse width ratio from zero to one. 0.5 makes a square wave.

    See also

    LFPulse

  328. final case class PulseCount(rate: MaybeRate, trig: GE, reset: GE = 0) extends SingleOut with Product with Serializable

    Permalink

    A UGen that counts the number of triggers observed.

    A UGen that counts the number of triggers observed.

    trig

    a trigger happens when the signal changes from non-positive to positive

    reset

    when triggered, resets the counter to zero. When both trig and reset are triggered at the same time, the reset takes precedence (output will be zero).

    See also

    Stepper

  329. final case class PulseDivider(rate: MaybeRate, trig: GE, div: GE = 2, start: GE = 0) extends SingleOut with Product with Serializable

    Permalink

    A UGen that decimates trigger by outputting one impulse each time a certain number of triggers at its input have been received.

    A UGen that decimates trigger by outputting one impulse each time a certain number of triggers at its input have been received.

    trig

    a trigger occurs when the signal changes from non-positive to positive.

    div

    decimation factor of the UGen. A value of 1 would cause an output trigger for each input trigger, whereas a value of 2 would cause an output trigger each time the internal counter has seen two input triggers.

    start

    value of the internal counter. For example, if div is 2 , then a start value of 0 (default) means that the first output trigger happens after two input triggers, a start value of 1 means that the first output trigger happens after just one input trigger. Negative values can increase the number of required input triggers for the first output trigger. For example, if start is -1 , the first output trigger happens after three input triggers.

    See also

    Stepper

    PulseCount

  330. final case class QuadC(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 1.0f, c: GE = 0.75f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A cubic-interpolating sound generator based on the difference equation:

    A cubic-interpolating sound generator based on the difference equation:

    x[n+1] = a * pow(x[n], 2) + b * x[n] + c
    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    c

    Equation variable

    xi

    Initial value of x

    See also

    QuadL

    QuadN

  331. final case class QuadL(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 1.0f, c: GE = 0.75f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A linear-interpolating sound generator based on the difference equation:

    A linear-interpolating sound generator based on the difference equation:

    x[n+1] = a * pow(x[n], 2) + b * x[n] + c
    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    c

    Equation variable

    xi

    Initial value of x

    See also

    QuadC

    QuadN

  332. final case class QuadN(rate: Rate, freq: GE = Nyquist(), a: GE = 1.0f, b: GE = 1.0f, c: GE = 0.75f, xi: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A non-interpolating sound generator based on the difference equation:

    A non-interpolating sound generator based on the difference equation:

    x[n+1] = a * pow(x[n], 2) + b * x[n] + c
    freq

    Iteration frequency in Hertz

    a

    Equation variable

    b

    Equation variable

    c

    Equation variable

    xi

    Initial value of x

    See also

    QuadC

    QuadL

  333. final case class RHPF(rate: MaybeRate, in: GE, freq: GE = 440.0f, rq: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A resonant high pass filter UGen.

    A resonant high pass filter UGen.

    in

    input signal to be filtered

    freq

    cutoff frequency in Hertz

    rq

    reciprocal of Q. The Q (or quality) is conventionally defined as cutoff-frequency / bandwidth, meaning that rq  = bandwidth / cutoff-frequency. A higher Q or lower rq produces a steeper filter.

    See also

    Resonz

    RLPF

    HPF

  334. final case class RLPF(rate: MaybeRate, in: GE, freq: GE = 440.0f, rq: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A resonant low pass filter UGen.

    A resonant low pass filter UGen.

    in

    input signal to be filtered

    freq

    cutoff frequency in Hertz

    rq

    reciprocal of Q. The Q (or quality) is conventionally defined as cutoff-frequency / bandwidth, meaning that rq  = bandwidth / cutoff-frequency. A higher Q or lower rq produces a steeper filter.

    See also

    Resonz

    RHPF

    LPF

  335. final case class RadiansPerSample() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A UGen that delivers the conversion factor from frequency in Hertz to radians (normalized frequency).

    A UGen that delivers the conversion factor from frequency in Hertz to radians (normalized frequency). The relation is RadiansPerSample * sr = 2pi , thus multiplying the UGen with a frequency between zero and nyquist (sr/2) yields the normalized frequency between zero and pi.

    See also

    SampleRate

  336. final case class Ramp(rate: MaybeRate, in: GE, dur: GE = 0.1f) extends SingleOut with Product with Serializable

    Permalink

    A UGen which produces a linear lag (time smear) regarding and input signal.

    A UGen which produces a linear lag (time smear) regarding and input signal. Other than Lag which is a feedback filter with exponential decay, Ramp applies a linear ramp. This is achieved by sampling the input signal at regular intervals given by the lagTime and starting a new line segment after each interval.

    in

    the signal to smooth out

    dur

    the ramp-time (seconds) which is also the interval of the sampling

    See also

    Sweep

    Lag

  337. final case class Rand(lo: GE = 0.0f, hi: GE = 1.0f) extends SingleOut with ScalarRated with IsIndividual with Product with Serializable

    Permalink

    A scalar UGen that generates a single random decimal value, using a uniform distribution from lo to hi .

    A scalar UGen that generates a single random decimal value, using a uniform distribution from lo to hi .

    lo

    lower limit of the output range

    hi

    upper limit of the output range

    See also

    RandSeed

    ExpRand

    TRand

    IRand

  338. final case class RandID(rate: Rate, id: GE = 0) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen that determines which random number generator is used for the enclosing synth.

    A UGen that determines which random number generator is used for the enclosing synth. All synths that use the same generator reproduce the same sequence of numbers when the same seed is set again.

    id

    the random number generator identifier from zero until the maximum number of generators specified with the server switch -r (default: 64)

    See also

    WhiteNoise

    IRand

    RandSeed

    Rand

  339. final case class RandSeed(rate: Rate, trig: GE = 1, seed: GE = 56789) extends SingleOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen that resets the seed of the synth's random number generator upon receiving a trigger.

    A UGen that resets the seed of the synth's random number generator upon receiving a trigger. All synths that use the same random number generator reproduce the same sequence of numbers again. The generator can be set using the RandID UGen.

    trig

    trigger that causes the seed to be set

    seed

    the seed for the random number generator, read at the moment the trigger arrives.

    See also

    WhiteNoise

    IRand

    RandID

    Rand

  340. final case class RecordBuf(rate: Rate, in: GE, buf: GE, offset: GE = 0, recLevel: GE = 1.0f, preLevel: GE = 0.0f, run: GE = 1, loop: GE = 1, trig: GE = 1, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with IsIndividual with HasDoneFlag with Product with Serializable

    Permalink

    Records input into a Buffer.

    Records input into a Buffer. If recLevel is 1.0 and preLevel is 0.0 then the new input overwrites the old data. If they are both 1.0 then the new data is added to the existing data. (Any other settings are also valid.)

    in

    the signal to record

    buf

    the identifier of the buffer to use

    offset

    sample frame to begin writing from. This is read when a trigger occurs.

    recLevel

    value to multiply by input before mixing with existing data.

    preLevel

    value by which the previous buffer contents is multiplied when recording. If this value is zero, the buffer contents is completely overwritten. If this value is one, the new signal is added to the previous content.

    run

    if zero the recording pauses, otherwise it resumes. The value of run is only read at control-rate! When the recording is paused, the "write-head" remains in its current position and does not advance.

    loop

    1 to loop after the write head reaches the buffer end, 0 to not loop. This can be modulated.

    trig

    a trigger which causes a jump to the given offset . A trigger occurs when a signal changes from non-positive to positive (e.g. <= 0 to > 0).

    doneAction

    what to do when the write head reaches the buffer end. This is only effective when loop is zero.

    See also

    BufFrames

    BufRateScale

    Done

    DoneAction

    PlayBuf

    DiskOut

    BufWr

  341. final case class Reduce(elem: GE, op: Op) extends SingleOut with Product with Serializable

    Permalink
  342. final case class RepeatChannels(a: GE, num: Int) extends GE.Lazy with Product with Serializable

    Permalink

    An auxiliary graph element that repeats the channels of an input signal, allowing for example for an exhaustive element-wise combination with another signal.

    An auxiliary graph element that repeats the channels of an input signal, allowing for example for an exhaustive element-wise combination with another signal.

    Normally, the way multi-channel expansion works is that when two signals are combined, the output signal has a number of channels that is the maximum of the individual number of channels, and channels will be automatically wrapped around.

    For example, in x * y if x has three and y has five channels, the result expands to

    Seq[GE](
      x\0 * y\0, x\1 * y\1, x\2 * y\2, x\0 * y\3, x\1 * y\4
    )

    Using this element, we can enforce the appearance of all combinations of channels, resulting in a signal whose number of channels is the sum of the individual number of channels.

    For example, RepeatChannels(x, 5) expands to

    Seq[GE](
      x \ 0, x \ 0, x \ 0, x \ 0, x \ 0,
      x \ 1, x \ 1, x \ 1, x \ 1, x \ 1,
      x \ 2, x \ 2, x \ 2, x \ 2, x \ 2
    )

    And RepeatChannels(x, 5) * y accordingly expands to the fifteen-channels signal

    Seq[GE](
      (x\0) * (y\0), (x\0) * (y\1), (x\0) * (y\2), (x\0) * (y\3), (x\0) * (y\4),
      (x\1) * (y\0), (x\1) * (y\1), (x\1) * (y\2), (x\1) * (y\3), (x\1) * (y\4),
      (x\2) * (y\0), (x\2) * (y\1), (x\2) * (y\2), (x\2) * (y\3), (x\2) * (y\4)
    )
    a

    the signal whose channels to repeat

    num

    the number of repetitions for each input channel

    See also

    ChannelRangeProxy

  343. final case class ReplaceOut(bus: GE, in: GE) extends ZeroOut with AudioRated with HasSideEffect with IsIndividual with Product with Serializable

    Permalink

    A UGen that replace the contents of a bus with an input signal.

    A UGen that replace the contents of a bus with an input signal. Other than Out , the signal is not added to the previous contents of the bus but replaces it, allowing for a simple way of an "insert" effect.

    Multi-channel input signals, for example a PanAz , are written as such to the bus without expansion. That is, the bus index argument is used for the first channel, the second channel will appear on bus + 1 , etc.

    If you have an expanding multi-channel input, however, you have to be careful. For example, if you have PanAz.ar(2, SinOsc.ar(Seq(444, 555, 666)) * 0.2, Seq(-1, 0, 1)) , this results in one output UGen carrying one channel, and another one carrying two channels. (The way this works is consistent with SCLang). In order to get the correct behaviour (left outputs of the PanAz summed, and right output of the PanAz summed), wrap this expression in a Mix(...) before passing it to the output UGen.

    bus

    bus index to write to. For an audio-rate UGen, this is an audio-bus, for a control-rate UGen, this is a control-bus.

    in

    signal to write to the bus. If the UGen is audio-rate, the input must also be audio-rate.

    See also

    XOut

    Out

    In

  344. final case class Resonz(rate: MaybeRate, in: GE, freq: GE = 440.0f, rq: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A two pole resonant filter UGen.

    A two pole resonant filter UGen. It has zeroes at z = +1 and z = -1.

    Based on K. Steiglitz, "A Note on Constant-Gain Digital Resonators", Computer Music Journal, vol 18, no. 4, pp. 8-10, Winter 1994.

    in

    input signal to be filtered

    freq

    resonant frequency in Hertz

    rq

    reciprocal of Q. The Q (or quality) is conventionally defined as center-frequency / bandwidth, meaning that rq  = bandwidth / center-frequency. A higher Q or lower rq produces a steeper filter.

    See also

    MidEQ

    LPF

    HPF

    Ringz

    BPF

  345. final case class Ringz(rate: MaybeRate, in: GE, freq: GE = 440.0f, decay: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A resonant or "ringing" filter UGen.

    A resonant or "ringing" filter UGen. This is the same as Resonz , except that instead of a Q parameter, the bandwidth is specified as a 60 dB ring decay time. One Ringz is equivalent to one component of the Klank UGen.

    in

    input signal to be filtered

    freq

    resonant frequency in Hertz

    decay

    the 60 dB decay time in seconds

    See also

    MidEQ

    Klank

    BPF

    Formlet

    Resonz

  346. final case class Rotate2(rate: Rate, x: GE, y: GE, pos: GE = 0.0f) extends MultiOut with Product with Serializable

    Permalink

    A UGen that can be used for rotating an ambisonic B-format sound field around an axis.

    A UGen that can be used for rotating an ambisonic B-format sound field around an axis. It uses an equal-power rotation so it also works well on stereo sounds. It takes two audio inputs ( x , y ) and an angle control ( pos ). It outputs again two channels, using these formulas:

    xr = cos(angle) * x + sin(angle) * y
    yr = cos(angle) * y - sin(angle) * x

    where angle = pos * Pi . This allows, for example, the use of LFSaw to create a continuous rotation around a circle. Note: Be careful when accessing the output channels. xr and yr are the X and Y output channels, whereas x and y refers to the X and Y input channel.

    x

    B-format X input channel

    y

    B-format Y input channel

    pos

    angle to rotate around the circle, normalized between -1 and +1. -1 and +1 corresponds to -180 and +180 degrees (behind), -0.5 is 90 degrees left, 0 is frontal, +0.5 is 90 degrees right.

  347. final case class RunningMax(rate: Rate, in: GE, trig: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen to measure a signal's maximum value between triggers.

    A UGen to measure a signal's maximum value between triggers.

    The UGen keeps an internal state that reflects the maximum input value observed. When a trigger occurs at the reset input, it first copies the current maximum value to its output and then (quasi-simultaneously) resets its internal state to the current input value.

    in

    input signal to analyze

    trig

    resets the maximum observed value to the current value of the input signal

    See also

    RunningSum

    Peak

    RunningMin

  348. final case class RunningMin(rate: Rate, in: GE, trig: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen to measure a signal's minimum value between triggers.

    A UGen to measure a signal's minimum value between triggers.

    The UGen keeps an internal state that reflects the minimum input value observed. When a trigger occurs at the reset input, it first copies the current minimum value to its output and then (quasi-simultaneously) resets its internal state to the current input value.

    in

    input signal to analyze

    trig

    resets the minimum observed value to the current value of the input signal

    See also

    RunningSum

    Peak

    RunningMax

  349. final case class RunningSum(rate: MaybeRate, in: GE, length: GE = 440) extends SingleOut with Product with Serializable

    Permalink

    A UGen calculating the running sum of an input signal over a given number of samples.

    A UGen calculating the running sum of an input signal over a given number of samples.

    in

    the input signal to sum up

    length

    the length of the sliding window over the input signal. these are the number of audio sample-frames for audio-rate calculation, or the number of blocks for control-rate calculation summed up. Warning: The UGen crashes when length is zero. (init-time only)

    See also

    PulseCount

    Median

    Integrator

  350. final case class SOS(rate: MaybeRate, in: GE, a0: GE = 0.0f, a1: GE = 0.0f, a2: GE = 0.0f, b1: GE = 0.0f, b2: GE = 0.0f) extends SingleOut with Product with Serializable

    Permalink

    A second order filter section (biquad) UGen.

    A second order filter section (biquad) UGen. Filter coefficients are given directly rather than calculated for you. The formula is equivalent to:

    out(i) = a0 * in(i) + a1 * in(i-1) + a2 * in(i-2) + b1 * out(i-1) + b2 * out(i-2)
    in

    input signal to be filtered

    See also

    FOS

  351. final case class SampleDur() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A UGen that reports the server's current (audio) sample period in seconds.

    A UGen that reports the server's current (audio) sample period in seconds. This is equivalent to the reciprocal of SampleRate

    See also

    ControlDur

    SampleRate

  352. final case class SampleRate() extends SingleOut with ScalarRated with Product with Serializable

    Permalink

    A UGen that reports the server's current (audio) sample rate.

    A UGen that reports the server's current (audio) sample rate. This is equivalent to the reciprocal of SampleDur

    See also

    RadiansPerSample

    ControlRate

    SampleDur

  353. final case class Saw(rate: Rate, freq: GE = 440.0f) extends SingleOut with Product with Serializable

    Permalink

    A band-limited sawtooth wave generator UGen.

    A band-limited sawtooth wave generator UGen.

    freq

    Fundamental frequency in Hertz

    See also

    LFSaw

  354. final case class Schmidt(rate: MaybeRate, in: GE, lo: GE = 0.0f, hi: GE = 1.0f) extends SingleOut with Product with Serializable

    Permalink

    A Schmidt trigger UGen.

    A Schmidt trigger UGen. Initially it outputs zero. When the input signal rises above hi , its output switches to 1.0, which is hold until the signal falls below lo , switching the output again to 0.0. The produces a kind of hysteresis behavior, preventing heavy oscillations in a noisy system which might occur with a single-threshold trigger.

    in

    input signal to be analyzed

    lo

    low threshold

    hi

    high threshold

  355. final case class ScopeOut(rate: Rate, buf: GE, in: GE) extends ZeroOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink
  356. final case class ScopeOut2(rate: Rate, buf: GE, in: GE, maxFrames: GE = 4096, frames: GE) extends ZeroOut with HasSideEffect with IsIndividual with Product with Serializable

    Permalink
  357. final case class Select(rate: Rate, index: GE, in: GE) extends SingleOut with Product with Serializable

    Permalink

    A UGen which selects among a sequence of inputs, according to an index signal.

    A UGen which selects among a sequence of inputs, according to an index signal. Note that, although only one signal of the multi input is let through at a time, still all ugens are continuously running.

    index

    an index signal into the channels of the in argument. The index is automatically clipped to lie between 0 and in.numOutputs - 1 . The index is truncated to its integer part (not rounded), hence using for instance an index of 0.9 will still be interpreted as index 0 .

    in

    a graph element which is composed of the channels to be indexed.

    See also

    TWindex

  358. final case class SendReply(rate: MaybeRate, trig: GE, values: GE, msgName: String = "/reply", id: GE = 0) extends ZeroOut with HasSideEffect with Product with Serializable

    Permalink

    A UGen which sends an sequence of values from the server to all notified clients upon receiving triggers.

    A UGen which sends an sequence of values from the server to all notified clients upon receiving triggers. The message sent is osc.Message(<(String) msgName>, <(Int) nodeID>, <(Int) replyID>, <(Float) values>*) .

    For sending a single value, SendTrig provides an alternative.

    trig

    a non-positive to positive transition triggers a message

    values

    a graph element comprising the signal channels to be polled

    msgName

    a string specifying the OSC message's name. by convention, this should start with a forward slash and contain only 7-bit ascii characters.

    id

    an integer identifier which is contained in the reply message. While you can distinguish different SendReply instances from the same Synth by choosing different OSC message names, depending on the application you may use the same message name but different ids (similar to SendTrig ).

    Note

    The argument order is different from its sclang counterpart.

    See also