简体   繁体   English

Javascript-获取声音数据

[英]Javascript - Get Sound Data

I'm wondering if any new HTML5 functions or existing JS library would allow me to access information about the sound that's currently playing in an Audio object. 我想知道是否有任何新的HTML5函数或现有的JS库允许我访问有关Audio对象中当前正在播放的声音的信息。 For example, I'd like to be able to access an array of ranges the a song is currently playing at (that is, low values appear for deep bass sounds and higher values appear for shriller sounds). 例如,我希望能够访问一首歌曲当前正在播放的一系列范围(即,低沉的低音出现较低的值,而尖锐的声音出现较高的值)。 I'm not a sound engineer, so I'm not quite sure what the correct terminology is. 我不是声音工程师,所以我不太确定正确的术语是什么。

A comparable library would be the C++ BASS library ( http://www.un4seen.com/ ), although I certainly don't need the same breadth of functionality. 一个可比的库将是C ++ BASS库( http://www.un4seen.com/ ),尽管我当然不需要相同的功能范围。

I did a little more digging around and found this: chromium.googlecode.com/svn/trunk/samples/audio/visualizer-gl.html It's pretty much what I'm looking for, but I can't figure out how it works. 我做了一些进一步的挖掘,发现了这一点: chromium.googlecode.com/svn/trunk/samples/audio/visualizer-gl.html这正是我所寻找的,但是我不知道它是如何工作的。 Thoughts? 有什么想法吗?

These are the two options available at the moment, and they're not compatible with each other. 这是目前可用的两个选项,它们彼此不兼容。 Eventually an agreement will be reached. 最终将达成协议。

If you intend to do something cross-browser, you're condemned to using Flash for now, there is a pretty good library called SoundManager2 that gives you the necessary data. 如果您打算做跨浏览器的工作,那么现在就应该使用Flash,这里有一个很好的库,称为SoundManager2 ,可以为您提供必要的数据。 Check out their visualization demos . 查看他们的可视化演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM