Add orx-midi

This commit is contained in:
Edwin Jakobs
2019-04-26 14:36:42 +02:00
parent ee9deb29c4
commit 9aa9049d33
6 changed files with 225 additions and 10 deletions

19
orx-midi/README.md Normal file
View File

@@ -0,0 +1,19 @@
# orx-midi
A minimal and limited library for Midi controllers. Orx-midi is a wrapper around javax.midi.
## usage
```kotlin
// -- list all midi devices
MidiDeviceDescription.list().forEach {
println("${it.name}, ${it.vendor} r:${it.receive} t:${it.transmit}")
}
// -- open a midi controller and listen for control changes
val dev = MidiTransceiver.fromDeviceVendor("BCR2000 [hw:2,0,0]", "ALSA (http://www.alsa-project.org)")
dev.controlChanged.listen {
println("${it.channel} ${it.control} ${it.value}")
}
```