javascript中是否有类似于Java中的JFugue的库?
使用 JFugue,合成音乐就像这样简单:
Player player = new Player();
player.play("C D E F G A B");
虽然我确实意识到大多数浏览器的 HTML5 音频 API 仍在开发中,但我很不知道这些浏览器中是否有任何一个支持这样的 API。
With JFugue, synthesizing music is as simple as this:
Player player = new Player();
player.play("C D E F G A B");
While I do realize that the HTML5 Audio API is still under development for most of the browsers, I am quite unaware if any of these browsers support an API like this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想看看 music.js。他们在此处有一个实际演示,但代码看起来有点像您所描述的内容:
但是,我不确定它是否真正处理“播放”部分,并且它可能使用 HTML5 音频标签。
至于哪些浏览器支持音频标签,这是一个更简单的问题: http://caniuse.com/#search=audio
You may want to take a look at music.js. They have a demo of it in action here, but the code looks somewhat like what you've described:
However, I'm not sure that it actually handles the 'play' part, and it likely uses the HTML5 audio tag.
As for what browsers support the audio tag, that's an easier question: http://caniuse.com/#search=audio