Accessible Broadcast Loudness Meters
Hi,
Coming at you with an interesting challenge
I work at a non-profit media group producing audio material for a largely disabled audience (visual, physical etc.).
I work with a blind audio editor and I would like to know the efficacy of designing a small program for him (through MSP or otherwise) that would allow him to analyze a file for broadcast loudness levels, conforming to ATSC A85 and/or BS.1770-2/3. After analyzing the file I'd like it to announce via text-to-speech the loudness levels in LKFS. As an added bonus if it could include some kind of mechanism to conform the files to -24LKFS after analysis that would be super.
I've seen accessible peak level meters in action before but i'm trying to imagine a solution for him to be able to accurately measure and work with program loudness.
My questions:
- Is there a repository of the algorithms used for BS.1770-2/3?
- Is this something that could reasonably be done in Max/MSP or should I be looking at another programming environment?
Thanks for reading.
this can be done in max just fine but i think all complex loudness metering standards which contain gating or filtering are someones patent.
The EBU source code is open source:
R128gain is also open source and implements the US ASTC standard as well:
You will also find r128 kinda open source utilities in github., like r128x (written in Objective-C) which you could call in Max via the [shell] object or even via [jit.gl.lua]. If you're on OSX, the text-to-speech is built into the operating system, so that part would be super easy. As for the mechanism to conform to the requested loudness standard, that part is also very easy. LUFS are just decibels with a new name, and a linear gain change based on the read integrated value is all that you need to do after you know your current level. If you are very comfortable with Max, you could pull off writing the whole application in Max. But it might be easier to do the whole thing in Objective-C or Swift I think. The biggest practical problem is when engineers mix at too low a level, in which case a positive gain change is needed but the peak level is over -1 dBTP. So you might wanna consider building a limiter into the whole workflow, or reject files that cannot be conformed (the common practice in broadcast).
Feel free to contact me about this, I'd love to help out for free with this. henszimmerman at gmail dot com.
Hens Zimmerman
Just as a test I verified I could print the EBU R128 integrated loudness value to the Max console via LUA (with a changed version of r128x-cli from github). Sort of crash and burn coding, but I think you will be able to see through that and make it all awesome with function arguments and all:
function test()
local handle = io.popen("/Users/henszimmerman/Desktop/r128xx /Users/henszimmerman/Desktop/airsoft.wav")
local result = handle:read("*a")
handle:close()
print(result)
end
Hens
Thank you so much Hens!
I'm gonna try starting out with what you've given me so far. My max skills are still a work in progress but I will definitely contact you soon once I hit a roadblock.
I have OSX capabilities but the program will eventually need to work in a PC environment. I'm assuming i'll eventually have to work in Objective-c or swift like you said but would love to prototype.
Thanks again. I definitely will appreciate the help.
If it's gonna be a pc program, I'd switch to C/C++ right away. No use building something in Obj-C or Swift in that case. The open source EBU loudness code compiles straight away in gcc. The gain change and limiting can be done by SoX (http://sox.sourceforge.net/). For audio file reading and writing there is libsndfile (http://www.mega-nerd.com/libsndfile/) and I think speech synthesis isn't that big a deal with the latest versions of Windows (https://code.msdn.microsoft.com/windowsapps/Speech-synthesis-sample-6e07b218).
Hens Zimmerman
i am not trying to be funny here or get you distracted from using max, but a speaking voice seems inappropiate for a music studio situation.
what about a 19" unit with some kind of braille instead of the usual LEDs? get one, it has all the metering algos inside, exchange the LEDs with some kind of palpable soft knobs.
Roman, loudness validation is a non real-time file based operation.
hm, there are devices which let you accumulate for hours as well as displaying and storing a short term history. but then these are probably the more expensive ones, and of course in realtime it takes a bit longer. :)
Keep in mind Roman that it would be for broadcast/radio post-production purposes. As well the primary method for the blind interacting with computers is through speech-to-text functions. Braille, while still useful in many cases, is not where the accessibility community is focusing their efforts for computer interaction.
Hens, thank you so much for the links, you have saved me a lot of hassle of searching for these. I'm assuming i'll have to work with a compiler like visual studio? I'm pretty C/C++ ignorant as it is but have a lot of drive to see this project through as well as a software engineer brother-in-law.
Hey Sam, how did you go?
I'm digging around for solutions as I'm on the prowl for an offline analysis of Integrated Loudness using Max.
I'd rather not use the libebur128 if I can because its so much bloat for a relatively simple and concise task (Integrated Loudness only). I have a working Momentary LUFS meter but have no idea how to approach offline processing in Max yet.