diff options
author | cbdev <cb@cbcdn.com> | 2021-01-15 21:40:00 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2021-01-15 21:40:00 +0100 |
commit | 297f11b98a6d7aec59eedd319d3056262a4a8b33 (patch) | |
tree | dd839c3fafdef72ab9a1ab0d1c976bc95d5aed43 /configs/returnone.lua | |
parent | 35f4798673194733358cd3db19a4d2baf70887fd (diff) | |
parent | 71b1504f7b34627ff629765858029a39f5fbc4a0 (diff) | |
download | midimonster-297f11b98a6d7aec59eedd319d3056262a4a8b33.tar.gz midimonster-297f11b98a6d7aec59eedd319d3056262a4a8b33.tar.bz2 midimonster-297f11b98a6d7aec59eedd319d3056262a4a8b33.zip |
Merge branch 'master' of ssh://github.com/cbdevnet/midimonster
Diffstat (limited to 'configs/returnone.lua')
-rw-r--r-- | configs/returnone.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configs/returnone.lua b/configs/returnone.lua new file mode 100644 index 0000000..cde0b03 --- /dev/null +++ b/configs/returnone.lua @@ -0,0 +1,24 @@ +-- ReturnOne by Paul Hedderly +-- Sometimes you just want an on/off from linear pads +-- For example I want to activate scenes in OBS from a Korg NanoPad2 +-- But I dont want to have to thump the pads to get a 1.0 output +-- +-- You could use this as: +-- [midi nanoP] +-- read = nanoPAD2 +-- write = nanoPAD2 +-- [lua trackpad] +-- script = trackpad.lua +-- default-handler = returnone +-- .. +-- nanoP.ch0.note{36..51} > returnone.one{1..16} -- To feed all the 16 pads to +-- returnone.outone1 > obs./obs/scene/1/preview +-- returnone.outone2 > obs./obs/scene/2/preview +-- etc +-- The output channel will be the same as the channel you feed prepended "out" + + +function returnone(v) -- Use a default function - then you can use any input channel name + if v>0 then output("out"..input_channel(),1) end; + if v==0 then output("out"..input_channel(),0) end; +end |