de.sciss.synth

ugen

package ugen

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ugen
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

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

    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

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

    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

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

    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

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

    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

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

    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.

  6. final case class ListTrig(rate: Rate, buf: GE, size: GE, reset: GE = 0, delay: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    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

  7. final case class ListTrig2(rate: Rate, buf: GE, size: GE, reset: GE = 0) extends SingleOut with IsIndividual with Product with Serializable

    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

  8. 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

    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

Value Members

  1. object ArrayMax extends Serializable

    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.

    Examples
    // randomly changing array of three numbers
    play {
      val tr  = Impulse.kr(1)
      val sig = Vector.fill(3)(TIRand.kr(0, 100, tr))
      sig.zipWithIndex.foreach { case (n, i) => n.poll(tr, s"sig[$i]") }
      val m   = ArrayMax.kr(sig)
      m.value.poll(tr, "max-value")
      m.index.poll(tr, "max-index")
      ()
    }
    See also

    BufMax

    ArrayMin

  2. object ArrayMin extends Serializable

    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.

    Examples
    // randomly changing array of three numbers
    play {
      val tr  = Impulse.kr(1)
      val sig = Vector.fill(3)(TIRand.kr(0, 100, tr))
      sig.zipWithIndex.foreach { case (n, i) => n.poll(tr, s"sig[$i]") }
      val m   = ArrayMin.kr(sig)
      m.value.poll(tr, "min-value")
      m.index.poll(tr, "min-index")
      ()
    }
    See also

    BufMin

    ArrayMax

  3. object BufMax extends Serializable

    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.

    Examples
    // simple test
    val b = Buffer(s)
    b.alloc(100)
    b.zero()
    b.set(33 -> 1.034)
    
    // verify that the 33rd value is detected...
    val x = play {
      val m  = BufMax.kr(b.id)
      val tr = "poll".tr(1)
      m.value.poll(tr, "max-value")
      m.index.poll(tr, "max-index")
      ()
    }
    
    // ...until we set a new maximum...
    b.set(74 -> 1.038); x.set("poll" -> 1)
    
    x.free(); b.free()
    See also

    ArrayMax

    BufMin

  4. object BufMin extends Serializable

    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.

    Examples
    // simple test
    val b = Buffer(s)
    b.alloc(100)
    b.zero()
    b.set(33 -> -1.034)
    
    // verify that the 33rd value is detected...
    val x = play {
      val m  = BufMin.kr(b.id)
      val tr = "poll".tr(1)
      m.value.poll(tr, "min-value")
      m.index.poll(tr, "min-index")
      ()
    }
    
    // ...until we set a new minimum...
    b.set(74 -> -1.038); x.set("poll" -> 1)
    
    x.free(); b.free()
    See also

    ArrayMin

    BufMax

  5. object DFM1 extends Serializable

    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.

  6. object ListTrig extends Serializable

    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.

    Examples
    // trigger grains
    val b = Buffer(s)
    b.alloc(10)
    b.setData(Vector(1, 2, 3, 5, 8, 13, 21, 34, 55, 89).map(_ * 0.1f)) // quasi Fibonacci
    
    val x = play {
      val reset = "reset".tr
      val tr  = ListTrig.kr(b.id, BufFrames.kr(b.id), reset)
      Timer.kr(tr).poll(tr, "timer")
      val env = EnvGen.ar(Env.perc(0.01, 0.1), gate = tr)
      SinOsc.ar(Seq(440, 460)) * env * 0.2
    }
    
    x.set("reset" -> 1)  // start anew
    x.free(); b.free()
    Note

    The argument order is different from its sclang counterpart.

    See also

    Timer

    Dbufrd

    DemandEnvGen

    Logger

    ListTrig2

  7. object ListTrig2 extends Serializable

    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.

    Examples
    // trigger grains
    val b = Buffer(s)
    b.alloc(11)
    b.setData(Vector(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89).map(_ * 0.1f)) // Fibonacci
    
    val x = play {
      val reset = "reset".tr
      val tr  = ListTrig2.kr(b.id, BufFrames.kr(b.id), reset)
      Timer.kr(tr).poll(tr, "timer")
      val env = EnvGen.ar(Env.perc(0.01, 0.1), gate = tr)
      SinOsc.ar(Seq(440, 460)) * env * 0.2
    }
    
    x.set("reset" -> 1)  // start anew
    x.free(); b.free()
    Note

    The argument order is different from its sclang counterpart.

    See also

    ListTrig2

    Dbufrd

    DemandEnvGen

    Logger

    ListTrig

  8. object Logger extends Serializable

    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.

    Examples
    // fill buffer and plot on client side
    val b = Buffer(s)
    b.alloc(100)
    
    val x = play {
      val z = LFCub.kr(10) * EnvGen.kr(Env.linen(1, 2, 1), doneAction = freeSelf)
      Logger.kr(b.id, z, Impulse.kr(49), reset = 0)
    }
    
    // after synth has completed:
    b.getData(num = 100).foreach(_.plot())
    
    x.free(); b.free()
    Note

    The argument order is different from its sclang counterpart.

    See also

    ListTrig

Inherited from AnyRef

Inherited from Any

Ungrouped