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

midir

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

18 releases (9 breaking)

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

#16 in Audio

Download history 1146/week @ 2024-08-21 1892/week @ 2024-08-28 1589/week @ 2024-09-04 1206/week @ 2024-09-11 1588/week @ 2024-09-18 2556/week @ 2024-09-25 2302/week @ 2024-10-02 1627/week @ 2024-10-09 1943/week @ 2024-10-16 1610/week @ 2024-10-23 1950/week @ 2024-10-30 1503/week @ 2024-11-06 1643/week @ 2024-11-13 1918/week @ 2024-11-20 1976/week @ 2024-11-27 1570/week @ 2024-12-04

7,215 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
~580K SLoC