WAVES.JS
Loaders
Loaders
AudioBuffer loader and other loader utilities module.
# to use as a standalone module
$ npm install ircam-rnd/loaders
Example usage
Loader
.constructor (responseType:String) : Loader
responseType
default “” equal “text”, possible values: “arraybuffer”, “blob”, “document” or “json”
.load (url:String|String[]) : Promise
Method for a promise based file loading.
The url
(s) of the files to load. Accepts a url
pointing to the file location or an array of url
s.
AudioBufferLoader
.constructor () : AudioBufferLoader
.load (url:String|String[], options:Object) : Promise
Method for promise audio file loading and decoding.
The url
s of the audio files to load. Accepts a url
pointing to the file location or an array of URLs.
options: {{wrapAroundExtension: number}} - Object with a wrapAroundExtension key which set the length, in seconds to be copied from the begining at the end of the returned AudioBuffer(s)
SuperLoader
.constructor () : SuperLoader
.load (url:String|String[], options:Object) : Promise
Method for promise audio and json file loading (and decoding for audio).
The url
(s) of the files to load. Accepts a url
pointing to the file location or an array of URLs.
options: {{wrapAroundExtension: number}} [options] - Object with a wrapAroundExtension key which set the length, in seconds to be copied from the begining at the end of the returned AudioBuffer