#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 2664/week @ 2024-08-02 1919/week @ 2024-08-09 1309/week @ 2024-08-16 1215/week @ 2024-08-23 1967/week @ 2024-08-30 1509/week @ 2024-09-06 1201/week @ 2024-09-13 1934/week @ 2024-09-20 2428/week @ 2024-09-27 2272/week @ 2024-10-04 1769/week @ 2024-10-11 1779/week @ 2024-10-18 1523/week @ 2024-10-25 1987/week @ 2024-11-01 1426/week @ 2024-11-08 1436/week @ 2024-11-15

6,647 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