mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Tweak LFO script
* thin automation to prevent too dense events * add icon (cosine wave)
This commit is contained in:
parent
8e8249b595
commit
81d8f0faa7
1 changed files with 16 additions and 0 deletions
|
|
@ -160,6 +160,9 @@ function factory (unused_params)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- remove dense events
|
||||||
|
al:thin (20) -- threashold of area below curve
|
||||||
|
|
||||||
-- TODO: display the modified automation lane in the time line in order to make the change visible!
|
-- TODO: display the modified automation lane in the time line in order to make the change visible!
|
||||||
|
|
||||||
-- Save undo
|
-- Save undo
|
||||||
|
|
@ -171,3 +174,16 @@ function factory (unused_params)
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function icon (params) return function (ctx, width, height, fg)
|
||||||
|
local wh = math.min (width, height) * .5
|
||||||
|
local x0 = math.ceil (wh * .2)
|
||||||
|
local x1 = math.floor (wh * 1.8)
|
||||||
|
ctx:set_line_width (1)
|
||||||
|
ctx:set_source_rgba (ARDOUR.LuaAPI.color_to_rgba (fg))
|
||||||
|
ctx:move_to (x0, wh * 1.5)
|
||||||
|
for x = x0, x1 do
|
||||||
|
ctx:line_to (x, wh + math.cos (3 * math.pi * (x-x0) / (x1-x0)) * wh * .5)
|
||||||
|
end
|
||||||
|
ctx:stroke ()
|
||||||
|
end end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue