dsacre/mididings

NoteOn with zero velocity are discarded

Opened this issue · 7 comments

The documentation mentions: "When sending events through a MIDI output port, or by using the Sanitize() unit, velocities greater than 127 will automatically be reduced to 127, and events with a velocity less than 1 will be removed."
This is a problem with AKAI control surfaces which use a MIDI note on with zero velocity for turning LEDs off.
Please provide a way for zero velocity note ons to pass through (either by a compile flag, by a runtime option, or by a function argument).
Thank you!

I struggled with this problem too; I use mididings on a project of mine and it involves transforming midi events, which is a problem when 0 velocity note events occur.
A runtime option or function argument would be nice, indeed.

@MaurizioB I've commented out lines 395-397 in src/engine.cc and now I can send NoteOn events with zero velocity.

@muranyia Thanks, I wouldn't have been able to find it. I'll try it as soon as possible.

I got this issue too. I'm trying to find a way to write a proper driver for my Akai midimix... but I need to send event with 0 velocity

Hey guys, I did a quick fix for this. See https://github.com/lcoenen/mididings/tree/akai_fix

Nice. Maybe it would be better to change the option name to something more generic, like accept_mute_notes.

I just stumpled upon this problem, too. I see no reason to discard NoteOn with velocity=0, this is a normal MIDI message, like any other (and equivalent to NoteOff). My fix just changes the sanitize() code to remove NoteOns that are outside of specification, that is < 0, not < 1.
mcvsama@9839d62