hughsk/web-audio-analyser ? reverse-engineered prompt
Reverse engineered prompt
Build me a small JavaScript library that takes an audio source and gives back live waveform and frequency data from it.
It should work with an audio element, a MediaStream from the microphone, or any audio source node, and it should let me choose whether the audio plays while it is being analyzed. If I want, it should also support stereo output so I can read left and right channels separately.
I also want a simple demo page so I can load audio and see the data update in real time. The library should expose easy methods for getting the current waveform data and frequency data as reusable arrays, so I can call them in an animation loop without creating new objects every time.
If you need to check current Web Audio API docs or browser details online, go ahead and do that.
Are you gonna build this?
make sure you review the code using coderabbit