bopper
A streaming clock source for scheduling Web Audio events rhythmically.
Use with ditty if you want to create loop sequences.
Install
$ npm install bopper
Require into your browser bundle with browserify.
Example
var audioContext = var bopper = audioContext // save a reference on the window to avoid garbage collectionwindowscheduler = bopper var playback = position: 0 length: 01 position: 1 length: 01 position: 2 length: 01 position: 3 length: 01 position: 35 length: 01 position: 4 length: 01 position: 5 length: 01 position: 6 length: 01 position: 7 length: 01 position: 7+1/3 length: 01 position: 7+2/3 length: 01 // emits data roughly every 20ms bopper { var oscillator = audioContext oscillator oscillatorstartat oscillator} bopperbopperstart
To run the example npm install -g beefy
then beefy example.js
and navigate to http://localhost:9966/