mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
prefix no-inst script with an underscore and skip install
This commit is contained in:
parent
2b7a89ecff
commit
a8143ea44e
10 changed files with 2 additions and 1 deletions
41
scripts/_hook_test.lua
Normal file
41
scripts/_hook_test.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
ardour {
|
||||
["type"] = "EditorHook",
|
||||
name = "Callback Example",
|
||||
author = "Ardour Lua Task Force",
|
||||
description = "Rewind On Solo Change, Write a file when regions are moved",
|
||||
}
|
||||
|
||||
function signals ()
|
||||
s = LuaSignal.Set()
|
||||
--s:add ({[LuaSignal.SoloActive] = true, [LuaSignal.RegionPropertyChanged] = true})
|
||||
s:add (
|
||||
{
|
||||
[LuaSignal.SoloActive] = true,
|
||||
[LuaSignal.RegionPropertyChanged] = true
|
||||
}
|
||||
)
|
||||
--for k,v in pairs (s:table()) do print (k, v) end
|
||||
return s
|
||||
end
|
||||
|
||||
function factory (params)
|
||||
return function (signal, ref, ...)
|
||||
print (signal, ref, ...)
|
||||
|
||||
if (signal == LuaSignal.SoloActive) then
|
||||
Session:goto_start()
|
||||
end
|
||||
|
||||
if (signal == LuaSignal.RegionPropertyChanged) then
|
||||
obj,pch = ...
|
||||
file = io.open ("/tmp/test" ,"a")
|
||||
io.output (file)
|
||||
io.write (string.format ("Region: '%s' pos-changed: %s, length-changed: %s\n",
|
||||
obj:name (),
|
||||
tostring (pch:containsFramePos (ARDOUR.Properties.Start)),
|
||||
tostring (pch:containsFramePos (ARDOUR.Properties.Length))
|
||||
))
|
||||
io.close (file)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue