Hi Mic,
I have a question for you about Level Playing Field.
First, I did something without thinking and that’s ALL on me. However, I was wondering if anyone else has run across this before.
My mistake was highlighting a number of group cues, filtering by audio cues and then executing the script without thinking about the fact that some of those audio cues did not have target files yet. They were placeholders while waiting for the files to come in.
What happened is the files before the cues with no target were leveled properly and others that followed cues with no target didn’t get adjusted at all. I didn’t take time to really troubleshoot to see if the script hung at that point, skipped one or two, etc., so I don’t really know the extent of what happened.
In this particular case, as the files were really hot and QLab’s Master level was set at zero, adjustment was significant, -22db in some multiple cases. That resulted in a need to increase the gain on the USB input of QLab on the Wing audio board. It had been -17, an indicator of the overdriven signal from QLab.
So, I think you can imagine what happened to hot files that weren’t leveled, playing through on the audio board that had had the gain level brought up from -17 to 0. The hot files were even hotter. Again that’s on me for not paying attention to the cues l was grabbing.
I was wondering if anyone has run across this issue before. Might there be a fix, or just a warning dolts like me, lol.
Tom
--2024 version usable in regions all regions regardless of decomal separator in use.
set theReferenceLevel to -24 --set desired LUFS level
set thefaderLevel to -10 --set the main fader level to your preferred output level for cues with an LUFS at the reference level
set currentTIDs to AppleScript's text item delimiters
tell application id "com.figure53.QLab.5" to tell front workspace
display dialog "WARNING: This will change the main levels of all selected cues" & return & return & "A dialog will signal when the level setting is complete." & return & return & "PROCEED?"
try
set theselected to the selected as list
if (count of items of theselected) > 0 then
repeat with eachcue in theselected
try
if q type of eachcue is "audio" and broken of eachcue is false then
set currentFileTarget to quoted form of POSIX path of (file target of eachcue as alias)
set theLUFS to (do shell script "/usr/local/bin/r128x-cli" & " " & currentFileTarget as string)
--parse theLUFS to extract the actual LUFS from a very long string
--replace every occurrence of "+" with "plus"
set AppleScript's text item delimiters to "+"
set the item_list to every text item of theLUFS
set AppleScript's text item delimiters to "plus"
set theLUFS to the item_list as string
--replace every occurrence of "-" with "minus"
set AppleScript's text item delimiters to "-"
set the item_list to every text item of theLUFS
set AppleScript's text item delimiters to "minus"
set theLUFS to the item_list as string
set AppleScript's text item delimiters to currentTIDs
--get the third word from the end
set the theLUFS to word -3 of theLUFS
--replace the string "minus" in theLUFS with "-"
if character 1 of theLUFS = "m" then
set theLUFS to "-" & characters 6 thru -1 of theLUFS
else
--replace the string "plus" in theLUFS with "+"
set theLUFS to "+" & characters 5 thru -1 of theLUFS
end if
-- check for decimal localisation and convert to comma separator if neccesary
set o to (offset of "." in theLUFS)
if ((o > 0) and (0.0 as text is "0,0")) then set theLUFS to (text 1 thru (o - 1) of theLUFS & "," & text (o + 1) thru -1 of theLUFS)
set theadjustment to (theReferenceLevel - theLUFS) + thefaderLevel
set the notes of eachcue to theLUFS & " " & theadjustment
eachcue setLevel row 0 column 0 db theadjustment
end if
end try
end repeat
display dialog "Level Setting Complete" buttons "OK" default button "OK"
end if
end try
end tell