The Buffer Object
var buf = new Buffer("name")
The name is required at the time the object is created.
The following methods relate to the functionality from the Max buffer~, info~, peak~, and poke~, objects. Please see the references for those objects for details.
Return the number of channels in the buffer~ object.
Return the number of frames (samples in a single channel) in the buffer~ object.
Return the length of the buffer~ object in milliseconds.
Return an array withsamples from (1-based counting) starting at (zero-based counting).
Write into the buffer~ object at (1-based counting) and (0-based counting). Samples may be a single sample value or an array of sample values. It is computationally more efficient to use an array).
Send a message to the associated buffer~ object. Can send any message that buffer~ understands.
Example code can be found in the "js" tab of the buffer~ help patcher.