major redesign of MIDI port heirarchy and management

basic, very flaky functionality is back. program unstable at present
major redesign of MIDI port heirarchy and management (part 2)