From 22d2d946da85e513b67affc87dfef2b42ded3b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 4 Apr 2020 10:24:02 +0200 Subject: Converting NoteOn with velocity 0 to Choke events. --- src/audioinputenginemidi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audioinputenginemidi.cc b/src/audioinputenginemidi.cc index 0714546..ce3ce18 100644 --- a/src/audioinputenginemidi.cc +++ b/src/audioinputenginemidi.cc @@ -125,7 +125,7 @@ void AudioInputEngineMidi::processNote(const std::uint8_t* midi_buffer, break; case NoteOn: - if(instrument_idx != -1) + if(velocity != 0 && instrument_idx != -1) { // maps velocities to [.5/127, 126.5/127] auto centered_velocity = (velocity-.5f)/127.0f; -- cgit v1.2.3