A small javascript plugin to create an oscilloscope of an audio-context. You can see an example here
bower install oscilloscope.js // Create an audio-contextvaraudioContext=newwindow.AudioContext(),oscillator=audioContext.createOscillator();oscillator.type='sine';oscillator.frequency.value=400;oscillator.start();// Create an Oscilloscope instance// Parameters:// - The container in which the oschilloscope gets created// - an optional audio-context on which the oscilloscope creates an analyser-node,// and can connect to the destination.// If no audio-context is specified, a new one will be created created.varoscilloscope=newOscilloscope('.js-oscilloscope',audioContext);// Connect the oscillator-node to the oscilloscopeoscillator.connect(oscilloscope.analyserNode);// Start the oscilloscopeoscilloscope.start();Oscilloscope.target// ContainerOscilloscope.width// The oscilloscope' widthOscilloscope.height// The oscilloscope' heightOscilloscope.svg// The svg-element in which we draw the oscilloscopeOscilloscope.wave// The path svg-element which represents the audio waveOscilloscope.audioContext// The oscilloscope' audio-contextOscilloscope.running// Indicates if the oscilloscope is runningOscilloscope.hasAudio// Indicates if the oscilloscope is connected to the audio-context' destination/** * Start the oscilloscope */Oscilloscope.start();/** * Stop the oscilloscope */Oscilloscope.stop();/** * Connect the analyser-node to another audio-node * @param{audioNode} node An audio-node to connect to */Oscilloscope.connect(audioNode);/** * Connect the analyser-node to the audio-context' destination */Oscilloscope.toggleAudio();Oscilloscope.js is licensed under the MIT license.