From 1f7d744819968aec3c82035f730558cb73e0bd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 26 Jul 2019 00:25:30 +0200 Subject: Add support for normalized samples in the engine. This is untested and also the part of the parser is missing. --- src/inputprocessor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/inputprocessor.cc') diff --git a/src/inputprocessor.cc b/src/inputprocessor.cc index 819a3c7..eb45f4b 100644 --- a/src/inputprocessor.cc +++ b/src/inputprocessor.cc @@ -207,9 +207,14 @@ bool InputProcessor::processOnset(event_t& event, else { //DEBUG(inputprocessor, "Adding event %d.\n", event.offset); - Event* evt = new EventSample(ch.num, 1.0, af, instr->getGroup(), + auto evt = new EventSample(ch.num, 1.0, af, instr->getGroup(), instrument_id); evt->offset = (event.offset + pos) * resample_ratio; + if(settings.normalized_samples.load()) + { + evt->scale *= event.velocity; + } + activeevents[ch.num].push_back(evt); } } -- cgit v1.2.3