diff --git a/a2jmidid.c b/a2jmidid.c index c090fec..6059ca8 100644 --- a/a2jmidid.c +++ b/a2jmidid.c @@ -66,6 +66,7 @@ static bool g_started = false; struct a2j * g_a2j = NULL; size_t g_max_jack_port_name_size; bool g_disable_port_uniqueness = false; +bool g_filter_note_on = true; bool g_a2j_export_hw_ports = false; char * g_a2j_jack_server_name = "default"; @@ -427,7 +428,7 @@ void a2j_help( const char * self) { - a2j_info("Usage: %s [-j jack-server] [-e | --export-hw] [-u]", self); + a2j_info("Usage: %s [-j jack-server] [-e | --export-hw] [-u] [-n]", self); a2j_info("Defaults:"); a2j_info("-j default"); } @@ -485,6 +486,9 @@ main( case 'u': g_disable_port_uniqueness = true; break; + case 'n': + g_filter_note_on = false; + break; default: a2j_help(argv[0]); return 1; diff --git a/jack.c b/jack.c index ae1a160..ef8c8be 100644 --- a/jack.c +++ b/jack.c @@ -36,6 +36,7 @@ #include "port_thread.h" static bool g_freewheeling = false; +extern bool g_filter_note_on; /* * =================== Input/output port handling ========================= @@ -176,7 +177,7 @@ a2j_input_event( } // fixup NoteOn with vel 0 - if ((data[0] & 0xF0) == 0x90 && data[2] == 0x00) { + if (g_filter_note_on && (data[0] & 0xF0) == 0x90 && data[2] == 0x00) { data[0] = 0x80 + (data[0] & 0x0F); data[2] = 0x40; } diff --git a/man/a2jmidid.1 b/man/a2jmidid.1 index 432e0a5..a686a5b 100644 --- a/man/a2jmidid.1 +++ b/man/a2jmidid.1 @@ -3,7 +3,7 @@ .SH NAME a2jmidid \- JACK MIDI daemon for ALSA MIDI .SH SYNOPSIS -.B a2jmidid [-j jack-server] [e | --export-hw] +.B a2jmidid [-j jack-server] [e | --export-hw] [-u] [-n] .SH DESCRIPTION a2jmidid is a daemon that implements automatic bridging. For every ALSA sequencer port you get one JACK midi port. If ALSA sequencer port is @@ -16,6 +16,8 @@ forces a2jmidid to bridge hardware ports as well as software ports forces a2jmidid to generate non-unique port names (see NOTES) .IP -j specifies which jack-server to use +.IP -n +do not filter note on .SH NOTES ALSA does not guarantee client names to by unique. I.e. it is possible to have two apps that create two clients with same ALSA client name.