ongoing refactoring. Bring back some MIDI API to implemented state.