diff options
author | cbdev <cb@cbcdn.com> | 2020-03-23 00:15:00 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-03-23 00:15:00 +0100 |
commit | 37e712edf23a49be5387f945ab9ea57cc0b57f22 (patch) | |
tree | 5037b14bdbd08baa8f104f7e4946aa5643281a94 /configs/layering.lua | |
parent | 666aec036f9bf0de82c435bd7eace271613cee1e (diff) | |
parent | aa02ccf3abf183207b24fcbb9460cbd904a698e2 (diff) | |
download | midimonster-37e712edf23a49be5387f945ab9ea57cc0b57f22.tar.gz midimonster-37e712edf23a49be5387f945ab9ea57cc0b57f22.tar.bz2 midimonster-37e712edf23a49be5387f945ab9ea57cc0b57f22.zip |
Merge current master
Diffstat (limited to 'configs/layering.lua')
-rw-r--r-- | configs/layering.lua | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/configs/layering.lua b/configs/layering.lua new file mode 100644 index 0000000..5d9458d --- /dev/null +++ b/configs/layering.lua @@ -0,0 +1,76 @@ +-- This global variable has the current base offset for the input channels. +-- We want to map 16 input channels (from MIDI) to 512 output channels (ArtNet), +-- 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 |