More improvements to Midi in and out.