summaryrefslogtreecommitdiff
path: root/scripts/s_chanmap.lua
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-03-26 01:06:33 +0100
committerRobin Gareus <robin@gareus.org>2016-03-26 01:06:33 +0100
commit3f71e669aed2ad6f9d42b02cab886013b418b50e (patch)
tree762ac43f7a8954d6c520da1ba1e1cb4c034c69a2 /scripts/s_chanmap.lua
parent1503db4a28fe01650bb8619f5f38fccb312474ab (diff)
add lua script to test channel-mapping, update doc
Diffstat (limited to 'scripts/s_chanmap.lua')
-rw-r--r--scripts/s_chanmap.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/s_chanmap.lua b/scripts/s_chanmap.lua
new file mode 100644
index 0000000000..82e9bb0039
--- /dev/null
+++ b/scripts/s_chanmap.lua
@@ -0,0 +1,22 @@
+ardour { ["type"] = "Snippet", name = "plugin channel mapping" }
+
+function factory () return function ()
+ -- first track needs to be stereo and has a stereo plugin
+ -- (x42-eq with spectrum display, per channel processing,
+ -- and pre/post visualization is handy here)
+
+ r = Session:route_by_remote_id(1)
+ pi = r:nth_plugin(0):to_insert()
+
+ pi:set_no_inplace (true)
+
+ cm = ARDOUR.ChanMapping()
+ --cm:set(ARDOUR.DataType("Audio"), 0, 0)
+ cm:set(ARDOUR.DataType("Audio"), 1, 0)
+ pi:set_input_map (0, cm)
+
+ cm = ARDOUR.ChanMapping()
+ --cm:set(ARDOUR.DataType("Audio"), 0, 0)
+ cm:set(ARDOUR.DataType("Audio"), 1, 0)
+ pi:set_output_map (0, cm)
+end end