13
0

Fix midi control for log plugin parameters.

git-svn-id: svn://localhost/ardour2/trunk@663 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sampo Savolainen 2006-07-02 20:51:16 +00:00
parent aebd64bb6a
commit 118175a3a2

View File

@ -127,10 +127,16 @@ Plugin::MIDIPortControl::set_value (float value)
value = 0.0;
}
} else {
value = lower + (range * value);
if (logarithmic) {
value = exp(value);
if (!logarithmic) {
value = lower + (range * value);
} else {
float _lower = 0.0f;
if (lower > 0.0f) {
_lower = log(lower);
}
value = exp(_lower + log(range) * value);
}
}