diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-07-15 20:35:52 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-07-15 20:41:10 +0200 |
commit | a0484778a9953dfd1948bf4dac71c51deab18cab (patch) | |
tree | 15b9ff0c0b745b0efb02375d285ade09bbdf0f18 /src/inputprocessor.cc | |
parent | 34578fdef6a9f77aa285501130be55fcd560c03d (diff) |
Revorked visualiser UI and a few more parameter tweaks.
Diffstat (limited to 'src/inputprocessor.cc')
-rw-r--r-- | src/inputprocessor.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/inputprocessor.cc b/src/inputprocessor.cc index 96bc2c0..5e58661 100644 --- a/src/inputprocessor.cc +++ b/src/inputprocessor.cc @@ -28,7 +28,7 @@ #include <list> -#include "hugin.hpp" +#include <hugin.hpp> #include "instrument.h" @@ -133,6 +133,7 @@ bool InputProcessor::processOnset(event_t& event, } } + auto orig_level = event.velocity; for(auto& filter : filters) { // This line might change the 'event' variable @@ -152,6 +153,11 @@ bool InputProcessor::processOnset(event_t& event, return false; } + auto selected_level = + (sample->getPower() - instr->getMinPower()) / + (instr->getMaxPower() - instr->getMinPower()); + settings.velocity_modifier_current.store(selected_level / orig_level); + for(Channel& ch: kit.channels) { AudioFile* af = sample->getAudioFile(ch); |