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:
parent
aebd64bb6a
commit
118175a3a2
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user