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

midir

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

17 releases (9 breaking)

new 0.10.0 Apr 21, 2024
0.9.1 Jan 27, 2023
0.8.0 May 13, 2022
0.7.0 Sep 5, 2020
0.1.2 Oct 21, 2015

#20 in Audio

Download history 989/week @ 2024-01-03 1088/week @ 2024-01-10 2351/week @ 2024-01-17 1061/week @ 2024-01-24 1100/week @ 2024-01-31 1590/week @ 2024-02-07 2038/week @ 2024-02-14 1848/week @ 2024-02-21 1572/week @ 2024-02-28 1463/week @ 2024-03-06 1107/week @ 2024-03-13 1734/week @ 2024-03-20 1534/week @ 2024-03-27 1716/week @ 2024-04-03 1379/week @ 2024-04-10 1158/week @ 2024-04-17

6,028 downloads per month
Used in 47 crates (44 directly)

MIT license

140KB
3K 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–43MB
~612K SLoC