JavaScript 音频频谱分析仪
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11041128/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JavaScript Audio Spectrum Analyzer
提问by lomas09
Is there a JavaScript equivalent to ActionScript's channel.leftPeak
or channel.rightPeak
. This is used for sound programming such as for a VU meter. I am trying to build a sound application, but I was avoiding using Flash and ActionScript since it is for a website. I was wondering if it was possible to do it in JavaScript. The basic concept is just play a song and be able to see the visualization of it through the spectrum analyzer or VU Meter.
是否有与 ActionScriptchannel.leftPeak
或channel.rightPeak
. 这用于声音编程,例如 VU 表。我正在尝试构建一个声音应用程序,但我避免使用 Flash 和 ActionScript,因为它是用于网站的。我想知道是否可以在 JavaScript 中做到这一点。基本概念是播放一首歌曲,并能够通过频谱分析仪或 VU 表看到它的可视化。
回答by arttronics
What you need, based on your question, is JavaScript SoundManager2plugin.
根据您的问题,您需要的是JavaScript SoundManager2插件。
The demo page for the Spectrum Analyzer / VU Metervisuals are HERE
Spectrum Analyzer / VU Meter视觉效果的演示页面在这里
Screenshot:
截屏:
Edit:Also consider wavesurfer.jsfeaturing "Seekable waveform using WebAudio and Canvas".
编辑:还可以考虑wavesurfer.js,其特色是“使用 WebAudio 和 Canvas 的可搜索波形”。