简体   繁体   English

javascript中是否有类似于Java中的JFugue的库?

[英]Is there any library in javascript that is similar to JFugue in Java?

With JFugue, synthesizing music is as simple as this: 使用JFugue,合成音乐就像这样简单:

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. 虽然我确实知道大多数浏览器仍在开发HTML5 Audio API,但我很不知道这些浏览器是否支持这样的API。

You may want to take a look at music.js . 你可能想看看music.js They have a demo of it in action here , but the code looks somewhat like what you've described: 他们在这里有一个演示它的代码,但代码看起来有点像你所描述的:

var n = Note.fromLatin('A4');

However, I'm not sure that it actually handles the 'play' part, and it likely uses the HTML5 audio tag. 但是,我不确定它是否实际处理'play'部分,并且它可能使用HTML5音频标签。

As for what browsers support the audio tag, that's an easier question: http://caniuse.com/#search=audio 至于哪些浏览器支持音频标签,这是一个更简单的问题: http//caniuse.com/#search=audio

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

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