#audio-processing #midi #music #sound #api-bindings #macos-ios

midir

A cross-platform, realtime MIDI processing library, inspired by RtMidi

18 releases (9 breaking)

new 0.10.1 Nov 20, 2024
0.10.0 Apr 21, 2024
0.9.1 Jan 27, 2023
0.8.0 May 13, 2022
0.1.2 Oct 21, 2015

#14 in Audio

Download history 2639/week @ 2024-08-01 1867/week @ 2024-08-08 1405/week @ 2024-08-15 1187/week @ 2024-08-22 1938/week @ 2024-08-29 1576/week @ 2024-09-05 1226/week @ 2024-09-12 1737/week @ 2024-09-19 2503/week @ 2024-09-26 2326/week @ 2024-10-03 1664/week @ 2024-10-10 1796/week @ 2024-10-17 1550/week @ 2024-10-24 2025/week @ 2024-10-31 1445/week @ 2024-11-07 1392/week @ 2024-11-14

6,660 downloads per month
Used in 56 crates (51 directly)

MIT license

140KB
3.5K SLoC

midir crates.io Build Status

Cross-platform, realtime MIDI processing in Rust.

Features

midir is inspired by RtMidi and supports the same features*, including virtual ports (except on Windows) and full SysEx support – but with a rust-y API!

* With the exception of message queues, but these can be implemented on top of callbacks using e.g. Rust's channels.

midir currently supports the following platforms/backends:

  • ALSA (Linux)
  • WinMM (Windows)
  • CoreMIDI (macOS, iOS (untested))
  • WinRT (Windows 8+), enable the winrt feature
  • Jack (Linux, macOS), enable the jack feature
  • Web MIDI (Chrome, Opera, perhaps others browsers)

A higher-level API for parsing and assembling MIDI messages might be added in the future.

Documentation & Example

API docs can be found at docs.rs. You can find some examples in the examples directory. Or simply run cargo run --example test_play after cloning this repository.

Dependencies

~0–38MB
~579K SLoC