diff options
author | cbdev <cb@cbcdn.com> | 2021-09-23 23:11:34 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2021-09-23 23:11:34 +0200 |
commit | 2e7cd460753814964148ff78be76583d844365ca (patch) | |
tree | 531ab51f9b44666f6f224b99596062107215093a /configs/returnjustone.lua | |
parent | 74c1dd3b84ba9b700b60e5df99d8be265c776946 (diff) | |
parent | 8a67d5dfcbff5cad28bdb86c5c8a1cc85ebdc288 (diff) | |
download | midimonster-2e7cd460753814964148ff78be76583d844365ca.tar.gz midimonster-2e7cd460753814964148ff78be76583d844365ca.tar.bz2 midimonster-2e7cd460753814964148ff78be76583d844365ca.zip |
Merge branch 'master' of ssh://github.com/cbdevnet/midimonster
Diffstat (limited to 'configs/returnjustone.lua')
-rw-r--r-- | configs/returnjustone.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configs/returnjustone.lua b/configs/returnjustone.lua new file mode 100644 index 0000000..c1b1632 --- /dev/null +++ b/configs/returnjustone.lua @@ -0,0 +1,23 @@ +-- ReturnOne by Paul Hedderly +-- Sometimes you just want just an on - and from any imput but 0 +-- 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 returnjustone(v) -- Use a default function - then you can use any input channel name + if v>0 then output("out"..input_channel(),1) end; +end |