Available now, trial certificate on request

EBU R128 · ATSC A/85 · ITU BS.1770

LEVELAPI 2
HOLDS R128 LOUDNESS
ON TARGET, LIVE

LevelAPI2 is a C library for EBU R128 and ATSC A/85. Its realtime adjuster holds a live signal on target as the audio passes through, modulating level rather than reshaping it: 20 ms with the built-in limiter, or zero latency with it off. Measurement, correction and compliance from one header, over plain C FFI.

LevelAPI2 - professional loudness measurement library
R128 EBU Compliant
A/85 ATSC CALM Act
Offline Two-pass precision
Realtime Near-zero latency
Standards
Platforms

SAME AUDIO
DIFFERENT LEVEL

The adjuster measures and corrects in a single pass, with no analysis stage and no knowledge of what is coming next. That is what lets it sit where the audio has to come out now: a live console insert, a monitor path, a stream encoder, an on-air chain.

It modulates level toward the target rather than reshaping the signal, so the dynamics of the material are left alone. It is an automatic gain control, and what separates it is what it aims at: the standard itself, held as closely as it can while the audio is still playing.

R128 asks produced programme to sit within plus or minus 0.5 LU of target, and permits plus or minus 1.0 LU on less predictable material such as live mixed programme. That wider window is the one the adjuster works to. It is a target rather than a guarantee, and difficult live material with extreme dynamics can land outside the band.

The only delay it carries is the built-in peak limiter: 20 ms. Level modulation itself needs no look-ahead, so with the limiter switched off the adjuster runs at zero latency. A fast transient can then clip, so peak protection has to exist somewhere in your chain. Most broadcast and production chains already have a limiter, and if yours does there is no reason to pay 20 ms for a second one.

The C calls that set the target, choose the preset and switch the limiter off are in the realtime adjuster chapter of the LevelAPI2 documentation.

Where it fits

BUILT FOR THIS JOB

  • The audio has to come out now. There is no pass over the material first, because the material has not happened yet.
  • The delay budget is small. 20 ms with the built-in limiter, nothing at all without it.
  • The dynamics are not yours to change. Level moves, the material is not reshaped to fit a range.
  • Loudness compliance is required. The presets configure R128 or A/85, so nobody on your team has to become a loudness expert.
  • It has to ship inside your product. A header and a DLL, no copyleft, nothing to call home to.

And when it is a file

TWO PASSES, SAME LIBRARY

When you can read a whole file before you write it, two passes are the better answer: analyse the material, then apply the correction the analysis asked for. LevelAPI2 does that job too, from the same header and the same DLL.

THE CODE
R128 WAS
CHECKED WITH

In 2006 the ITU published BS.1770, the measurement standard that changed how broadcast thinks about loudness. Four years later the EBU released R128, the recommendation that put it into practice.

"The committees work has been made possible by the aid of a piece of software developed by Grimm Audio's Wouter Snel and Jorn Lemon. This means LevelOne is the extended version of the actual software that made R128 happen."

Grimm Audio, LevelOne manual, 2012

That software was LMBA1. It was taken commercial as LevelOne, continued at BeatRig, and is developed today at tlemon.com as LevelAPI2: one code line, fifteen years, the same hand on it throughout.

So this is not a third-party implementation of a published specification. It is the continuation of the software the committee's work was done with, still written by the same programmer.

WHAT IT
MEASURES

Integrated Loudness

Full Program Measurement

Integrated, Momentary, and Short-term loudness (LU / LUFS) with gated and ungated variants. Complete compliance with ITU BS.1770.

True Peak

Inter-sample Peak Detection

High-precision TruePeak measurement prevents clipping after D/A conversion. Automatic peak limiter with ~20ms latency included.

Loudness Range

LRA & Dynamic Analysis

LRA, PSR (Peak-to-Short-term Ratio), PLR (Peak Loudness Range), and histogram data for full dynamic range profiling.

Realtime Window

Continuous Stream Metering

Configurable time window for continuous realtime measurements. Multiple independent instances for parallel source monitoring.

Dual Standard

EBU R128 + ATSC A/85

A preset call configures EBU R128 or ATSC A/85 for you. Mix and match with manual calibration for custom workflows.

Surround

Up to 16 Channels

Full surround support with SMPTE/ITU, Film Dolby, and DTS channel ordering. Dialog detection and per-channel weighting.

A/85 AND
THE CALM ACT

EBU R128 is one half of what the library is built for. The other is ATSC A/85, and in the United States it carries a legal driver: the CALM Act requires broadcasters to keep commercial loudness in line with the programme around it, and points at A/85 for how that is measured. Compliance there is a requirement rather than a preference.

A/85 anchors loudness to dialogue rather than to the whole mix, which is why it needs more than a level meter. LevelAPI2 detects dialogue in the material and gates the measurement to it, reports dialogue loudness both gated and ungated, and tells you what percentage of the audio it found dialogue in. SetPresetATSC() configures the whole A/85 long-form recipe in one call: the -24 LKFS target, dialogue gating on, relative gating off, and normalization anchored to dialogue loudness rather than to the full mix.

