13
0

triggerbox: TriggerMaster widget: better loop-progress indication

This commit is contained in:
Ben Loftis 2021-12-15 12:27:51 -06:00
parent 2688c02e0e
commit 8b1f7a696d

View File

@ -66,9 +66,10 @@ Loopster::set_fraction (float f)
f = std::max(0.f, f);
f = std::min(1.f, f);
float thresh = 1.0/nslices;
thresh *= 0.7;
if (fabs(_fraction-f)>thresh) {
float prior_slice = floor(_fraction * nslices);
float new_slice = floor(f*nslices);
if (new_slice != prior_slice) {
_fraction = f;
redraw();
}