moved midi serial code to a separate library