aboutsummaryrefslogtreecommitdiffhomepage
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/demo.lua42
-rw-r--r--configs/evdev.cfg (renamed from configs/evdev.conf)11
-rw-r--r--configs/flying-faders.cfg24
-rw-r--r--configs/flying-faders.lua10
-rw-r--r--configs/launchctl-sacn.cfg28
-rw-r--r--configs/lua.cfg28
-rw-r--r--configs/maweb-flying-faders.cfg17
-rw-r--r--configs/midi-mouse.cfg22
-rw-r--r--configs/midi-osc.cfg42
-rw-r--r--configs/osc-artnet.cfg16
-rw-r--r--configs/osc-kbd.cfg16
-rw-r--r--configs/osc-xy.cfg26
-rw-r--r--configs/unifest-17.cfg191
13 files changed, 239 insertions, 234 deletions
diff --git a/configs/demo.lua b/configs/demo.lua
new file mode 100644
index 0000000..24a8396
--- /dev/null
+++ b/configs/demo.lua
@@ -0,0 +1,42 @@
+-- This example MIDIMonster Lua script spreads one input channel onto multiple output
+-- channels using a polynomial function evaluated at multiple points. This effect can
+-- be visualized e.g. with martrix (https://github.com/cbdevnet/martrix).
+
+-- The polynomial to evaluate
+function polynomial(x)
+ return math.exp(-40 * input_value("width") * (x - input_value("offset")) ^ 2)
+end
+
+-- Evaluate and set output channels
+function evaluate()
+ for chan=0,10 do
+ output("out" .. chan, polynomial((1 / 10) * chan))
+ end
+end
+
+-- Handler functions for the input channels
+function offset(value)
+ evaluate()
+end
+
+function width(value)
+ evaluate()
+end
+
+-- This is an example showing a simple chase running on its own without the need
+-- (but the possibility) for external input
+
+-- Global value for the current step
+current_step = 0
+
+function step()
+ if(current_step > 0) then
+ output("dim", 0.0)
+ else
+ output("dim", 1.0)
+ end
+
+ current_step = (current_step + 1) % 2
+end
+
+interval(step, 1000)
diff --git a/configs/evdev.conf b/configs/evdev.cfg
index 386e154..bb27caf 100644
--- a/configs/evdev.conf
+++ b/configs/evdev.cfg
@@ -1,16 +1,17 @@
+; Map the (admittedly weird) bluetooth profile of an Xbox One
+; Gamepad to some ArtNet output channels. Uses both analog joysticks
+; and the analog triggers.
+
[backend artnet]
-bind = * 6454
+bind = 0.0.0.0 6454
net = 0
[evdev xbox]
device = /dev/input/event14
-axis.ABS_X = 34300 0 65535 255 4095
-axis.ABS_RZ = 34300 0 65535 255 4095
-axis.ABS_Y = 34300 0 65535 255 4095
[artnet out]
uni = 0
-dest = 129.13.215.127
+dest = 255.255.255.255
[map]
xbox.EV_ABS.ABS_X > out.1+2
diff --git a/configs/flying-faders.cfg b/configs/flying-faders.cfg
new file mode 100644
index 0000000..d331f38
--- /dev/null
+++ b/configs/flying-faders.cfg
@@ -0,0 +1,24 @@
+; Create a 'flying faders' effect using lua and output
+; it onto TouchOSC (Layout 'Mix16', Multifader view on page 4)
+
+[osc touch]
+bind = * 8000
+dest = learn@9000
+
+; Pre-declare the fader values so the range mapping is correct
+/*/fader* = f 0.0 1.0
+/*/toggle* = f 0.0 1.0
+/*/push* = f 0.0 1.0
+/*/multifader*/* = f 0.0 1.0
+/1/xy = ff 0.0 1.0 0.0 1.0
+
+[lua generator]
+script = flying-faders.lua
+
+[map]
+
+generator.wave{1..24} > touch./4/multifader1/{1..24}
+;generator.wave{1..24} > touch./4/multifader2/{1..24}
+
+touch./4/multifader2/1 > generator.magnitude
+
diff --git a/configs/flying-faders.lua b/configs/flying-faders.lua
new file mode 100644
index 0000000..0b0faef
--- /dev/null
+++ b/configs/flying-faders.lua
@@ -0,0 +1,10 @@
+step = 0
+
+function wave()
+ for chan=1,24 do
+ output("wave" .. chan, (math.sin(math.rad((step + chan * 360 / 24) % 360)) + 1) / 2)
+ end
+ step = (step + 5) % 360
+end
+
+interval(wave, 100)
diff --git a/configs/launchctl-sacn.cfg b/configs/launchctl-sacn.cfg
index 164b477..0f4a19b 100644
--- a/configs/launchctl-sacn.cfg
+++ b/configs/launchctl-sacn.cfg
@@ -14,32 +14,8 @@ read = Launch Control
[sacn out]
universe = 1
-priority = 100
[map]
-lc.cc0.0 > out.1
-lc.cc0.1 > out.2
-lc.cc0.2 > out.3
-lc.cc0.3 > out.4
-lc.cc0.4 > out.5
-lc.cc0.5 > out.6
-lc.cc0.6 > out.7
-lc.cc0.7 > out.8
-lc.cc0.8 > out.9
-lc.cc0.9 > out.10
-lc.cc0.10 > out.11
-lc.cc0.11 > out.12
-lc.cc0.12 > out.13
-lc.cc0.13 > out.14
-lc.cc0.14 > out.15
-lc.cc0.15 > out.16
-
-lc.note0.0 > out.1
-lc.note0.1 > out.2
-lc.note0.2 > out.3
-lc.note0.3 > out.4
-lc.note0.4 > out.5
-lc.note0.5 > out.6
-lc.note0.6 > out.7
-lc.note0.7 > out.8
+lc.ch0.cc{0..15} > out.{1..16}
+lc.ch0.note{0..7} > out.{1..8}
diff --git a/configs/lua.cfg b/configs/lua.cfg
new file mode 100644
index 0000000..098c0f1
--- /dev/null
+++ b/configs/lua.cfg
@@ -0,0 +1,28 @@
+; This configuration uses a Lua script to distribute one input channel (from either a mouse
+; button or an axis control) onto multiple output channels (on ArtNet).
+
+[backend artnet]
+bind = 0.0.0.0
+
+[evdev mouse]
+device = /dev/input/by-path/platform-i8042-serio-2-event-mouse
+
+[evdev xbox]
+;device = /dev/input/event17
+axis.ABS_X = 34300 0 65535 255 4095
+axis.ABS_Y = 34300 0 65535 255 4095
+
+[lua lua]
+script = demo.lua
+
+[artnet art]
+universe = 0
+destination = 255.255.255.255
+
+[map]
+mouse.EV_KEY.BTN_LEFT > lua.click
+xbox.EV_ABS.ABS_X > lua.offset
+xbox.EV_ABS.ABS_Y > lua.width
+
+art.{1..11} < lua.out{0..10}
+art.12 < lua.dim
diff --git a/configs/maweb-flying-faders.cfg b/configs/maweb-flying-faders.cfg
new file mode 100644
index 0000000..806c4d4
--- /dev/null
+++ b/configs/maweb-flying-faders.cfg
@@ -0,0 +1,17 @@
+; Create a 'flying faders' effect using lua and output it onto maweb faders 1..6
+
+[maweb ma]
+; That's the IP of your console or OnPC.
+host = 10.23.42.21 80
+; If a Dot2 is used, the username is automatically set to "remote".
+user = midimonster
+password = midimonster
+
+[lua generator]
+script = flying-faders.lua
+
+[map]
+; Fader 1 to 6 (Core Wing)
+generator.wave{1..6} > ma.page1.fader{1..6}
+; Fader 7 to 14 (F-wing1 on Dot2)
+;generator.wave{7..14} > ma.page1.fader{7..14]}
diff --git a/configs/midi-mouse.cfg b/configs/midi-mouse.cfg
new file mode 100644
index 0000000..7e110ff
--- /dev/null
+++ b/configs/midi-mouse.cfg
@@ -0,0 +1,22 @@
+; Use a Launch Control MIDI controller as mouse input
+; Running this configuration requires root privileges on most systems,
+; as creating additional input devices could potentially be misused for
+; nefarious purposes
+
+[backend midi]
+detect = on
+
+[evdev mouse]
+output = MIDI Mouse
+relaxis.REL_X = 255
+relaxis.REL_Y = 255
+
+[midi launch]
+read = Launch
+
+[map]
+launch.ch0.cc0 > mouse.EV_REL.REL_X
+launch.ch0.cc1 > mouse.EV_REL.REL_Y
+
+launch.ch0.note0 > mouse.EV_KEY.BTN_LEFT
+launch.ch0.note1 > mouse.EV_KEY.BTN_RIGHT
diff --git a/configs/midi-osc.cfg b/configs/midi-osc.cfg
index 215daa9..7753a24 100644
--- a/configs/midi-osc.cfg
+++ b/configs/midi-osc.cfg
@@ -1,31 +1,20 @@
+; Translate a MIDI fader wing into an OSC fader view and vice versa
+
[backend midi]
name = MIDIMonster
[backend artnet]
-bind = * 6454
+bind = 0.0.0.0 6454
net = 0
[osc touch]
bind = * 8000
dest = learn@8000
root = /4
-/fader1 = f 0.0 1.0
-/fader2 = f 0.0 1.0
-/fader3 = f 0.0 1.0
-/fader4 = f 0.0 1.0
-/fader5 = f 0.0 1.0
-/fader6 = f 0.0 1.0
-/fader7 = f 0.0 1.0
-/fader8 = f 0.0 1.0
-/multifader1/1 = f 0.0 1.0
-/multifader1/2 = f 0.0 1.0
-/multifader1/3 = f 0.0 1.0
-/multifader1/4 = f 0.0 1.0
-/multifader1/5 = f 0.0 1.0
-/multifader1/6 = f 0.0 1.0
-/multifader1/7 = f 0.0 1.0
-/multifader1/8 = f 0.0 1.0
+; Pre-declare the fader values so the range mapping is correct
+/fader* = f 0.0 1.0
+/multifader1/* = f 0.0 1.0
[midi bcf]
read = BCF
@@ -33,20 +22,5 @@ write = BCF
[map]
-bcf.cc0.81 <> touch./fader1
-bcf.cc0.82 <> touch./fader2
-bcf.cc0.83 <> touch./fader3
-bcf.cc0.84 <> touch./fader4
-bcf.cc0.85 <> touch./fader5
-bcf.cc0.86 <> touch./fader6
-bcf.cc0.87 <> touch./fader7
-bcf.cc0.88 <> touch./fader8
-
-bcf.cc0.81 <> touch./multifader1/1
-bcf.cc0.82 <> touch./multifader1/2
-bcf.cc0.83 <> touch./multifader1/3
-bcf.cc0.84 <> touch./multifader1/4
-bcf.cc0.85 <> touch./multifader1/5
-bcf.cc0.86 <> touch./multifader1/6
-bcf.cc0.87 <> touch./multifader1/7
-bcf.cc0.88 <> touch./multifader1/8
+bcf.ch0.cc{81..88} <> touch./fader{1..8}
+bcf.ch0.cc{81..88} <> touch./multifader1/{1..8}
diff --git a/configs/osc-artnet.cfg b/configs/osc-artnet.cfg
new file mode 100644
index 0000000..ab1d767
--- /dev/null
+++ b/configs/osc-artnet.cfg
@@ -0,0 +1,16 @@
+; This configuration maps the multifader page of the TouchOSC 'Mix 16' Layout
+; to the first 48 ArtNet channels
+
+[backend artnet]
+bind = 0.0.0.0
+
+[osc touch]
+bind = * 8000
+dest = learn@8001
+
+[artnet out]
+destination = 255.255.255.255
+
+[map]
+touch./4/multifader1/{1..24} > out.{1..24}
+touch./4/multifader2/{1..24} > out.{25..48}
diff --git a/configs/osc-kbd.cfg b/configs/osc-kbd.cfg
index 0abd131..bd2e2c0 100644
--- a/configs/osc-kbd.cfg
+++ b/configs/osc-kbd.cfg
@@ -1,4 +1,5 @@
-; Maps a TouchOSC simpl keyboard layout to MIDI notes
+; Maps a TouchOSC simple keyboard layout to MIDI notes
+; and writes them out to a FLUIDSynth instance
[backend midi]
name = MIDIMonster
@@ -11,15 +12,4 @@ bind = * 8000
dest = learn@8001
[map]
-pad./1/push1 > out.note0.60
-pad./1/push2 > out.note0.61
-pad./1/push3 > out.note0.62
-pad./1/push4 > out.note0.63
-pad./1/push5 > out.note0.64
-pad./1/push6 > out.note0.65
-pad./1/push7 > out.note0.66
-pad./1/push8 > out.note0.67
-pad./1/push9 > out.note0.68
-pad./1/push10 > out.note0.69
-pad./1/push11 > out.note0.70
-pad./1/push12 > out.note0.71
+pad./1/push{1..12} > out.ch0.note{60..71}
diff --git a/configs/osc-xy.cfg b/configs/osc-xy.cfg
new file mode 100644
index 0000000..fc5c5f3
--- /dev/null
+++ b/configs/osc-xy.cfg
@@ -0,0 +1,26 @@
+; Test for bi-directional OSC with an XY pad (TouchOSC Layout 'Mix16', Page 1)
+
+[backend osc]
+detect = on
+
+[osc touch]
+bind = 0.0.0.0 8000
+dest = learn@9000
+
+; Pre-declare the fader values so the range mapping is correct
+/*/xy = ff 0.0 1.0 0.0 1.0
+
+[evdev xbox]
+device = /dev/input/event16
+
+[midi launch]
+
+[map]
+xbox.EV_ABS.ABS_X > touch./1/xy:1
+xbox.EV_ABS.ABS_Y > touch./1/xy:0
+
+xbox.EV_ABS.ABS_X > launch.ch0.note2
+;xbox.EV_ABS.ABS_Y > launch.ch0.note3
+
+launch.ch0.note0 <> touch./1/xy:0
+launch.ch0.note1 <> touch./1/xy:1
diff --git a/configs/unifest-17.cfg b/configs/unifest-17.cfg
index 1fab484..2504550 100644
--- a/configs/unifest-17.cfg
+++ b/configs/unifest-17.cfg
@@ -1,27 +1,36 @@
-; Note that this configuration file was originally written with
-; an older syntax and thus only contains right-to-left mappings
+; This configuration was used as central control translator for the following tasks
+; * Translate 2 Fader Wings and 2 Launch Control from MIDI CC to MIDI notes
+; to be used as input to the GrandMA (connected to OUT A on Fader 1)
+; Since both fader wings have the same name, we need to refer to them by portid
+; -> Instances fader1, fader2, lc2, grandma
+; * Remap buttons from a LaunchPad as input to the GrandMA
+; -> Instances launchpad, grandma
+; * Translate the rotaries of one Launch Control to ArtNet for additional effect control
+; -> Instances lc1, xlaser
+;
+; Note that the MIDI port specifications might not be reusable 1:1
[backend midi]
name = MIDIMonster
[backend artnet]
-bind = * 6454
+bind = 0.0.0.0 6454
net = 0
; XLaser environment
-[artnet claudius]
-uni = 0
+[artnet xlaser]
+universe = 0
; MIDI input devices
-[midi pad]
+[midi launchpad]
read = Launchpad
write = Launchpad
-[midi bcf1]
+[midi fader1]
read = 20:0
write = 20:0
-[midi bcf2]
+[midi fader2]
read = 36:0
write = 36:0
@@ -34,162 +43,32 @@ read = 32:0
write = 32:0
; Output MIDI via OUT A on BCF
-[midi out]
+[midi grandma]
write = 36:1
read = 36:1
[map]
-; ArtNet
-claudius.1 < lc1.cc0.1
-claudius.2 < lc1.cc0.2
-claudius.3 < lc1.cc0.3
-claudius.4 < lc1.cc0.4
-claudius.5 < lc1.cc0.5
-claudius.6 < lc1.cc0.6
-claudius.7 < lc1.cc0.7
-claudius.8 < lc1.cc0.8
-claudius.9 < lc1.cc0.9
-claudius.10 < lc1.cc0.10
-claudius.11 < lc1.cc0.11
-claudius.12 < lc1.cc0.12
-claudius.13 < lc1.cc0.13
-claudius.14 < lc1.cc0.14
-claudius.15 < lc1.cc0.15
-claudius.16 < lc1.cc0.16
+; Effect control
+xlaser.{1..16} < lc1.ch0.cc{1..16}
-; BCF Fader
-out.note0.0 < bcf1.cc0.81
-out.note0.1 < bcf1.cc0.82
-out.note0.2 < bcf1.cc0.83
-out.note0.3 < bcf1.cc0.84
-out.note0.4 < bcf1.cc0.85
-out.note0.5 < bcf1.cc0.86
-out.note0.6 < bcf1.cc0.87
-out.note0.7 < bcf1.cc0.88
-out.note0.8 < bcf2.cc0.81
-out.note0.9 < bcf2.cc0.82
-out.note0.10 < bcf2.cc0.83
-out.note0.11 < bcf2.cc0.84
-out.note0.12 < bcf2.cc0.85
-out.note0.13 < bcf2.cc0.86
-out.note0.14 < bcf2.cc0.87
-out.note0.15 < bcf2.cc0.88
+; BCF Faders to GrandMA
+grandma.ch0.note{0..7} < fader1.ch0.cc{81..88}
+grandma.ch0.note{8..15} < fader2.ch0.cc{81..88}
; LC Rotary
-out.note0.16 < lc1.cc0.1
-out.note0.17 < lc1.cc0.2
-out.note0.18 < lc1.cc0.3
-out.note0.19 < lc1.cc0.4
-out.note0.20 < lc1.cc0.5
-out.note0.21 < lc1.cc0.6
-out.note0.22 < lc1.cc0.7
-out.note0.23 < lc1.cc0.8
-out.note0.24 < lc1.cc0.9
-out.note0.25 < lc1.cc0.10
-out.note0.26 < lc1.cc0.11
-out.note0.27 < lc1.cc0.12
-out.note0.28 < lc1.cc0.13
-out.note0.29 < lc1.cc0.14
-out.note0.30 < lc1.cc0.15
-out.note0.31 < lc1.cc0.16
-out.note0.32 < lc2.cc0.1
-out.note0.33 < lc2.cc0.2
-out.note0.34 < lc2.cc0.3
-out.note0.35 < lc2.cc0.4
-out.note0.36 < lc2.cc0.5
-out.note0.37 < lc2.cc0.6
-out.note0.38 < lc2.cc0.7
-out.note0.39 < lc2.cc0.8
-out.note0.40 < lc2.cc0.9
-out.note0.41 < lc2.cc0.10
-out.note0.42 < lc2.cc0.11
-out.note0.43 < lc2.cc0.12
-out.note0.44 < lc2.cc0.13
-out.note0.45 < lc2.cc0.14
-out.note0.46 < lc2.cc0.15
-out.note0.47 < lc2.cc0.16
+grandma.ch0.note{16..31} < lc1.ch0.cc{1..16}
+grandma.ch0.note{32..47} < lc2.ch0.cc{1..16}
; LC Button
-out.note0.48 < lc1.note0.0
-out.note0.49 < lc1.note0.1
-out.note0.50 < lc1.note0.2
-out.note0.51 < lc1.note0.3
-out.note0.52 < lc1.note0.4
-out.note0.53 < lc1.note0.5
-out.note0.54 < lc1.note0.6
-out.note0.55 < lc1.note0.7
-
-out.note0.56 < lc2.note0.0
-out.note0.57 < lc2.note0.1
-out.note0.58 < lc2.note0.2
-out.note0.59 < lc2.note0.3
-out.note0.60 < lc2.note0.4
-out.note0.61 < lc2.note0.5
-out.note0.62 < lc2.note0.6
-out.note0.63 < lc2.note0.7
+grandma.ch0.note{48..55} < lc1.ch0.note{0..7}
+grandma.ch0.note{56..63} < lc2.ch0.note{0..7}
; Launchpad
-out.note0.64 < pad.note0.0
-out.note0.65 < pad.note0.1
-out.note0.66 < pad.note0.2
-out.note0.67 < pad.note0.3
-out.note0.68 < pad.note0.4
-out.note0.69 < pad.note0.5
-out.note0.70 < pad.note0.6
-out.note0.71 < pad.note0.7
-out.note0.72 < pad.note0.16
-out.note0.73 < pad.note0.17
-out.note0.74 < pad.note0.18
-out.note0.75 < pad.note0.19
-out.note0.76 < pad.note0.20
-out.note0.77 < pad.note0.21
-out.note0.78 < pad.note0.22
-out.note0.79 < pad.note0.23
-out.note0.80 < pad.note0.32
-out.note0.81 < pad.note0.33
-out.note0.82 < pad.note0.34
-out.note0.83 < pad.note0.35
-out.note0.84 < pad.note0.36
-out.note0.85 < pad.note0.37
-out.note0.86 < pad.note0.38
-out.note0.87 < pad.note0.39
-out.note0.88 < pad.note0.48
-out.note0.89 < pad.note0.49
-out.note0.90 < pad.note0.50
-out.note0.91 < pad.note0.51
-out.note0.92 < pad.note0.52
-out.note0.93 < pad.note0.53
-out.note0.94 < pad.note0.54
-out.note0.95 < pad.note0.55
-out.note0.96 < pad.note0.64
-out.note0.97 < pad.note0.65
-out.note0.98 < pad.note0.66
-out.note0.99 < pad.note0.67
-out.note0.100 < pad.note0.68
-out.note0.101 < pad.note0.69
-out.note0.102 < pad.note0.70
-out.note0.103 < pad.note0.71
-out.note0.104 < pad.note0.80
-out.note0.105 < pad.note0.81
-out.note0.106 < pad.note0.82
-out.note0.107 < pad.note0.83
-out.note0.108 < pad.note0.84
-out.note0.109 < pad.note0.85
-out.note0.110 < pad.note0.86
-out.note0.111 < pad.note0.87
-out.note0.112 < pad.note0.96
-out.note0.113 < pad.note0.97
-out.note0.114 < pad.note0.98
-out.note0.115 < pad.note0.99
-out.note0.116 < pad.note0.100
-out.note0.117 < pad.note0.101
-out.note0.118 < pad.note0.102
-out.note0.119 < pad.note0.103
-out.note0.120 < pad.note0.112
-out.note0.121 < pad.note0.113
-out.note0.122 < pad.note0.114
-out.note0.123 < pad.note0.115
-out.note0.124 < pad.note0.116
-out.note0.125 < pad.note0.117
-out.note0.126 < pad.note0.118
-out.note0.127 < pad.note0.119
+grandma.ch0.note{64..71} < launchpad.ch0.note{0..7}
+grandma.ch0.note{72..79} < launchpad.ch0.note{16..23}
+grandma.ch0.note{80..87} < launchpad.ch0.note{32..39}
+grandma.ch0.note{88..95} < launchpad.ch0.note{48..55}
+grandma.ch0.note{96..103} < launchpad.ch0.note{64..71}
+grandma.ch0.note{104..111} < launchpad.ch0.note{80..87}
+grandma.ch0.note{112..119} < launchpad.ch0.note{96..103}
+grandma.ch0.note{120..127} < launchpad.ch0.note{112..119}