View Issue Details

IDCategoryLast Update
0008784bugs2021-11-14 10:00
ReporterWerner BackAssigned To 
Status newResolutionopen 
PlatformMicrosoftOSWindowsOS Version10
Product Version6.8 
Fixed in Version 
Summary0008784: LUA: Store Mixer Settings has pan wrong
DescriptionI used the "Store Mixer Settings" Lua script to save a "scene", but when I restore from that file the pans are set wrong. I checked the saved values and it looks as if the way the numbers are stored is wrong. It looks like the following:

 but should look like
(this example is for "center position").

If I correct this manually in the file the pans look alright.
Steps To ReproduceStore + recall mixer settings with LUA script.
TagsNo tags attached.


Werner Back

2021-08-03 10:53

reporter   ~0026087

Oh, just saw that it's a locale problem. LUA replaces the "." with "," in german environments.

Something like that should work:
            if pan ~= false then
                local strPan = tostring(pan)
                pan = strPan:gsub(",", ".")

Werner Back

2021-08-04 11:26

reporter   ~0026089

Ah, I played a little with LUA (without understanding everything ;)) and it seems that this works:

Replace the following line:
if pan:isnil() then pan = false else pan = pan:get_value() end --sometimes a route doesn't have pan, like the master.

if pan:isnil() then pan = false else pan = ARDOUR.LuaAPI.ascii_dtostr(pan:get_value()) end --sometimes a route doesn't have pan, like the master.

Probably there are some more parameters where this problem occurs? I couldn't find out what "send_string" does? Guess that's Mixbus only, right? Since the LUA script's author is "Mixbus Team", is it possible, that this bug doesn't appear in Mixbus?

Werner Back

2021-08-05 06:21

reporter   ~0026090

This works for me now.

a_db2b41821.lua (10,885 bytes)

Werner Back

2021-11-14 10:00

reporter   ~0026216

Further Problems: Storing fails if project name contains blanks. Fixed this.

Still not fixed and beyond my skills: if the Project contains a foldback, recalling a stored setting duplicates all foldback strips again and again. This leads to unusable projects because DSP load increases every time you load.

See the simple attached project files (diff them and you'll see). These were made in mixbus, but in ardour it's the same.

mixer_settings_store.lua (10,781 bytes)
mixer_settings_recall.lua (14,745 bytes)
Simple-fb-duplicated.ardour (150,051 bytes)
Simple-fb-triplicated.ardour (151,597 bytes)
Simple.ardour (148,509 bytes)

Issue History

Date Modified Username Field Change
2021-08-02 14:09 Werner Back New Issue
2021-08-03 10:53 Werner Back Note Added: 0026087
2021-08-04 11:26 Werner Back Note Added: 0026089
2021-08-05 06:21 Werner Back File Added: a_db2b41821.lua
2021-08-05 06:21 Werner Back Note Added: 0026090
2021-11-14 10:00 Werner Back File Added: mixer_settings_store.lua
2021-11-14 10:00 Werner Back File Added: mixer_settings_recall.lua
2021-11-14 10:00 Werner Back File Added: Simple-fb-duplicated.ardour
2021-11-14 10:00 Werner Back File Added: Simple-fb-triplicated.ardour
2021-11-14 10:00 Werner Back File Added: Simple.ardour
2021-11-14 10:00 Werner Back Note Added: 0026216