Using the power of the Audio API to show how to mix and mash audio files together to create interactions between the audio and elements within the page.
Web Audio API – included in HTML5 media set. Currently in editorial draft with the W3C. Support is not great, but it is emerging technology so let’s hold out for it.
At the base of the API is the audio context, which is currently webkit prefixed (yey). You can load audio a few ways; it depends what you are loading – long or short soundtracks.
(The demo gods strike! No audio coming through!)
You can pass your audio signal to things like gain. Create a gain node; then you have access to change the gain value. gain_node.gain.value = 0.5;
Compression: compressors can take different sources and normalises the volume.
Filters allow you filter out frequencies based on filter type – there are 8 in the API. First in the default is Lowpass, which lets you get a bassier audio track. Highpass brings out treble. Panning controls the direction/position.
(DEMO GODS!! Panning not working… friendly sound guy helps out ;))
Finally – frequency analysis, which gets data which can be rendered as waveforms and so on. But use this wisely! Do not play audio when your website loads!