From 0e59f90e2396190ec3e3a7195bac9c79e12fd6cc Mon Sep 17 00:00:00 2001 From: Sander Vocke Date: Tue, 23 Jul 2024 13:23:38 +0200 Subject: Add CC-controller openness parameter for hi-hats. --- plugin/drumgizmo_plugin.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'plugin') diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 7960763..e582f93 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -410,16 +410,23 @@ bool DrumGizmoPlugin::Input::loadMidiMap(const std::string& file, bool result = AudioInputEngineMidi::loadMidiMap(file, i); std::vector> midnam; + // Create MIDNAM mappings. + // FIXME: Can CC entries somehow be added to the MIDNAM file? + // For now, limiting this to note mappings. const auto& midimap = mmap.getMap(); std::map map; for(const auto& entry : midimap) { - // in case of multiple instruments mapped to one note, use '/' as separator - if(!map[entry.note_id].empty()) + if(entry.from_kind == MapFrom::Note && + entry.to_kind == MapTo::PlayInstrument) { - map[entry.note_id] += "/"; + // in case of multiple instruments mapped to one note, use '/' as separator + if(!map[entry.from_id].empty()) + { + map[entry.from_id] += "/"; + } + map[entry.from_id] += entry.instrument_name; } - map[entry.note_id] += entry.instrument_name; } midnam.reserve(map.size()); -- cgit v1.2.3