BufEnvir:
Filter:
JITLibExtensions/Classes (extension) | Live Coding

BufEnvir
ExtensionExtension

referentially transparent buffer environment

Description

an environment for keeping buffers by name.

Class Methods

.new

return a new instance. server has to be running.

Instance Methods

.put

put an object into the environment that can be converted to buffer values. The buffer on the server is updated immediately, the buffer number is kept. Currently supported are Arrays and Nil (nil deallocates the buffer).

.at

return the buffer at a certain key. If none exist, allocate a buffer number.

.putAll

put the objects into the environment at the given keys.

.putSeries

put a series of objects in the bufenvir. to be tested.

.atAll

.getAll

return the buffers at the given keys. If none exist, allocate buffer numbers.

.alloc

allocate a buffer at the given key. If a bufnum exists for that key, it is kept.

.read

.cue

read or cue a file to buffer

.readAll

.cueAll

reads or cues all files within a given path. The key is the difference between commonPath and filePath, e.g. if the common path is "/sounds/" and the file is "/sounds/samp1.aif", the key will be 'samp1'.

.fft

create a buffer for FFT use.

.fftsize

get and set the default size for fft buffers

.zero

overwrite the buffer at key with zeroes.

.bufnum

return the buffer number at the given key

.bufDur

return the duration of the buffer at the given key

.bufFrames

return the numFrames of the buffer at the given key

.bufFrames

return the numFrames of the buffer at the given key

.rateScale

return the rateScale factor of the buffer at the given key

.server

the server on which the buffers live

.clear

clear all buffers.

.doWithUpdate

eval function with buffer at key and call updateInfo on buffer.

.playBuf

return a PlayBuf ugen wired up for the buffer at key.

.rec

return a RecordBuf ugen wired up for the buffer at key.

Examples