Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/musitdev/portmidi-rs
High-level PortMidi bindings and wrappers for Rust
https://github.com/musitdev/portmidi-rs
Last synced: 7 days ago
JSON representation
High-level PortMidi bindings and wrappers for Rust
- Host: GitHub
- URL: https://github.com/musitdev/portmidi-rs
- Owner: musitdev
- License: apache-2.0
- Created: 2014-01-11T18:39:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-07-13T09:54:24.000Z (over 1 year ago)
- Last Synced: 2024-08-11T17:08:14.457Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 1010 KB
- Stars: 75
- Watchers: 4
- Forks: 22
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-rust-cn - musitdev/portmidi-rs - ci.org/musitdev/portmidi-rs.svg?branch=master">](https://travis-ci.org/musitdev/portmidi-rs) (Libraries / Audio)
- awesome-rust - musitdev/portmidi-rs - ci.org/musitdev/portmidi-rs.svg?branch=master">](https://travis-ci.org/musitdev/portmidi-rs) (Libraries / Audio)
- awesome-rust - musitdev/portmidi-rs
- awesome-rust-cn - musitdev/portmidi-rs
- awesome-rust-zh - musitdev/portmidi-rs - [PortMidi](http://portmedia.sourceforge.net/portmidi/)绑定 [<img src="https://api.travis-ci.org/musitdev/portmidi-rs.svg?branch=master">](https://travis-ci.org/musitdev/portmidi-rs) (库 / 音频)
- awesome-rust - musitdev/portmidi-rs - [PortMidi](https://portmedia.sourceforge.net/portmidi/) bindings (Libraries / Audio and Music)
- awesome-rust - musitdev/portmidi-rs - ci.org/musitdev/portmidi-rs.svg?branch=master">](https://travis-ci.org/musitdev/portmidi-rs) (库 Libraries / 音频 Audio)
- awesome-rust-zh-cn - musitdev/portmidi-rs - ci.org/musitdev/portmidi-rs.svg?branch=master">](https://travis-ci.org/musitdev/portmidi-rs) (音频(Audio) / 天文(Astronomy))
- fucking-awesome-rust - musitdev/portmidi-rs - 🌎 [PortMidi](portmedia.sourceforge.net/portmidi/) bindings (Libraries / Audio and Music)
- fucking-awesome-rust - musitdev/portmidi-rs - 🌎 [PortMidi](portmedia.sourceforge.net/portmidi/) bindings (Libraries / Audio and Music)
README
portmidi-rs
===========[![Build Status](https://travis-ci.org/musitdev/portmidi-rs.svg?branch=master)](https://travis-ci.org/musitdev/portmidi-rs)
[![Documentation](https://img.shields.io/badge/rustdoc-hosted-blue.svg)](http://musitdev.github.io/portmidi-rs/portmidi/index.html)High-level PortMidi bindings for Rust.
PortMidi website: http://portmedia.sourceforge.net/portmidi/
Installation
============Add this to your `Cargo.toml`.
```toml
[dependencies]
portmidi = "^0.2"
```Prerequisites
-------------You need to make sure you have the PortMidi library installed.
On Ubuntu / Debian:
```sh
apt-get install libportmidi-dev
```Arch Linux:
```sh
pacman -S portmidi
```On OSX (Homebrew):
```sh
brew install portmidi
```
On OSX, if you get a linker error `ld: library not found for -lportmidi`, either,
- make sure you have the Xcode Command Line Tools installed, not just Xcode, or
- make sure you have the PortMidi library in your `$LIBRARY_PATH`, e.g. for Homebrew:```sh
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib"
```Examples
========
Examples can be run by cloning the repository and running `cargo run --example `.
* **`play`**: demonstrates midi output by playing Twinkle Twinkle Little Star (forever...)
* **`monitor`**: demonstrate midi input
* **`monitor-all`**: listens on all-input devices and uses threads and channelsExample: `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 ofApache 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.