用 Java 编写 Midi 文件

发布于 2024-12-28 22:29:28 字数 221 浏览 4 评论 0原文

我有一个项目想要编写 MIDI 文件。就音符而言,没有什么太复杂的——没有弯音、没有调号、设定速度等。仅使用标准的 a、b、c 音符。例如,我想写 3 个音符 a、b、c 作为 16 分音符。

这可能不是一件容易的事。

但如果没有的话,有一些好的 MIDI 结构网站吗?

还应该提到我不想使用 javax.sound.midi。我想将 midi 写为“字符串”,然后将其保存出来。

I have a project where I want to write midi files. Nothing too complicated as far as the notes go -- no pitch bends, no key signature, set tempo etc. Using just standard a,b,c notes. For example, I want to write 3 notes a,b,c as 16th notes.

This may not be an easy task.

But if not are there some good sites for midi structure?

Should also mention I do not want to use javax.sound.midi. I want to write the midi as a "string" then save it out.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

数理化全能战士 2025-01-04 22:29:28

我正在使用 http://www.jfugue.org 作为我的 MIDI 生成应用程序 http://github.com/okohll/TextSound。例子:

Player player = new Player();
File file = new File("out.mid")
String s = "A B C D E F G";
player.saveMidi(s, file);
player.play(s);

I'm using http://www.jfugue.org for my MIDI-generating app http://github.com/okohll/TextSound. Example:

Player player = new Player();
File file = new File("out.mid")
String s = "A B C D E F G";
player.saveMidi(s, file);
player.play(s);
哭了丶谁疼 2025-01-04 22:29:28

如果您想浏览/使用,Google Code 上有 MIDI 的 Java 实现:

http ://code.google.com/p/android-midi-lib/

There's a Java implementation of MIDI up on Google Code if you want to browse/use it:

http://code.google.com/p/android-midi-lib/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文