aboutsummaryrefslogtreecommitdiffhomepage
path: root/configs
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-04-27 22:50:47 +0200
committercbdev <cb@cbcdn.com>2020-04-27 22:50:47 +0200
commit1d8ed32bf769bc99095cd32ec166e681437607f0 (patch)
treebc94fd3a0245e91c15659916fc1c3591c7fb44b7 /configs
parentd4714dfdd5c6e2d165d1ad9327fdce69a1b2b85b (diff)
parentc0bb55ff08faf2f89af947090d1c9bc412927d9f (diff)
downloadmidimonster-1d8ed32bf769bc99095cd32ec166e681437607f0.tar.gz
midimonster-1d8ed32bf769bc99095cd32ec166e681437607f0.tar.bz2
midimonster-1d8ed32bf769bc99095cd32ec166e681437607f0.zip
Merge branch 'master' into debian/master
Diffstat (limited to 'configs')
-rw-r--r--configs/launchctl-sacn.cfg2
-rw-r--r--configs/layering.cfg3
-rw-r--r--configs/layering.lua82
-rw-r--r--configs/osc-artnet.cfg2
-rw-r--r--configs/print.lua5
-rw-r--r--configs/rtpmidi.cfg22
6 files changed, 42 insertions, 74 deletions
diff --git a/configs/launchctl-sacn.cfg b/configs/launchctl-sacn.cfg
index dedfc0f..10a736a 100644
--- a/configs/launchctl-sacn.cfg
+++ b/configs/launchctl-sacn.cfg
@@ -7,7 +7,7 @@
name = MIDIMonster
[backend sacn]
-bind = 0.0.0.0
+bind = 0.0.0.0 5568 local
[midi lc]
read = Launch Control
diff --git a/configs/layering.cfg b/configs/layering.cfg
index 7adcd6f..f312a65 100644
--- a/configs/layering.cfg
+++ b/configs/layering.cfg
@@ -15,9 +15,10 @@ universe = 1
[lua layers]
script = layering.lua
+default-handler = handler
[map]
-in.ch0.cc{0..15} > layers.in{0..15}
+in.ch1.cc{0..15} > layers.{0..15}
layers.out{0..511} > out.{1..512}
in.ch0.note0 > layers.control
diff --git a/configs/layering.lua b/configs/layering.lua
index 5d9458d..5ddde65 100644
--- a/configs/layering.lua
+++ b/configs/layering.lua
@@ -3,74 +3,14 @@
-- so we have 32 possible offsets (32 * 16 = 512)
current_layer = 0
--- Set the current_layer based on the control input channel
-function control(value)
- current_layer = math.floor(value * 31.99);
-end
-
--- Handler functions for the input channels
--- Calculate the channel offset and just output the value the input channel provides
-function in0(value)
- output("out"..((current_layer * 16)), value)
- print("Output on out"..(current_layer * 16))
-end
-
-function in1(value)
- output("out"..((current_layer * 16) + 1), value)
-end
-
-function in2(value)
- output("out"..((current_layer * 16) + 2), value)
-end
-
-function in3(value)
- output("out"..((current_layer * 16) + 3), value)
-end
-
-function in4(value)
- output("out"..((current_layer * 16) + 4), value)
-end
-
-function in5(value)
- output("out"..((current_layer * 16) + 5), value)
-end
-
-function in6(value)
- output("out"..((current_layer * 16) + 6), value)
-end
-
-function in7(value)
- output("out"..((current_layer * 16) + 7), value)
-end
-
-function in8(value)
- output("out"..((current_layer * 16) + 8), value)
-end
-
-function in9(value)
- output("out"..((current_layer * 16) + 9), value)
-end
-
-function in10(value)
- output("out"..((current_layer * 16) + 10), value)
-end
-
-function in11(value)
- output("out"..((current_layer * 16) + 11), value)
-end
-
-function in12(value)
- output("out"..((current_layer * 16) + 12), value)
-end
-
-function in13(value)
- output("out"..((current_layer * 16) + 13), value)
-end
-
-function in14(value)
- output("out"..((current_layer * 16) + 14), value)
-end
-
-function in15(value)
- output("out"..((current_layer * 16) + 15), value)
-end
+function handler(value)
+ if(input_channel() == "control") then
+ -- Set the current_layer based on the control input channel
+ current_layer = math.floor(value * 31.99);
+ else
+ -- Handler functions for the input channels
+ -- Calculate the channel offset and just output the value the input channel provides
+ output("out"..((current_layer * 16) + tonumber(input_channel())), value)
+ print("Output on out"..(current_layer * 16))
+ end
+end \ No newline at end of file
diff --git a/configs/osc-artnet.cfg b/configs/osc-artnet.cfg
index ab1d767..35b2111 100644
--- a/configs/osc-artnet.cfg
+++ b/configs/osc-artnet.cfg
@@ -5,7 +5,7 @@
bind = 0.0.0.0
[osc touch]
-bind = * 8000
+bind = 0.0.0.0 8000
dest = learn@8001
[artnet out]
diff --git a/configs/print.lua b/configs/print.lua
new file mode 100644
index 0000000..dc28bb6
--- /dev/null
+++ b/configs/print.lua
@@ -0,0 +1,5 @@
+-- This function prints the name of the channel it handles and its current 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..3223bd7
--- /dev/null
+++ b/configs/rtpmidi.cfg
@@ -0,0 +1,22 @@
+; Simple RTP MIDI example configuration
+
+[backend rtpmidi]
+; This causes the backend itself to print channel values as they come in
+detect = on
+; When connecting multiple MIDIMonster hosts via RTP MIDI, set this to something different 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}