在 Ruby 中读取 MIDI 设备输入

发布于 2024-10-10 06:12:18 字数 82 浏览 0 评论 0原文

是否可以在 Ruby 中捕获通过 MIDI-USB 连接的键盘发送的 MIDI 信号?如果不是 Ruby,我该如何用 C 语言来实现 Ruby 扩展?

Is is possible to trap the MIDI signals being sent by my keyboard connected via MIDI-USB in Ruby? If not Ruby, how would I do it in C so I can make a Ruby extension?

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

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

发布评论

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

评论(1

童话 2024-10-17 06:12:18

使用 PortMidi,它是 PortMedia 项目的一部分。谷歌搜索一下就显示了对 PortMidi 的现有 Ruby 绑定的一些引用,因此您可能不需要做太多/任何工作来让事情运行。

什么是PortMedia?

  • PortMedia 是一组 API 和
    音乐和库的实现
    其他媒体。
  • PortMedia 是开源的
    并在 Windows、Macintosh 和
    Linux。
  • 目前,图书馆支持
    音频 I/O 和 MIDI I/O。

Use PortMidi, which is part of the PortMedia project. A little Googling showed several references to existing Ruby bindings to PortMidi, so you may not need to do much/any work to get things running.

What is PortMedia?

  • PortMedia is a set of APIs and
    library implementations for music and
    other media.
  • PortMedia is open-source
    and runs on Windows, Macintosh, and
    Linux.
  • Currently, libraries support
    Audio I/O and MIDI I/O.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文