Home

Awesome

portmidi-rs

Build Status Documentation

High-level PortMidi bindings for Rust.

PortMidi website: http://portmedia.sourceforge.net/portmidi/

Installation

Add this to your Cargo.toml.

[dependencies]
portmidi = "^0.2"

Prerequisites

You need to make sure you have the PortMidi library installed.

On Ubuntu / Debian:

apt-get install libportmidi-dev

Arch Linux:

pacman -S portmidi

On OSX (Homebrew):

brew install portmidi

On OSX, if you get a linker error ld: library not found for -lportmidi, either,

Examples

Examples can be run by cloning the repository and running cargo run --example <example name>.

Example: cargo run --example play -- 1 --verbose

Both play and monitor need a device number supplied, run them without an argument to get a list of the connected devices, e.g.

License

Licensed under either of

Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.