Dialogue gating is a library capability, not an adjuster one. It is a planned addition to the realtime adjuster. Until it lands, an A/85 workflow that depends on dialogue gating uses the measurement API.

A/85 defines two recipes and they use opposite settings: long-form programme material is dialogue-gated with relative gating off, short-form commercials are measured on the full mix with relative gating on. Both ship as named presets, alongside EBU R 128, ARIB TR-B32 and Free TV OP-59. All ten loudness standard presets →

FIVE MINUTES
TO COMPLIANT

There is no build system to adopt, no toolchain to match and no source tree to vendor. LevelAPI2 is a header and a dynamic library: load it at runtime, call one preset, and the loudness question is answered to the standard. The sample beside this is not an excerpt, it is the shape of the whole integration.

That is the part worth paying for. Loudness is a field with a large literature and a small number of decisions that actually matter, and the presets make those decisions the way the standards ask. Your team gets compliance without anyone on it having to become a loudness expert.

The interface is plain C, so it can be driven from almost any language with an FFI, and writing a binding is an afternoon rather than a project.

  • C / C++
  • Java
  • LUA
  • Python
  • Rust
  • Go
  • .NET / C#
  • Delphi
  • + more
// Load the library at runtime
void* dll = LevelAPI2_LoadDLL(path, &api);
api.SetCertificate(cert, strlen(cert));

// Create instance, configure for EBU R128
LevelAPI2Ptr h = api.Create_LevelAPI2(
    channels, samplerate, bitdepth
);
api.SetPresetEBU_R128(h);

// Feed samples and analyse
api.AnalyseInterleaved(h, samples, numframes);

// Retrieve loudness results
float lu  = api.GetLevel(h, LU,       -1);
float lra = api.GetLevel(h, LRA,      -1);
float tp  = api.GetLevel(h, TruePeak, -1);

// Normalise to target level
api.AdjustInterleaved(h, samples, numframes);

api.Destroy_LevelAPI2(h);

→ Full example + header file available with a licence

THE
OFFERING

Core Library

LevelAPI2

The core loudness measurement and normalization library. A closed-source binary (.dll / .so) with a pure C interface, built for speed and designed to integrate into any production audio pipeline.

  • EBU R128 & ATSC A/85 configured by preset call
  • Full metering suite: LU, LRA, TruePeak, PSR, PLR, PPM, RMS
  • File-based (WAV/AIFF/FLAC) and stream-based processing
  • High-quality automatic peak limiter included
  • Multiple simultaneous instances via handle system
  • Up to 16-channel surround with dialog detection
Windows .dllLinux .sox86 / x64Custom builds

Bundled - Windows Only

LevelShow2

A DirectShow filter wrapping LevelAPI2 for Windows media pipeline integration. Included in the standard licence at no extra cost.

  • DirectShow filter for Windows pipelines
  • Graphical properties page + COM interface
  • 1-instance or 2-instance analyze/adjust workflows
  • Included with a LevelAPI2 licence
WindowsDirectShowCOM / ILevelShow2

Covered by the licence

LevelAnchor

The free OBS Studio plugin built on the realtime adjuster. A LevelAPI2 licence covers running LevelAnchor across your organisation above the free-use threshold, with no separate plugin agreement to sign or administer.

  • Free for individuals and for organisations under €500k of annual revenue, including on monetized streams
  • Above that threshold a LevelAPI2 licence covers it, on any number of machines
  • A working reference integration of this library, MIT licensed on GitHub
  • Distributing it inside another product, as it stands or as a custom integration, is a separate arrangement
WindowsVST 2.4OBS StudioFree to use
⬤  Available now

LevelAnchor for OBS Studio

A free Windows VST plugin that holds each live audio source on a LUFS target in realtime, driven by the LevelAPI2 realtime adjuster. It doubles as a working reference integration: the source is on GitHub, and the released binary is built from it.

Get LevelAnchor →

Licensing

READY TO
INTEGRATE?

LevelAPI2 is licensed annually. It ships and runs standalone: no call-home, no time locks, and no copyleft for your legal team to work through.

Licence terms

  • €2,000 per year, per organisation. Internal use, any number of machines. Updates and maintenance included.
  • Shipping LevelAPI2 or LevelAnchor inside a product you distribute is a separate arrangement. Get in touch.
  • Software you have already shipped to your customers keeps working after a term ends. The right to ship new copies runs with the licence.
  • One-to-one support requires a licence.

Get in touch to discuss your use case and receive a trial certificate, so you can prove the integration in your own project before anything is signed.

info [at] levelapi [dot] dev

Worth including: what you are building, which platform, and whether the library or the plugin would ship inside a product you distribute. A message on LinkedIn works just as well.