Mini Audio Viz
October 2017
A frequency visualizer that works with any local audio file - the audio file must be called "3" instead of "something.mp3" (golfed during #golfctober 2017)
- Github
- Demo
<canvas id=c><audio src=3 onplay="with(new AudioContext)with(createMediaElementSource(this))connect(destination),connect(A=createAnalyser());setInterval('A.getByteFrequencyData(D=new Uint8Array(c.width^=0));D.map((v,i)=>c.getContext`2d`.fillRect(i,150,1,-v/2))',9)"autoplay>
(I added this button because browsers started blocking autoplay by default in 2019)