[linux-audio-dev] LADSPA2: logarithmic hint

Steve Harris S.W.Harris at ecs.soton.ac.uk
Sat Apr 29 09:50:28 UTC 2006


On Sat, Apr 29, 2006 at 01:00:04 +0000, carmen wrote:
> > It's not possible for a host to know how to scale a port from just the unit
> > labeling.  Unit labeling and input value scaling are independent,  in fact
> > are completely orthogonal except in certain conventional cases like
> > IEC for some (not all!) dB ranges.
> 
> ++. there definitely needs to be a 'logarithmic' hint. maybe even log(10) vs log(2).

Errm, you you really need to think about that harder. The hint that "this
should be scaled logarithmically" isn't enough information to do anything
useful - try it. If you try to define an operation that hosts can apply
generally then you will find there are lots of cases where it can't
be applied. Either because it can't be computed, or because it does
something unhelpful.

> im sure this RDF/JSON/YAML thing can make a case for it 

Possibly, but I doubt the field of mathematics can ;)

if a is the users parameter UI control value in [0,1], u is the lower
bound, v is the upper bound, and b is the log base, then:

port val = ( (1-a) log(u) + a log(v) )^b
         = ( -a log(u) + log(u) + a log(v) )^b
         = log( ( u+v^a ) / u^a )^b
         = (u + v^a) / u^a

so the log base cancels out.

- Steve



More information about the Linux-audio-dev mailing list