add lua script to test channel-mapping, update doc
[ardour.git] / scripts / s_chanmap.lua
1 ardour { ["type"] = "Snippet", name = "plugin channel mapping" }
2
3 function factory () return function ()
4         -- first track needs to be stereo and has a stereo plugin
5         -- (x42-eq with spectrum display, per channel processing,
6         --  and pre/post visualization is handy here)
7
8         r = Session:route_by_remote_id(1)
9         pi = r:nth_plugin(0):to_insert()
10
11         pi:set_no_inplace (true)
12
13         cm = ARDOUR.ChanMapping()
14         --cm:set(ARDOUR.DataType("Audio"), 0, 0)
15         cm:set(ARDOUR.DataType("Audio"), 1, 0)
16         pi:set_input_map (0, cm)
17
18         cm = ARDOUR.ChanMapping()
19         --cm:set(ARDOUR.DataType("Audio"), 0, 0)
20         cm:set(ARDOUR.DataType("Audio"), 1, 0)
21         pi:set_output_map (0, cm)
22 end end