[Devel] port-props extension (rescued "extended port information" extension)

Stefano D'Angelo zanga.mail at gmail.com
Wed Nov 2 12:28:42 PDT 2011


2011/11/2 David Robillard <d at drobilla.net>:
> On Wed, 2011-11-02 at 14:03 +0200, Stefano D'Angelo wrote:
>> 2011/11/2 David Robillard <d at drobilla.net>:
>> > Hi all,
>> >
>> > I rescued the "extended port information" extension from the old wiki
>> > dump.  It was a quasi-turtle document (bad syntax) that seemed extremely
>> > stale but useful, so I figured it'd be good to clean it up and keep it
>> > maintained with the others.
>> >
>> > This does mean a different URI.  I am not sure who is currently using
>> > this. ?
>>
>> NASPRO bridges for the logarithmic port property, and IIRC
>> zynjacku/lv2rack too, and probably others too.
>>
>> However, feel free to define a new URI, the old property IIRC has an
>> erroneous description, that is the bounds must have same sign (WTF?),
>> and it takes me 2 seconds to just let the bridges produce a new
>> statement together with the old one.
>
> IIRC the lack of a rigorous definition is why logarithmic was left out
> of lv2core.
>
> This extension's logarithmic hint lacks one as well.  Can we make one?
> Are there inherent reasons why one mapping might not apply to different
> plugins?  Is there some kind of standard or existing practise for this
> somewhere?

I don't know if there's any standard, but I'd say that semilog
plotting rules could apply well, so it could be something like:

value = exp(scale * (upper - lower + 1)) + lower - 1

where:
* upper is the upper bound
* lower is the lower bound
* scale is the normalized linear scale value [0...1] (e.g., slide position)
* value is... guess what... the value

I obtained this by taking [ value = exp(a * scale) + b ] and making it
pass through the upper and lower bounds. Note that since b = lower -
1, you get log(value - lower + 1) = scale * (upper - lower + 1),
that's linear for scale, hence it's a semilog relation.

Stefano



More information about the Devel mailing list