RecordBuf

object RecordBuf extends ProductReader[RecordBuf]

Records input into a Buffer. If recLevel is 1.0 and preLevel is 0.0 then the new input overwrites the old data. If they are both 1.0 then the new data is added to the existing data. (Any other settings are also valid.)

===Examples===

// record and replay
// a four second mono buffer
val b = Buffer.alloc(s, s.sampleRate.toInt * 4)

// record for four seconds
play {
 val sig = Formant.ar(XLine.kr(400, 1000, 4), 2000, 800) * 0.125
 RecordBuf.ar(sig, b.id, doneAction = freeSelf, loop = 0)
}

// play it back
play {
 PlayBuf.ar(1, b.id, doneAction = freeSelf, loop = 0)
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[RecordBuf]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def ar(in: GE, buf: GE, offset: GE, recLevel: GE, preLevel: GE, run: GE, loop: GE, trig: GE, doneAction: GE): RecordBuf
Value Params
buf

the identifier of the buffer to use

doneAction

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

in

the signal to record

loop

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

offset

sample frame to begin writing from. This is read when a trigger occurs.

preLevel

value by which the previous buffer contents is multiplied when recording. If this value is zero, the buffer contents is completely overwritten. If this value is one, the new signal is added to the previous content.

recLevel

value to multiply by input before mixing with existing data.

run

if zero the recording pauses, otherwise it resumes. The value of run is only read at control-rate! When the recording is paused, the "write-head" remains in its current position and does not advance.

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

def kr(in: GE, buf: GE, offset: GE, recLevel: GE, preLevel: GE, run: GE, loop: GE, trig: GE, doneAction: GE): RecordBuf
Value Params
buf

the identifier of the buffer to use

doneAction

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

in

the signal to record

loop

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

offset

sample frame to begin writing from. This is read when a trigger occurs.

preLevel

value by which the previous buffer contents is multiplied when recording. If this value is zero, the buffer contents is completely overwritten. If this value is one, the new signal is added to the previous content.

recLevel

value to multiply by input before mixing with existing data.

run

if zero the recording pauses, otherwise it resumes. The value of run is only read at control-rate! When the recording is paused, the "write-head" remains in its current position and does not advance.

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

def read(in: RefMapIn, key: String, arity: Int): RecordBuf