This generates an audio waveform from scratch by combing different waves that have been generated using d3's easing functions. 'Elastic' is created using d3.easeElasticIn(), 'sine' uses d3.easeSinInOut(), 'triangle' uses d3.easeLinear(), and 'square' is generated using Math.round(). Moving the mouse causes the ratio of each wave to change, effecting the timbre.
For more Web Audio fun, check out:
https://d3js.org/d3.v4.min.js