https://github.com/krgn/tinymidi
Alsa Raw MIDI Library
https://github.com/krgn/tinymidi
Last synced: 3 months ago
JSON representation
Alsa Raw MIDI Library
- Host: GitHub
- URL: https://github.com/krgn/tinymidi
- Owner: krgn
- License: lgpl-3.0
- Created: 2013-03-28T12:22:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-28T12:23:13.000Z (over 13 years ago)
- Last Synced: 2025-10-04T15:43:47.258Z (10 months ago)
- Language: C
- Size: 109 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
README
*tinymidi* - a small C library for doing MIDI on GNU/Linux
==========
### Abstract ###
On Android, its difficult to work with USB-Midi devices. Even if building your
own ROM and adding kernel-level support for such devices, there is no library to
access those drivers functionality easily as alsa-lib has been removed from
android a while ago and cannot be built against bionic. This small library
intends to provide simple access to such raw Midi device files for read and
writing data to.
## Building ##
Building tinymidi should be straight forward. On GNU/Linux or equivalent, just
run `make` in the project directory. Adding tinymidi to an android project is
slightly more involved, as it requires using the JNI as well as a kernel
configured to include raw MIDI drivers.
### Dependencies: ###
GNU make, gcc, and glibc
### GNU/Linux ###
1) configure the target installation directory by editing `Makefile`
2) run `make`
3) run `sudo make install`
### Android ###
(TODO)
## Usage ##
1) include `tinimidi.h` in your project
2) open a midi device file (e.g. `/dev/midi2`) using `rawmidi_hw_open` (see
tests for more detailed information)
3) read/write from/to the device using `rawmidi_hw_write` & `rawmidi_hw_read`
4) close the device file descriptor using `rawmidi_rw_close`
## Licence ##
*tinymidi* is licensed under the `GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007`
as per [http://www.gnu.org/copyleft/lesser.html](http://www.gnu.org/copyleft/lesser.html)
## Credit ##
Large parts of the source code are inspired by, or exerpts from the the
*alsa-lib* project, which can be found here:
[http://www.alsa-project.org/](http://www.alsa-project.org/) - thanks to them
for their hard work!