summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2020-04-04 10:24:02 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-04-04 13:27:08 +0200
commit22d2d946da85e513b67affc87dfef2b42ded3b27 (patch)
tree11b0fba6c0bc5287bed1c8fe609ca1d088d110dd
parentae7cc5ac447b1676a039b1c83a5e75436e151958 (diff)
Converting NoteOn with velocity 0 to Choke events.
-rw-r--r--src/audioinputenginemidi.cc2
1 files changed, 1 insertions, 1 deletions
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;