Buffer

final case class Buffer(server: Server, id: Int) extends ModelImpl[BufferInfo]
Companion
object
trait Serializable
trait Product
trait Equals
trait ModelImpl[BufferInfo]
trait Model[BufferInfo]
class Object
trait Matchable
class Any

Value members

Concrete methods

def allocMsg(numFrames: Int, numChannels: Int, completion: Optional[Packet]): BufferAlloc
def allocReadChannelMsg(path: String, startFrame: Int, numFrames: Int, channels: Seq[Int], completion: Optional[Packet]): BufferAllocReadChannel
def allocReadMsg(path: String, startFrame: Int, numFrames: Int, completion: Optional[Packet]): BufferAllocRead
def chebyMsg(amps: Seq[Float], normalize: Boolean, wavetable: Boolean, clear: Boolean): BufferGen

OSC message for filling this buffer with a series of Chebyshev polynomials. The formula of these polynomials is

OSC message for filling this buffer with a series of Chebyshev polynomials. The formula of these polynomials is

cheby(n) = amplitude  * cos(n * acos(x))

To eliminate a DC offset when used as a wave-shaper, the wavetable is offset so that the center value is zero.

Value Params
amps

amplitudes for the harmonics. amplitudes for the harmonics. The first value specifies the amplitude for n = 1, the second float value specifies the amplitude for n = 2, and so on.

clear

if set, the previous content is erased, otherwise the new waveform is added to the existing content

normalize

if set, the peak amplitude of the generated waveform is normalized to 1.0

wavetable

if set, the format of the waveform is chosen to be usable by specific UGens such as such as Shaper or Osc

def closeMsg(completion: Optional[Packet]): BufferClose
def cueMsg(path: String, startFrame: Int, completion: Optional[Packet]): BufferRead
def fillMsg(value: Float): BufferFill
def fillMsg(ranges: FillRange*): BufferFill
def freeMsg(completion: Optional[Packet], release: Boolean): BufferFree
Value Params
release

whether the buffer id should be immediately returned to the id-allocator or not. if you build a system that monitors when bundles are really sent to the server, and you need to deal with transaction abortion, you might want to pass in false here, and manually release the id, using the release method

def genMsg(command: Command): BufferGen
def getMsg(indices: Int*): BufferGet
def getnMsg(ranges: Range*): BufferGetn
def numChannels: Int

The number of channels allocated for this buffer, or -1 if the buffer was not allocated or its number of channels is not yet known.

The number of channels allocated for this buffer, or -1 if the buffer was not allocated or its number of channels is not yet known.

def numFrames: Int

The number of frames allocated for this buffer, or -1 if the buffer was not allocated or its number of frames is not yet known.

The number of frames allocated for this buffer, or -1 if the buffer was not allocated or its number of frames is not yet known.

def readChannelMsg(path: String, fileStartFrame: Int, numFrames: Int, bufStartFrame: Int, leaveOpen: Boolean, channels: Seq[Int], completion: Optional[Packet]): BufferReadChannel
def readMsg(path: String, fileStartFrame: Int, numFrames: Int, bufStartFrame: Int, leaveOpen: Boolean, completion: Optional[Packet]): BufferRead
def register(): Unit

Adds this buffer to the server's buffer manager so that its information fields will be tracked and updated.

Adds this buffer to the server's buffer manager so that its information fields will be tracked and updated.

It is safe to call this method more than once.

def release(): Unit

Releases the buffer id to the id-allocator pool, without sending any OSC message. Use with great care.

Releases the buffer id to the id-allocator pool, without sending any OSC message. Use with great care.

def sampleRate: Float

The sample-rate for this buffer, or 0 if the buffer was not allocated or its sample-rate is not yet known.

The sample-rate for this buffer, or 0 if the buffer was not allocated or its sample-rate is not yet known.

def setMsg(pairs: FillValue*): BufferSet
def setnMsg(values: IndexedSeq[Float]): BufferSetn
def setnMsg(pairs: (Int, IndexedSeq[Float])*): BufferSetn
def sine1Msg(partials: Seq[Float], normalize: Boolean, wavetable: Boolean, clear: Boolean): BufferGen

OSC message for filling this buffer with a series of sine wave harmonics using specified amplitudes.

OSC message for filling this buffer with a series of sine wave harmonics using specified amplitudes.

Value Params
clear

if set, the previous content is erased, otherwise the new waveform is added to the existing content

normalize

if set, the peak amplitude of the generated waveform is normalized to 1.0

partials

amplitudes for the harmonics. The first value specifies the amplitude of the first partial, the second float value specifies the amplitude of the second partial, and so on.

wavetable

if set, the format of the waveform is chosen to be usable by interpolating oscillators such as Osc or VOsc

def sine2Msg(partials: Seq[(Float, Float)], normalize: Boolean, wavetable: Boolean, clear: Boolean): BufferGen

OSC message for filling this buffer with a series of sine waves using specified frequencies and amplitudes.

OSC message for filling this buffer with a series of sine waves using specified frequencies and amplitudes.

Value Params
clear

if set, the previous content is erased, otherwise the new waveform is added to the existing content

normalize

if set, the peak amplitude of the generated waveform is normalized to 1.0

partials

pairs of frequencies and amplitudes for the partials. Frequencies are given as in cycles per buffer.

wavetable

if set, the format of the waveform is chosen to be usable by interpolating oscillators such as Osc or VOsc

def sine3Msg(partials: Seq[(Float, Float, Float)], normalize: Boolean, wavetable: Boolean, clear: Boolean): BufferGen

OSC message for filling this buffer with a series of sine waves using specified frequencies, amplitudes, and phases.

OSC message for filling this buffer with a series of sine waves using specified frequencies, amplitudes, and phases.

Value Params
clear

if set, the previous content is erased, otherwise the new waveform is added to the existing content

normalize

if set, the peak amplitude of the generated waveform is normalized to 1.0

partials

triplets of frequencies, amplitudes and initial phases for the partials. Frequencies are given as in cycles per buffer. Phases are given in radians.

wavetable

if set, the format of the waveform is chosen to be usable by interpolating oscillators such as Osc or VOsc

override def toString: String
Definition Classes
Any
def writeMsg(path: String, fileType: AudioFileType, sampleFormat: SampleFormat, numFrames: Int, startFrame: Int, leaveOpen: Boolean, completion: Optional[Packet]): BufferWrite
def zeroMsg(completion: Optional[Packet]): BufferZero

Inherited methods

def addListener(pf: Listener[BufferInfo]): pf
Inherited from
ModelImpl
final protected def dispatch(update: BufferInfo): Unit

Synchronously dispatches an update to all currently registered listeners. Non fatal exceptions are caught on a per-listener basis without stopping the dispatch.

Synchronously dispatches an update to all currently registered listeners. Non fatal exceptions are caught on a per-listener basis without stopping the dispatch.

Inherited from
ModelImpl
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
protected def releaseListeners(): Unit

Removes all listeners. This is useful when disposing the model, to remove any unnecessary references.

Removes all listeners. This is useful when disposing the model, to remove any unnecessary references.

Inherited from
ModelImpl
def removeListener(pf: Listener[BufferInfo]): Unit
Inherited from
ModelImpl
protected def startListening(): Unit

Subclasses can override this to issue particular actions when the first listener has been registered

Subclasses can override this to issue particular actions when the first listener has been registered

Inherited from
ModelImpl
protected def stopListening(): Unit

Subclasses can override this to issue particular actions when the last listener has been unregistered

Subclasses can override this to issue particular actions when the last listener has been unregistered

Inherited from
ModelImpl