[LAD] Presenting volume control sliders

Chris Cannam cannam at all-day-breakfast.com
Thu May 21 20:07:13 UTC 2009


On Thu, May 21, 2009 at 8:48 PM, Chris Cannam
<cannam at all-day-breakfast.com> wrote:
> There is an IEC standard for this mapping in meters (IEC 60-268-18)
> which works OK for faders as well if extended in a sensible way down
> to -inf, particularly if you don't want to go above 0dB.  It divides
> the range up into several sections which are individually linear in
> dB.  There's code for this mapping in several places, including
> base/AudioLevel.cpp in the Rosegarden source code.

Actually I might as well summarise here, not least because I've
noticed the RG code does not in fact implement exactly what's in the
standard.

The standard has the top 25% of the meter covering 0dB down to -9dB;
the next 25% covering -9 to -20; the next 20% covering -20 to -30; the
next 15% covering -30 to -40; the next 7.5% covering -40 to -50; the
next 5% covering -50 to -60; and the last 2.5% covering -60 to -Inf.
Each of those ranges is linear in dB.

The numbered levels are 0, -5, -10, -15, -20, -30, -40, -50, -60.

Ticks are per dB down to -20, then only at numbered positions, with an
additional tick at -45dB (why?)

This is actually quite different from the cubic mapping; it gives you
a lot more space in -10 to -20 relative to 0 to -10. That suggests
that you can get away with quite a few different mappings in practice.

> A cubic mapping is also good.

In Rosegarden we actually switched from a cubic mapping to one based
on the IEC meter mapping, many years ago, because "it seemed like a
good idea at the time".  I've never really made up my mind whether it
turned out better or worse.  Nowadays I'd probably go for cubic, since
it's a one-liner to code.


Chris



More information about the Linux-audio-dev mailing list