使用Music21J将MusicXML转换为MIDI浏览器中的MIDI

发布于 2025-01-24 10:37:46 字数 620 浏览 0 评论 0原文

我正在尝试加载 music21j 在浏览器(成功)中,然后将未压缩的音乐转换为一个未压缩的音乐使用转换器(不成功)的MIDI文件。

<script> 
  import * as music21j from 'https://cdn.jsdelivr.net/npm/music21j/+esm';
  console.log(music21j.default.converter.parse());

  // now how do I pass a MusicXML string to music21j and get midi back?

</script>

上面的代码显示消息加载工具:当此消息在HTML中消失时,音频将开始。但是,我并不是要加载任何音频 - 实际上,我想避免加载任何配子,而只是将Music21J作为转换工具可用。

因此,总结:我如何简单地将XML字符串传递到Music21J并将其转换为MIDI?

感谢您的澄清!

I'm trying to load music21j in the browser (successful), and then convert an uncompressed MusicXML string into a MIDI file using the converter (not successful).

<script> 
  import * as music21j from 'https://cdn.jsdelivr.net/npm/music21j/+esm';
  console.log(music21j.default.converter.parse());

  // now how do I pass a MusicXML string to music21j and get midi back?

</script>

The code above displays the message Loading Instrument: audio will begin when this message disappears in the HTML. However, I'm not trying to load any audio -- in fact, I'd like to avoid loading any soundfonts, and simply have music21j available as a conversion tool.

So, to summarize: how can I simply pass an XML string to music21j and convert it to MIDI?

Thanks for any clarification!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文