summaryrefslogtreecommitdiff
path: root/src/instrument.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/instrument.cc')
-rw-r--r--src/instrument.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/instrument.cc b/src/instrument.cc
index 1175f69..43ee4ac 100644
--- a/src/instrument.cc
+++ b/src/instrument.cc
@@ -83,7 +83,8 @@ Sample *Instrument::sample(level_t level, size_t pos)
}
if(Conf::enable_velocity_modifier) {
- mod += (pos - lastpos) / (44100.0 * Conf::velocity_modifier_falloff);
+ mod += (pos - lastpos) /
+ (Conf::samplerate * Conf::velocity_modifier_falloff);
if(mod > 1.0) mod = 1.0;
}