Class/Object

de.sciss.synth.ugen

PlayBuf

Related Docs: object PlayBuf | package ugen

Permalink

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

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

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

Instance Constructors

  1. new PlayBuf(rate: Rate, numChannels: Int, buf: GE, speed: GE = 1.0f, trig: GE = 1, offset: GE = 0.0f, loop: GE = 1, doneAction: GE = doNothing)

    Permalink

    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.

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val buf: GE

    Permalink

    the identifier of the buffer to use

  6. def clone(): AnyRef

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

    Permalink

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

    what to do when the play head reaches the buffer end. This is only effective when loop is zero.

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

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    Any
  12. val loop: GE

    Permalink

    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.

  13. def makeUGens: UGenInLike

    Permalink

    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
    PlayBufExpander
  14. final def name: String

    Permalink
    Definition Classes
    UGenSource
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val numChannels: Int

    Permalink

    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.

  19. val offset: GE

    Permalink

    sample frame to start playback.

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

  20. val rate: Rate

    Permalink
    Definition Classes
    PlayBufGE
  21. val speed: GE

    Permalink

    1 advances the play head by the server's sample rate each second.

    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.

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

    Permalink
    Definition Classes
    AnyRef
  23. val trig: GE

    Permalink

    a trigger which causes a jump to the given offset .

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

  24. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

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 Expander[UGenInLike]

Inherited from Lazy

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped