summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-07-10 20:46:44 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-07-15 18:56:01 +0200
commit34578fdef6a9f77aa285501130be55fcd560c03d (patch)
treedf7336fb49652c4e34297d6a53a7cc239e0ddd99 /plugingui
parentbe9fe821ff1689ece9ee6433fcf42ec316e0aaad (diff)
Use more sane range for stddev knob in UI.
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/humaniservisualiser.cc10
-rw-r--r--plugingui/humanizerframecontent.cc4
2 files changed, 8 insertions, 6 deletions
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)