Harness the power of #Web #Audio

Posted on April 20th, 2016

Titus Blair @Dolby demonstrated the importance of sound in the mood and usability of a web page. He then showed the audience how to incorporate higher quality audio into a web site.

He first showed a video of a beach scene. Different audio tracks changed the mood from excitement to mystery to romantic to suspenseful to tropical.

By sending a wav file to the Dolby development site one creates a high quality audio file in mp4 format which can be downloaded and played through selected browser (currently including Echo and Safari).

Titus then showed two examples, a #video game and a frequency spectrum display, and walked the audience through the code needed to play audio file.

A #Javascript file, dolby.min.js, needs to be sourced (available on github)

Web code needs to test if the browser can handle the Dolby digital plus file

Parameters in the backgroundSound variable adjust the playback rate and other qualities

To get frequency spectrum, an audiocontext variable does an fft which can be plotted