adamrenklint / bap

A toolkit for making beats and composing sequences with Javascript and Web Audio
MIT License
115 stars 6 forks source link

Allow setPeriodicWave on Oscillator with "custom" shape #53

Open adamrenklint opened 8 years ago

adamrenklint commented 8 years ago

Currently the "custom" shape on Oscillators is pretty useless, since a new Oscillator is created for each note playback in lib/Oscillator#_source and there is no place to hook in to call setPeriodicWave on the actual oscillator node.

So there needs to be some kind of hook there, allowing an Oscillator class instance to define a callback to generate the periodic wave, if the shape is custom.