Packages

final case class TGrains(numChannels: Int, trig: GE, buf: GE, speed: GE = 1.0f, centerPos: GE = 0.0f, dur: GE = 0.1f, pan: GE = 0.0f, amp: GE = 0.1f, interp: GE = 4) extends MultiOut with AudioRated with IsIndividual with Product with Serializable

Triggers generate grains from a buffer. Each grain has a Hanning envelope

(sin2(x) for x from 0 to pi)

and is panned between two channels of multiple outputs. Warning: Due to a bug (SC 3.6.6), this UGen does not work with LocalBuf but requires a regular buffer.

numChannels

Number of output channels.

trig

At each trigger, the following arguments are sampled and used as the arguments of a new grain. A trigger occurs when a signal changes from non-positive to positive value. If the trigger is audio rate then the grains will start with sample accuracy.

buf

The buffer index. It must be a one channel (mono) buffer.

speed

1.0 is normal, 2.0 is one octave up, 0.5 is one octave down -1.0 is backwards normal rate etc.

centerPos

The position in the buffer in seconds at which the grain envelope will reach maximum amplitude.

dur

Duration of the grain in seconds.

pan

A value from -1 to 1. Determines where to pan the output in the same manner as PanAz.

amp

Amplitude of the grain.

interp

1, 2, or 4. Determines whether the grain uses (1) no interpolation, (2) linear interpolation, or (4) cubic interpolation.

See also

GrainBuf

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TGrains
  2. Serializable
  3. IsIndividual
  4. AudioRated
  5. MultiOut
  6. SomeOut
  7. Lazy
  8. GE
  9. UGenSource
  10. Expander
  11. Lazy
  12. Product
  13. Equals
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TGrains(numChannels: Int, trig: GE, buf: GE, speed: GE = 1.0f, centerPos: GE = 0.0f, dur: GE = 0.1f, pan: GE = 0.0f, amp: GE = 0.1f, interp: GE = 4)

    numChannels

    Number of output channels.

    trig

    At each trigger, the following arguments are sampled and used as the arguments of a new grain. A trigger occurs when a signal changes from non-positive to positive value. If the trigger is audio rate then the grains will start with sample accuracy.

    buf

    The buffer index. It must be a one channel (mono) buffer.

    speed

    1.0 is normal, 2.0 is one octave up, 0.5 is one octave down -1.0 is backwards normal rate etc.

    centerPos

    The position in the buffer in seconds at which the grain envelope will reach maximum amplitude.

    dur

    Duration of the grain in seconds.

    pan

    A value from -1 to 1. Determines where to pan the output in the same manner as PanAz.

    amp

    Amplitude of the grain.

    interp

    1, 2, or 4. Determines whether the grain uses (1) no interpolation, (2) linear interpolation, or (4) cubic interpolation.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val amp: GE
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val buf: GE
  7. val centerPos: GE
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. val dur: GE
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. lazy val hashCode: Int
    Definition Classes
    UGenSource → AnyRef → Any
  13. val interp: GE
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def makeUGen(_args: Vec[UGenIn]): UGenInLike
    Attributes
    protected
    Definition Classes
    TGrainsUGenSource
  16. def makeUGens: UGenInLike

    Abstract method which must be implemented by creating the actual UGens during expansion.

    Abstract method which must be implemented by creating the actual UGens during expansion. This method is at most called once during graph expansion

    returns

    the expanded object (depending on the type parameter U)

    Attributes
    protected
    Definition Classes
    TGrainsExpander
  17. final def name: String
    Definition Classes
    UGenSource
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. val numChannels: Int
  22. val pan: GE
  23. def productElementNames: Iterator[String]
    Definition Classes
    Product
  24. final def rate: Rate
    Definition Classes
    AudioRated
  25. val speed: GE
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. val trig: GE
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from IsIndividual

Inherited from AudioRated

Inherited from MultiOut

Inherited from SomeOut

Inherited from GE.Lazy

Inherited from GE

Inherited from UGenSource[UGenInLike]

Inherited from Expander[UGenInLike]

Inherited from Lazy

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped