blob: d391d65095c981c805b0cf9fc64ee5e43e1bf4f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
ardour { ["type"] = "Snippet", name = "Who Am I?" }
function factory() return function()
function whoami()
--pcall is the lua equivalent
--of try: ... catch: ...
if not pcall(function() local first_check = Session:get_mixbus(0) end) then
return "Ardour"
else
local second_check = Session:get_mixbus(11)
if second_check:isnil() then
return "Mixbus"
else
return "32C"
end
end
end
print(whoami())
end end
|