Re: [linux-audio-dev] LADSPA unbounded control values

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] LADSPA unbounded control values
From: Brian Stafford (brian_AT_stafford.uklinux.net)
Date: Wed Nov 22 2000 - 23:09:30 EET


On Wed, 22 Nov 2000 09:25:56 -0500, Paul Barton-Davis <pbd_AT_Op.Net> wrote:

> >This applies even if the bounds are set - where is 0dB on the scale?
> My
> >best guess is default to 1.0 and hope for the best.
>
> this was my first guess as well. the problem is two-fold.
>
> 1) the "amplifier" is useless if the maximum value of the gain
> value if 1.0 (it can never actually amplify)

Perhaps I was unclear - I meant that 1.0 should be the guessed 0db
reference. Of course, this does nothing at all to help setting bounds
on values where hints are not supplied.

>
> 2) the LOGARITHMIC hint is intended to apply to more than just
> dB-related controls.
>

Fair comment.

> ... there is still the problem of converting the
> the control value into an actual gain, since if the specified range i
> s
> 0.0 to 1.0, what does 0.0 actually mean ? its meant to indicate
> "-infinite" gain, presumably. all very confusing.

I assume here that LADSPA_HINT_LOGARITHMIC means to *display* the
value logarithmically, the comment in ladspa.h implies this. So
0.0 linear == -ve infinity log.

Of course a "real" fader on an analogue mixing console doesn't have
a truly log scale, the dBs are more compressed at the bottom of the
scale as the amplifier gain drops to zero (-ve infinity dB). This
is both convenient and AFAIK a consequence of simulating log curves
using linear pots and op amps in an active gain stage - but I
digress.

Then there is the issue of -ve values which might sensibly be
presented logarithmically. For example, an amplifier which
conditionally phase inverts. The gain might be varied from, say,
-4.0 to 4.0 but how can that be presented to the user in dB as a
continuous range?

Thinking some more on logarithmic presentation. The presentation
varies according to what the control is supposed to do. For example,
a frequency scale might be spaced logarithmically, but shown as
absolute values, 220Hz,440Hz,880Hz,1.7kHz etc whereas a gain
control is expressed as a ratio in dB, -20dB,-10db,0dB,10dB etc.
I suspect that the LADSPA_HINT_LOGARITHMIC hint is not quite
enough. Maybe we need a LADSPA_HINT_DB or LADSPA_HINT_RATIOMETRIC
as well. (LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_RATIOMETRIC
== LADSPA_HINT_DB perhaps?)
Also, in cases where log presentation is useful, linear
presentation might also be useful, especially if the range of
control is limited. The choice seems quite arbitrary.
OTOH, there are controls where only a linear presentation might
make sense - a pan control comes to mind. Perhaps the absence
of the LADSPA_HINT_LOGARITHMIC hint should be taken to mean
always use a linear display.

I better stop - I fear I'm muddying the issue, besides, trhe X Files
is on TV shortly

Regards, Brian


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Nov 23 2000 - 00:18:08 EET