From 23f625be77c925569dfea8700103aff89d513b50 Mon Sep 17 00:00:00 2001 From: Sander Vocke Date: Tue, 23 Jul 2024 12:22:30 +0200 Subject: Add openness CC control for hi-hats. --- test/dgreftest/midiinputengine.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/dgreftest') 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& 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& 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(); -- cgit v1.2.3