de.sciss.synth.ugen

PlayBuf

final case class PlayBuf(rate: Rate, numChannels: Int, buf: GE, speed: GE = synth.this.GE.const(1.0), trig: GE = synth.this.GE.const(1), startPos: GE = synth.this.GE.const(0.0), loop: GE = synth.this.GE.const(1), doneAction: GE = ...) extends MultiOut with HasSideEffect with IsIndividual with HasDoneFlag with Product with Serializable

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.0 advances the play head by the server's sample rate each second, so 2.0 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 startPos. A trigger occurs when a signal changes from non-positive to positive (e.g. <= 0 to > 0).

startPos

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.

See also

de.sciss.synth.ugen.BufFrames

de.sciss.synth.ugen.BufRateScale

de.sciss.synth.ugen.Done

de.sciss.synth.DoneAction

de.sciss.synth.ugen.RecordBuf

de.sciss.synth.ugen.DiskIn

de.sciss.synth.ugen.BufRd

Linear Supertypes
HasDoneFlag, IsIndividual, HasSideEffect, MultiOut, SomeOut, GE.Lazy, GE, UGenSource[UGenInLike], Product, Equals, Expander[UGenInLike], Lazy, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PlayBuf
  2. HasDoneFlag
  3. IsIndividual
  4. HasSideEffect
  5. MultiOut
  6. SomeOut
  7. Lazy
  8. GE
  9. UGenSource
  10. Product
  11. Equals
  12. Expander
  13. Lazy
  14. Serializable
  15. Serializable
  16. AnyRef
  17. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PlayBuf(rate: Rate, numChannels: Int, buf: GE, speed: GE = synth.this.GE.const(1.0), trig: GE = synth.this.GE.const(1), startPos: GE = synth.this.GE.const(0.0), loop: GE = synth.this.GE.const(1), doneAction: GE = ...)

    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.0 advances the play head by the server's sample rate each second, so 2.0 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 startPos. A trigger occurs when a signal changes from non-positive to positive (e.g. <= 0 to > 0).

    startPos

    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.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val buf: GE

    the identifier of the buffer to use

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. val doneAction: GE

    what to do when the play head reaches the buffer end.

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. val loop: GE

    1 to loop after the play head reaches the buffer end, 0 to not loop.

    1 to loop after the play head reaches the buffer end, 0 to not loop. this can be modulated.

  15. def makeUGen(_args: IndexedSeq[UGenIn]): UGenInLike

    Attributes
    protected
    Definition Classes
    PlayBuf → UGenSource
  16. def makeUGens: UGenInLike

    Attributes
    protected
    Definition Classes
    PlayBuf → Expander
  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
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. val numChannels: Int

    the number of channels that the buffer will be.

    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.

  22. val rate: Rate

    Definition Classes
    PlayBuf → GE
  23. final def rewrap(args: IndexedSeq[UGenInLike], exp: Int): UGenInLike

    Attributes
    protected
    Definition Classes
    SomeOut → UGenSource
  24. val speed: GE

    1.

    1.0 advances the play head by the server's sample rate each second, so 2.0 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.

  25. val startPos: GE

    sample frame to start playback.

    sample frame to start playback. This is read when a trigger occurs. It may be fractional.

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. val trig: GE

    a trigger which causes a jump to the given startPos.

    a trigger which causes a jump to the given startPos. A trigger occurs when a signal changes from non-positive to positive (e.g. <= 0 to > 0).

  28. final def unwrap(args: IndexedSeq[UGenInLike]): UGenInLike

    Attributes
    protected
    Definition Classes
    UGenSource
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from HasDoneFlag

Inherited from IsIndividual

Inherited from HasSideEffect

Inherited from MultiOut

Inherited from SomeOut

Inherited from GE.Lazy

Inherited from GE

Inherited from UGenSource[UGenInLike]

Inherited from Product

Inherited from Equals

Inherited from Expander[UGenInLike]

Inherited from Lazy

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped