From ee086b47e5171698ed9c221e704120522f6abb73 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 25 Apr 2020 00:23:57 +0200 Subject: Add rtpmidi to README, add example config --- README.md | 3 +++ backends/rtpmidi.md | 4 ++-- configs/print.lua | 5 +++++ configs/rtpmidi.cfg | 22 ++++++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 configs/print.lua create mode 100644 configs/rtpmidi.cfg diff --git a/README.md b/README.md index a7ca212..2eda183 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Currently, the MIDIMonster supports the following protocols: | ArtNet | Linux, Windows, OSX | Version 4 | [`artnet`](backends/artnet.md) | | Streaming ACN (sACN / E1.31) | Linux, Windows, OSX | | [`sacn`](backends/sacn.md) | | OpenSoundControl (OSC) | Linux, Windows, OSX | | [`osc`](backends/osc.md) | +| RTP-MIDI | Linux, Windows, OSX | AppleMIDI sessions supported | [`rtpmidi`](backends/rtpmidi.md) | | OpenPixelControl | Linux, Windows, OSX | 8 Bit & 16 Bit modes | [`openpixelcontrol`](backends/openpixelcontrol.md) | | evdev input devices | Linux | Virtual output supported | [`evdev`](backends/evdev.md) | | Open Lighting Architecture | Linux, OSX | | [`ola`](backends/ola.md) | @@ -36,6 +37,7 @@ one protocol into channel(s) on any other (or the same) supported protocol, for * Use an OSC app as a simple lighting controller via ArtNet or sACN * Visualize ArtNet data using OSC tools * Control lighting fixtures or DAWs using gamepad controllers, trackballs, etc ([Example configuration](configs/evdev.cfg)) +* Connect a device speaking RTP MIDI (for example, an iPad) to your computer or lighting console ([Example configuration](configs/rtpmidi.cfg)) * Play games, type, or control your mouse using MIDI controllers ([Example configuration](configs/midi-mouse.cfg)) If you encounter a bug or suspect a problem with a protocol implementation, please @@ -145,6 +147,7 @@ special information. These documentation files are located in the `backends/` di * [`winmidi` backend documentation](backends/winmidi.md) * [`artnet` backend documentation](backends/artnet.md) * [`sacn` backend documentation](backends/sacn.md) +* [`rtpmidi` backend documentation](backends/rtpmidi.md) * [`evdev` backend documentation](backends/evdev.md) * [`loopback` backend documentation](backends/loopback.md) * [`ola` backend documentation](backends/ola.md) diff --git a/backends/rtpmidi.md b/backends/rtpmidi.md index 13fd1f6..82548bf 100644 --- a/backends/rtpmidi.md +++ b/backends/rtpmidi.md @@ -27,7 +27,7 @@ stream, which may lead to inconsistencies during playback. |-----------------------|-----------------------|-----------------------|-----------------------| | `detect` | `on` | `off` | Output channel specifications for any events coming in on configured instances to help with configuration. | | `mdns-name` | `computer1` | none | mDNS hostname to announce (`.local`). Apple-mode instances will be announced via mDNS if set. | -| `mdns-interface` | `wlan0` | none | Limit addresses announced via mDNS to this interface. On Windows, this is prefix-matched against the user-editable "friendly" interface name. | +| `mdns-interface` | `wlan0` | none | Limit addresses announced via mDNS to this interface. On Windows, this is prefix-matched against the user-editable "friendly" interface name. If this name matches an interface exactly, discovery uses exactly this device. | #### Instance configuration @@ -84,7 +84,7 @@ rmidi1.ch0.pitch > rmidi2.ch1.pitch #### Known bugs / problems -This backend is currently still a work in progress, and is not mentioned on the main README yet for that reason. +This backend has been in development for a long time due to its complexity. There may still be bugs hidden in there. Critical feedback and tests across multiple devices are very welcome. The mDNS and DNS-SD implementations in this backend are extremely terse, to the point of violating the diff --git a/configs/print.lua b/configs/print.lua new file mode 100644 index 0000000..c6391d3 --- /dev/null +++ b/configs/print.lua @@ -0,0 +1,5 @@ +-- This function prints the name of the channel it handles and it's value +-- It can be used for a simple debug output with the `default-handler` configuration option +function printchannel(value) + print(input_channel() .. " @ " .. value) +end diff --git a/configs/rtpmidi.cfg b/configs/rtpmidi.cfg new file mode 100644 index 0000000..4128274 --- /dev/null +++ b/configs/rtpmidi.cfg @@ -0,0 +1,22 @@ +; Simple RTP MIDI example configuration + +[backend rtpmidi] +; This causes the backend itself to output channel values +detect = on +; When connecting multiple MIDIMonster hosts via RTP MIDI, set this to something else on each computer +mdns-name = midimonster-host + +[rtpmidi rtp] +mode = apple +; Invite everyone we see on the network +invite = * + +; This instance just sends all incoming events to the `printchannel` function +[lua print] +script = print.lua +default-handler = printchannel + +; Map all notes and CC's coming in to the Lua instance +[map] +rtp.ch{0..15}.cc{0..127} > print.ch{0..15}.cc{0..127} +rtp.ch{0..15}.note{0..127} > print.ch{0..15}.cnote{0..127} -- cgit v1.2.3