summaryrefslogtreecommitdiff
path: root/test/dgreftest
diff options
context:
space:
mode:
authorSander Vocke <sandervocke@gmail.com>2024-07-23 12:22:30 +0200
committerSander Vocke <sandervocke@gmail.com>2024-07-23 12:22:30 +0200
commit23f625be77c925569dfea8700103aff89d513b50 (patch)
treee9e794b31b3314bafc856c8da9c6eb0733e10eb7 /test/dgreftest
parentddd12cae8a21eba52a4d8fae9dced18878e0e055 (diff)
Add openness CC control for hi-hats.distance_openness
Diffstat (limited to 'test/dgreftest')
-rw-r--r--test/dgreftest/midiinputengine.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/dgreftest/midiinputengine.cc b/test/dgreftest/midiinputengine.cc
index dbffec9..6cab307 100644
--- a/test/dgreftest/midiinputengine.cc
+++ b/test/dgreftest/midiinputengine.cc
@@ -143,6 +143,7 @@ void MidifileInputEngine::run(size_t pos, size_t len, std::vector<event_t>& even
current_event = smf_get_next_event(smf);
}
+ // TODO: handle CC
while(current_event && current_event->time_seconds < current_max_time)
{
if(!smf_event_is_metadata(current_event))
@@ -155,7 +156,8 @@ void MidifileInputEngine::run(size_t pos, size_t len, std::vector<event_t>& even
int key = current_event->midi_buffer[1];
int velocity = current_event->midi_buffer[2];
- auto instruments = mmap.lookup(key);
+ auto entries = mmap.lookup(key, MapFrom::Note, MapTo::PlayInstrument);
+ auto instruments = mmap.lookup_instruments(entries);
for(const auto& instrument_idx : instruments)
{
events.emplace_back();