From 34578fdef6a9f77aa285501130be55fcd560c03d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 10 Jul 2018 20:46:44 +0200 Subject: Use more sane range for stddev knob in UI. --- plugingui/humaniservisualiser.cc | 10 ++++++---- plugingui/humanizerframecontent.cc | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'plugingui') diff --git a/plugingui/humaniservisualiser.cc b/plugingui/humaniservisualiser.cc index 6737e36..5b5abb7 100644 --- a/plugingui/humaniservisualiser.cc +++ b/plugingui/humaniservisualiser.cc @@ -62,7 +62,7 @@ void HumaniserVisualiser::repaintEvent(GUI::RepaintEvent *repaintEvent) int x = latency_offset / 2000.0 * width() / 2 + width() / 2; int y = velocity_offset * height(); int w = latency_stddev / 10; - int h = velocity_stddev * 10; + int h = velocity_stddev * 20; // Stddev squares float v = w; @@ -72,7 +72,7 @@ void HumaniserVisualiser::repaintEvent(GUI::RepaintEvent *repaintEvent) a = a * a * a; p.setColour(GUI::Colour(1.0f, 0.0f, 1.0f, a)); p.drawFilledRectangle(x - v / 2, 0, - x + v / 2, height()); + x + v / 2 + 1, height()); v -= 1.0f; } @@ -83,7 +83,7 @@ void HumaniserVisualiser::repaintEvent(GUI::RepaintEvent *repaintEvent) a = a * a * a; p.setColour(GUI::Colour(1.0f, 0.0f, 1.0f, a)); p.drawFilledRectangle(0, y - v / 2, - width(), y + v / 2); + width(), y + v / 2 + 1); v -= 1.0f; } @@ -101,7 +101,8 @@ void HumaniserVisualiser::latencyOffsetChanged(int offset) void HumaniserVisualiser::velocityOffsetChanged(float offset) { - velocity_offset = -1 * offset + 1; + std::cout << "velocity_offset: " << offset << std::endl; + velocity_offset = -1.0f * offset + 1.0f; redraw(); } @@ -119,6 +120,7 @@ void HumaniserVisualiser::latencyLaidbackChanged(int laidback) void HumaniserVisualiser::velocityStddevChanged(float stddev) { + std::cout << "velocity_stddev: " << stddev << std::endl; velocity_stddev = stddev; redraw(); } diff --git a/plugingui/humanizerframecontent.cc b/plugingui/humanizerframecontent.cc index 14c6929..5f84249 100644 --- a/plugingui/humanizerframecontent.cc +++ b/plugingui/humanizerframecontent.cc @@ -84,12 +84,12 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent, float HumanizerframeContent::stddevSettingsToKnob(float value) const { - return (value - 0.5f) / 8.0f; + return (value - 0.5f) / 4.0f; } float HumanizerframeContent::stddevKnobToSettings(float value) const { - return value * 8.0f + 0.5f; + return value * 4.0f + 0.5f; } void HumanizerframeContent::attackValueChanged(float value) -- cgit v1.2.3