diff options
Diffstat (limited to 'plugin/drumgizmo_plugin.cc')
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 67436af..40121e2 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -372,34 +372,8 @@ void DrumGizmoPlugin::Input::run(size_t pos, size_t len, std::vector<event_t>& e for(auto& event : *plugin.input_events) { - switch(event.type) - { - case MidiEventType::NoteOn: - { - int i = mmap.lookup(event.key); - if(event.velocity != 0 && (i != -1)) - { - events.push_back({EventType::OnSet, (size_t)i, - (size_t)event.getTime(), event.velocity / 127.0f}); - } - } - break; - - case MidiEventType::Aftertouch: - { - int i = mmap.lookup(event.key); - if(event.velocity == 0 && i != -1) - { - events.push_back({EventType::Choke, (size_t)i, - (size_t)event.getTime(), .0f}); - } - } - break; - - case MidiEventType::NoteOff: - case MidiEventType::Unknown: - break; - } + processNote((const std::uint8_t*)event.getData(), event.getSize(), + event.getTime(), events); } } |