网页 (django) <-> Linux 中的 midi 事件 (alsa)

发布于 2024-12-21 21:26:59 字数 230 浏览 2 评论 0 原文

我想创建一个在 Linux 上发送和接收 ALSA MIDI 消息的 Web 应用程序。仅设计一个 Web 客户端。

为此我需要什么样的架构/程序?

我熟悉 django,但找不到缺少的 ALSA 链接(或者在我的 Ubuntu 机器上具有 ALSA 网关的任何系统)。另外,我还有一个小程序 ttymidi (http://www.varal.org/ttymidi/),它可以将消息从串行端口发送到 ALSA。

I would like to create a web application that sends and receives ALSA MIDI messages on Linux. Only one web client is intended.

What kind of architecture / programs do I need for that?

I am familiar with django but can't find the missing link to ALSA (or any system with a gateway to ALSA on my Ubuntu machine). Also, I have the small program ttymidi (http://www.varal.org/ttymidi/), that sends messages from a serial port to ALSA.

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

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

发布评论

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

评论(2

庆幸我还是我 2024-12-28 21:26:59

您也许可以使用 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.

妄司 2024-12-28 21:26:59

在没有任何第三方库的情况下做你想做的事情的最简单方法是使用 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.

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