The PolyBuffer Object
The PolyBuffer object in JS is a companion to the polybuffer~ object you create in a Max patcher. It provides the ability to access a group of buffer~ objects associated with a name.
PolyBuffer Constructor
var d = new PolyBuffer("name")
If no name is provided as an argument then instantiation will fail.
PolyBuffer Properties Overview
The following properties mirror the attributes of the same name from the Max polybuffer~ object. See the polybuffer~ reference for more details.
Polybuffer Properties
name [symbol]
count [symbol]
size [Number]
PolyBuffer Methods Overview
The following methods mirror the messages of the same name from the Max polybuffer~ object. See the polybuffer~ reference for more details.
Polybuffer Methods
open
wclose
readfolder
Arguments
writefolder
Arguments
append
Arguments
appendempty
Arguments
channels [Number]
clear
send
Arguments
message [Anything]
Unique Polybuffer Methods
dump
Return an array containing index, name, path, duration, channel, and sample rate.
getshortname
Arguments
Return an array containing names of the buffer~ objects and file names.
getbufferlist
Arguments
Return an array containing names of all the buffer~ objects.
Examples
Example code can be found in the "JavaScript" tab of the polybuffer~ help patcher.
See Also
Name | Description |
---|---|
JavaScript Usage | JavaScript Usage |