View Issue Details

IDCategoryLast Update
0008784bugs2021-08-05 06:21
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)

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