网页 (django) <-> Linux 中的 midi 事件 (alsa)
我想创建一个在 Linux 上发送和接收 ALSA MIDI 消息的 Web 应用程序。仅设计一个 Web 客户端。
为此我需要什么样的架构/程序?
我熟悉 django,但找不到缺少的 ALSA 链接(或者在我的 Ubuntu 机器上具有 ALSA 网关的任何系统)。另外,我还有一个小程序 ttymidi (http://www.varal.org/ttymidi/),它可以将消息从串行端口发送到 ALSA。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您也许可以使用 Python 的各种操作系统接口,但 Web 应用程序并不常见这样设计的。您可能还需要担心程序中的延迟和缓冲。
You might be able to use Python's miscellaneous operating system interfaces, but web applications aren't often designed in this way. You may also have to worry about latency and buffering in your program.
在没有任何第三方库的情况下做你想做的事情的最简单方法是使用 pyALSA,它是 C ALSA 库的官方 python 包装器。
我建议您使用 Sequencer API,而不是处理较低级别的 RawMIDI 内容。查看一些测试应用 和C API文档,它肯定会帮助你编写你的代码。
The simplest way of doing what you want without any third-party library is to use pyALSA, which is the official python wrapper around the C ALSA library.
I recommend you dealing with the Sequencer API instead of the RawMIDI stuff, which is lower-level. Check out some of the test apps and the C API documentation, it will definetely help you to write your code.