Spectrograph
A spectrograph web audio component
Install / Use
/learn @web-audio-components/SpectrographREADME
Spectrograph
A spectrograph web audio component

Installation
$ component install web-audio-components/spectrograph
Example Usage
var context = new (AudioContext || webkitAudioContext)()
, buffer = context.createBufferSource()
, Spectrograph = require("spectrograph")
, spec = new Spectrograph(context, {
canvas: canvasEl
});
// Once the source has a buffer, it's routed through the spectrograph
buffer.connect(spec);
spec.connect(context.destination);
For further examples, see the example.
API
Spectrograph(context, options)
Instantiate a Spectrograph module. Expects an AudioContext as the first parameter.
Options
speedNumber in milliseconds on how often it should render out the spectrogramrangeUpper bound of frequency rendered (default:11500)minHHue of the minimum amplitude valueminSSaturation of the minimum amplitude valueminLLightness of the minimum amplitude valuemaxHHue of the maximum amplitude valuemaxSSaturation of the maximum amplitude valuemaxLLightness of the maximum amplitude value
.connect(node)
Connect a Spectrograph module to an AudioNode.
.disconnect()
Disconnect all outgoing connections from a Spectrograph module.
License
MIT License, Copyright (c) 2013 Jordan Santell
