diff options
author | Robin Gareus <robin@gareus.org> | 2016-03-26 14:56:25 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-03-26 14:56:25 +0100 |
commit | 5291fba919d47d800cd34718597c255464b962f7 (patch) | |
tree | 599637e11a1bf56f0f02eaa8888f3fdbe826db31 /scripts | |
parent | 6b33ebaafa29dc007afa1ea47749172fc8bc2164 (diff) |
tweak plugin-pin management dev script
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/s_chanmap.lua | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/s_chanmap.lua b/scripts/s_chanmap.lua index 82e9bb0039..fd5e006c8d 100644 --- a/scripts/s_chanmap.lua +++ b/scripts/s_chanmap.lua @@ -1,11 +1,23 @@ -ardour { ["type"] = "Snippet", name = "plugin channel mapping" } +ardour { ["type"] = "Snippet", name = "plugin channel-map dev" } function factory () return function () - -- first track needs to be stereo and has a stereo plugin + -- first track needs to be stereo and have a stereo plugin -- (x42-eq with spectrum display, per channel processing, - -- and pre/post visualization is handy here) + -- and pre/post visualization is very handy here) + + function checksetup (r) + -- fail if Route ID 1 is not present or not stereo + assert (r and not r:isnil()) + assert (r:n_inputs():n_audio() == 2) + -- check first Plugin and make sure it is a "Plugin Insert" + if not r:nth_plugin(0):isnil() and not r:nth_plugin(0):to_insert():isnil() then return end + -- insert x42-eq at the top. + local proc = ARDOUR.LuaAPI.new_plugin(Session, "http://gareus.org/oss/lv2/fil4#stereo", ARDOUR.PluginType.LV2, ""); + r:add_processor_by_index(proc, 0, nil, true) + end r = Session:route_by_remote_id(1) + checksetup (r) pi = r:nth_plugin(0):to_insert() pi:set_no_inplace (true) |