midi input filter - prevents bottlenecking of incoming midi messages
fixed a threading problem during shutdown