Tone.Buffers
↳ EXTENDS ToneA data structure for holding multiple buffers.
CONSTRUCTOR
new Tone.Buffers (urls
, [ callback
]
)
urls
An object literal or array of urls to load.
type:
Object
or
Array
callback
The callback to invoke when the buffers are loaded.
type:
function
optional
DEFAULTS
{
onload
:
Tone.noOp
,
baseUrl
:
}
EXAMPLE
EXAMPLE
Members
Methods
.add ( )
#
name
A unique name to give the buffer
type:
String
url
Either the url of the bufer, or a buffer which will be added with the given name.
type:
String
or
Tone.Buffer
or
Audiobuffer
callback
The callback to invoke when the url is loaded.
type:
function
optional
Add a buffer by name and url to the Buffers
.get ( )
#
name
The key or index of the buffer.
type:
String
or
Number
↪ returns
Tone.Buffer
Get a buffer by name. If an array was loaded, then use the array index.