13
0

Fix automation thinning

For consistency, samples need to be used a unit.
Currently the calculated area is orders of magnitude larger
than the default thinning_factor (20).
This commit is contained in:
Robin Gareus 2022-12-03 14:24:45 +01:00
parent 1592b95031
commit 2338e25d31
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -404,9 +404,9 @@ ControlList::thin (double thinning_factor)
/* compute the area of the triangle formed by 3 points
*/
const double ppw = prevprev->when.val();
const double pw = prev->when.val();
const double cw = cur->when.val();
const double ppw = prevprev->when.samples();
const double pw = prev->when.samples();
const double cw = cur->when.samples();
double area = fabs ((ppw * (prev->value - cur->value)) +
(pw * (cur->value - prevprev->value)) +