diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-09-20 22:23:23 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-09-20 22:23:23 +0200 |
commit | 73f1a400608d93742e57c7ea3c4433eb1a2e1852 (patch) | |
tree | eb6b500127e095e5bad124927054dc73f44814dc /src/instrument.cc | |
parent | 3d0ed93889afb5ae739d2998e33178689c2de965 (diff) |
New resample feature (greatly inspired by Cédric 'SxDx') based on libsamplerate.
Diffstat (limited to 'src/instrument.cc')
-rw-r--r-- | src/instrument.cc | 3 |
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; } |