Fix ignored note_type in TempoMap::frames_per_beat_at().
[ardour.git] / scripts / addscopes.lua
index 341773483c93da8554a066f9eca055006cbb86ec..8ac1519ee41ab6076ed9b1e215526afd07708578 100644 (file)
@@ -20,8 +20,9 @@ end
 function factory (params)
        return function ()
                -- get configuration
-               local uniq = params["unique"] or "yes"
-               local pos = params["position"] or 0
+               local p = params or {}
+               local uniq = p["unique"] or "yes"
+               local pos = p["position"] or 0
 
                -- loop over all tracks
                for t in Session:get_tracks():iter() do
@@ -47,7 +48,10 @@ function factory (params)
                                local a = ARDOUR.LuaAPI.new_luaproc(Session, "Inline Scope");
                                if (not a:isnil()) then
                                        t:add_processor_by_index(a, pos, nil, true)
-                                       a = nil
+                                       ARDOUR.LuaAPI.set_processor_param (a, 0, 5) -- timescale 5sec
+                                       -- ARDOUR.LuaAPI.set_processor_param (a, 1, 1) -- logscale on
+                                       -- ARDOUR.LuaAPI.set_processor_param (a, 2, 3) -- "Max" height
+                                       a = nil -- explicitly drop shared-ptr reference
                                end
                        end
                end