summaryrefslogtreecommitdiff
path: root/scripts/mixer_settings_recall.lua
diff options
context:
space:
mode:
authorNikolaus Gullotta <nikolaus.gullotta@gmail.com>2018-07-31 14:40:07 -0500
committerNikolaus Gullotta <nikolaus.gullotta@gmail.com>2018-07-31 14:40:07 -0500
commit1d55ac1706fe6427252493521fe42293135939ab (patch)
tree4268424ba83d8790697386aa74b6e56902b64814 /scripts/mixer_settings_recall.lua
parent04ac151a1b46a6fcde5fa540e79912206d9bf8d6 (diff)
incorporate program name into save and recalling
Diffstat (limited to 'scripts/mixer_settings_recall.lua')
-rw-r--r--scripts/mixer_settings_recall.lua17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/mixer_settings_recall.lua b/scripts/mixer_settings_recall.lua
index d693f8aa16..0e981288d6 100644
--- a/scripts/mixer_settings_recall.lua
+++ b/scripts/mixer_settings_recall.lua
@@ -30,6 +30,19 @@ function factory () return function ()
end return ok, err
end
+ function whoami()
+ 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
+
function isdir(path)
return exists(path.."/")
end
@@ -351,7 +364,7 @@ function factory () return function ()
local recall_options = {
{ type = "label", col=0, colspan=10, align="left", title = "" },
- { type = "file", col=0, colspan=10, align="left", key = "file", title = "Select a Settings File:", path = ARDOUR.LuaAPI.build_filename(Session:path(), "export", "params.lua") },
+ { type = "file", col=0, colspan=15, align="left", key = "file", title = "Select a Settings File:", path = ARDOUR.LuaAPI.build_filename(Session:path(), "export", "params.lua") },
{ type = "label", col=0, colspan=10, align="left", title = "" },
}
@@ -362,7 +375,7 @@ function factory () return function ()
else
if gvld['recall-dir'] == 1 then
local global_ok = isdir(global_path)
- local global_default_path = ARDOUR.LuaAPI.build_filename(global_path, 'factory_default.lua')
+ local global_default_path = ARDOUR.LuaAPI.build_filename(global_path, string.format("FactoryDefault-%s.lua", whoami()))
print(global_default_path)
if global_ok then
recall_options[2]['path'] = global_default_path