[orx-midi] Add MidiConsole extension, translate note on w/ velocity=0 events to note off

This commit is contained in:
Edwin Jakobs
2023-04-25 18:08:20 +02:00
parent f3235cab94
commit be9c7dc51a
3 changed files with 85 additions and 12 deletions

View File

@@ -1,16 +1,15 @@
import org.openrndr.application
import org.openrndr.extra.midi.MidiConsole
import org.openrndr.extra.midi.MidiDeviceDescription
import org.openrndr.extra.midi.MidiTransceiver
import org.openrndr.extra.midi.bindMidiControl
import org.openrndr.extra.parameters.DoubleParameter
fun main() {
application {
program {
//MidiDeviceDescription.list().forEach { println(it.toString()) }
val midi = MidiTransceiver.fromDeviceVendor(this,"MIDI2x2 [hw:3,0,0]", "ALSA (http://www.alsa-project.org)")
midi.controlChanged.listen {
println(it)
MidiDeviceDescription.list().forEach { println(it.toString()) }
val midi = MidiTransceiver.fromDeviceVendor(this,"Launchpad [hw:4,0,0]", "ALSA (http://www.alsa-project.org)")
extend(MidiConsole()) {
register(midi)
}
}
}