From f520e84d8be8018556a93fcf4a894403be829423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 13 Feb 2021 11:42:11 +0100 Subject: Initial compiling version of sample selection with position. --- src/inputprocessor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/inputprocessor.cc') diff --git a/src/inputprocessor.cc b/src/inputprocessor.cc index 4bafb1d..9fcff65 100644 --- a/src/inputprocessor.cc +++ b/src/inputprocessor.cc @@ -244,7 +244,8 @@ bool InputProcessor::processOnset(event_t& event, std::size_t pos, auto const power_min = instr->getMinPower(); float const power_span = power_max - power_min; float const instrument_level = power_min + event.velocity*power_span; - const auto sample = instr->sample(instrument_level, event.offset + pos); + // FIXME: bad variable naming of parameters + const auto sample = instr->sample(instrument_level, event.position, event.offset + pos); if(sample == nullptr) { -- cgit v1.2.3 From 7cd15102c30398f952196cfdfb42f90661762e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 13 Feb 2021 13:17:39 +0100 Subject: Add position filter. --- src/inputprocessor.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/inputprocessor.cc') diff --git a/src/inputprocessor.cc b/src/inputprocessor.cc index 9fcff65..a883286 100644 --- a/src/inputprocessor.cc +++ b/src/inputprocessor.cc @@ -36,6 +36,7 @@ #include "powermapfilter.h" #include "staminafilter.h" #include "velocityfilter.h" +#include "positionfilter.h" #include "cpp11fix.h" @@ -93,6 +94,7 @@ InputProcessor::InputProcessor(Settings& settings, filters.emplace_back(std::make_unique(settings)); filters.emplace_back(std::make_unique(settings, random)); filters.emplace_back(std::make_unique(settings, random)); + filters.emplace_back(std::make_unique(settings, random)); filters.emplace_back(std::make_unique(settings, original_velocity)); } -- cgit v1.2.3