Skip to content

Commit

Permalink
Parse 0-valued note ons as note offs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfd committed Jan 17, 2022
1 parent a661569 commit 3800714
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clients/sfizz_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ void midiCallback(const fmidi_event_t * event, void * cbdata)
data->synth.noteOff(data->delay, event->data[1], event->data[2]);
break;
case midi::noteOn:
data->synth.noteOn(data->delay, event->data[1], event->data[2]);
if (event->data[2] == 0)
data->synth.noteOff(data->delay, event->data[1], event->data[2]);
else
data->synth.noteOn(data->delay, event->data[1], event->data[2]);
break;
case midi::polyphonicPressure:
break;
Expand Down

0 comments on commit 3800714

Please sign in to comment.