summaryrefslogtreecommitdiff
path: root/src/sample_selection.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2019-03-16 16:32:18 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2019-05-11 14:54:51 +0200
commit61f443f24ce9f9a99d78cea70a53654716d1f8fb (patch)
treeff382f54ab48960aea7db4de0370791d7a04f601 /src/sample_selection.cc
parentc7c185300e32e871d0be5c897e844783f4b3fc9e (diff)
Minor fix to compensate for dropped 0 velocity notes.
Diffstat (limited to 'src/sample_selection.cc')
-rw-r--r--src/sample_selection.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sample_selection.cc b/src/sample_selection.cc
index caf3bdd..012888d 100644
--- a/src/sample_selection.cc
+++ b/src/sample_selection.cc
@@ -160,7 +160,7 @@ const Sample* SampleSelection::getObjective(level_t level, std::size_t pos)
auto power_min = powerlist.getMinPower();
float power_span = power_max - power_min;
- float mean = level;
+ float mean = level - .5f/127.f; // XXX: this should actually be done when reading the events
float stddev = settings.enable_velocity_modifier.load() ?
settings.velocity_stddev.load()/127.0f : 0.;
float lvl = power_min + rand.normalDistribution(mean, stddev)*power_span;