diff options
author | André Nusser <andre.nusser@googlemail.com> | 2019-07-26 00:25:30 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-10-14 22:04:13 +0200 |
commit | 1f7d744819968aec3c82035f730558cb73e0bd18 (patch) | |
tree | a899777609cfc7740638ab66998ca06fa2cfca6b /src/inputprocessor.cc | |
parent | c4397e38f1ba24993445867791ccd61b4bd1b0f8 (diff) |
Add support for normalized samples in the engine.
This is untested and also the part of the parser is missing.
Diffstat (limited to 'src/inputprocessor.cc')
-rw-r--r-- | src/inputprocessor.cc | 7 |
1 files changed, 6 insertions, 1 deletions
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); } } |