Adapter.js
View the source. Included by default.
This script is required for TinyRave tracks to play. A "Track" is just Adapter.js + your track source, injected into a sandboxed web worker.
Adapter.js enables communication between the web worker and TinyRave.com
Constants
BUFFER_SIZEthe number of samples, per channel, we generate for each frame of audio.SAMPLE_RATEthe number of samples, per channel, to collect for 1 second of audio.TWO_PIdefined as2 * Math.PI, shockingly.
Polyfills
Function.isFunction(obj)
Arguments
An object to test.
Returns
True if obj looks like a function. False otherwise.
Array.isArray(obj)
Arguments
An object to test.
Returns
True if obj looks like an array. False otherwise.
arrayInstance.fill(value)
Arguments
Any value to assign to every slot in the array.
Returns
The array. Runs in-place.
Global Functions
require(libraryPath)
A wrapper around importScripts() that guards against repeat imports. importScripts() acts like include in PHP, or #include in C, which interpret scripts in place, sharing the global scope.
Arguments
Library path. Required. String.
Usage
require('v1/instruments');