Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 libasound 在 Linux 中编写软件合成器。我想用 MIDI 键盘控制它。
我有一些使用 snd_seq_open() 和 snd_seq_event_input() 的工作代码,但它只创建一个虚拟 MIDI 端口。我必须转到命令行并输入“aconnect 20 128”才能将 MIDI 数据路由到我的应用程序。
如何让我的代码自行建立连接或直接连接到 MIDI 硬件?
您必须使用snd_seq_connect_from()之类的函数创建连接。
例如,参见aseqdump 源代码。