[Clam-devel] Commit: OutControlSender::new mapping option (discuss request)

Hernán Ordiales h at ordia.com.ar
Mon Apr 14 10:16:56 PDT 2008


Hi all, i added new values mapping modes in OutControlSender widget.

Motivation: When i was playing with distortion plugins i noticed that,
working in a 0..1 range, the 0.7 to 1. generally was the most
interesting, so i started playing with the control input to
accommodate this (getting more resolution in upper range when i
playing with the input control).

Then i thought that having something like that in a general purpose
control could be also useful. For example, to compensate how the ear
perceives changes in volume, since sensation of loudness is
logarithmic, compensating the control amount with a reverse curve.
Then a mapping curve like Log01.png (check attachment) could be useful
for volume controls.

But then i faced with a 'nomenclature' problem that i'd like to share
and discuss. Seems that historically (check the pots.gif attachment)
for pots specification people call "logarithmic" a real mapping curve
that resembles to a exp one and also call "reverse log" a log like
one.

I remained with this convention in the code, but i also noticed that
for example in pd they also have the option for a linear or log mode
for sliders, and log mode seems to only take the log (just the math
operation) off the input since when you switch to it, the min value
changes to a new one greater equal than 1 (i'm not a pd user, i just
did that test)

What do you think is best? keep this convention? change it? should be
convenient to add more mapping modes? a new log one with a true log
curve like the pd one? how is in other programs?

Modes:
eLinear,    ///< 1:1 relationship (default)
Inverted,   ///< Inverted linear relationship
eLog,       ///< More resolution in the low range (check Log01.png)
eReverseLog ///< More resolution in the upper range (check 'Reverse Log 01.png')

Of course works in 0..1 range (where i define the mapping curve) but
also the same curve is expanded if max/min are changed, no problem
with that.

BTW, testfarm doesn't seems alive but i took care of run the
unit/functional tests locally

cheers
-- 
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pots.gif
Type: image/gif
Size: 10158 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080414/197e5169/attachment-0003.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log01.png
Type: image/png
Size: 9407 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080414/197e5169/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Reverse Log 01.png
Type: image/png
Size: 13805 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080414/197e5169/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: outcontrolsender.png
Type: image/png
Size: 44798 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080414/197e5169/attachment-0011.png>


More information about the clam-devel mailing list