Audio visualizer in Javascript using Canvas and Web Audio API