jit.buffer~ A matrix-friendly MSP buffer~

Use jit.buffer~ to access buffer~ data in matrix form or write matrix data into a buffer~. Audio is represented in a float32 matrix with time across dim[0]. Multi-channel audio uses a separate plane for each channel. The object arguments are the same as those for the buffer~ object. jit.buffer~ responds to all the same messages as buffer~.

Arguments:
buffer_name
The name of the buffer~ to access
filename
Optional filename to read
length
Optional length in milliseconds
channels
Optional number of channels (default=1)

Attributes:
Name Type Description
channels int The number of channels
frames int The number of frames in the buffer~
inputstart float An input matrix will be written to the buffer~ starting at this position in milliseconds
inputfirst int An input matrix will be written to the buffer~ starting at this frame
outputfirst int Frame at which to start collecting data from the buffer~ for an output matrix
outputlast int Frame at which to finish collecting data from the buffer~ for an output matrix
outputstart float The position in milliseconds to start collecting data from the buffer~ for an output matrix
outputlength int The length in milliseconds of the output matrix collected from the buffer~
vizmode int A value of 1 turns on opaque rendering mode. A value of 2 turns on statistical rendering mode, which has greater detail but is more expensive to render. A value of 0 turns off visualization and all background processing of cached speedup data. (default=0)
vizmemoryratio float Specifies the size of the data cache used to speed up rendering of the visualization matrix as a fraction of the data size of the buffer~ (deault=0.5)
vizchecktime int How often in milliseconds the visualization engine should check the status of the buffer~ and re-render the cache if necessary (default=250)
vizwidth int The width of the visualization output matrix (default=320)
vizheight int The height of the visualization output matrix (default=160)
vizstart float The position in milliseconds to start the render of the visualization output matrix
vizlength float The length in milliseconds to render for the visualization output matrix
vizfirst int Frame at which to start render of the visualization output matrix
vizlast int Frame at which to end render of the visualization output matrix

Messages:
matrix
Data from the matrix will be written into the buffer~ at the position specified by the inputstart or inputfirst attributes.

output
A float32 matrix containing the range of the buffer~ specified by the outputstart, outputlength, outputfirst and outputlast attributes will be output out the left outlet.

viz
Outputs a visualization matrix from the second outlet. In opaque mode the matrix will be of type char and in statistical mode the matrix will be of type float32. In both modes each channel of audio results is mapped to a separate plane of the matrix.

getlength
Outputs the length of the buffer~ in milliseconds.

Example:

See Also:
jit.catch~, jit.graph, jit.peek~, jit.poke~, jit.release~, peek~, poke~