update lua script to use new remote_id lookup API
authorRobin Gareus <robin@gareus.org>
Tue, 31 May 2016 21:51:05 +0000 (23:51 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 31 May 2016 21:51:22 +0000 (23:51 +0200)
scripts/s_chanmap.lua
scripts/s_plugin_automation.lua
scripts/s_pluginutils.lua
scripts/s_replaceplugin.lua

index fd5e006c8dafbe6488aa3c0ff230811aaf31ac4b..7bc070c8cc847884088ae8093e5b363dd94d16fb 100644 (file)
@@ -16,7 +16,7 @@ function factory () return function ()
                r:add_processor_by_index(proc, 0, nil, true)
        end
 
-       r = Session:route_by_remote_id(1)
+       r = Session:get_remote_nth_route(1)
        checksetup (r)
        pi = r:nth_plugin(0):to_insert()
 
index daec46aa0c76fbe501bea567d8881c344e4e2890..56129ff7928d0d0a4286bf843634b5fb2a98d2b1 100644 (file)
@@ -6,7 +6,7 @@ function factory () return function ()
        local samplerate = Session:nominal_frame_rate ()
 
        -- get Track/Bus with RID 3
-       local r = Session:route_by_remote_id(3)
+       local r = Session:get_remote_nth_route(3)
        -- make sure the track object exists
        assert (not r:isnil ())
 
index 0ecf107e49c37a2e55dcefc1e94976153af1bd55..3af803a03e4223d6ccfb051dfc2d499c36fc7a50 100644 (file)
@@ -15,7 +15,7 @@ function factory () return function ()
 
        -------------------------------------------------------------------------------
        -- load a plugin preset
-       route = Session:route_by_remote_id(2)
+       route = Session:get_remote_nth_route(2)
        -- to 4th plugin (from top), ardour starts counting at zero
        plugin = route:nth_plugin(3):to_insert():plugin(0)
        ps = plugin:preset_by_label("cutbass") -- get preset by name
index 6ec82768b762e744888772b122089a59100b0aa9..4cef07c7babb4631cc411c1146a611055e844aa2 100644 (file)
@@ -2,7 +2,7 @@ ardour { ["type"] = "Snippet", name = "Replace Plugin" }
 
 function factory () return function ()
 
-       route = Session:route_by_remote_id(1)
+       route = Session:get_remote_nth_route(1)
        old = route:nth_plugin(0)
        new = ARDOUR.LuaAPI.new_plugin(Session, "http://gareus.org/oss/lv2/fil4#stereo", ARDOUR.PluginType.LV2, "");
        route:replace_processor (old, new, nil)