integrate midi input, fix repeat tag

start movign midi_input into main app, and fix the repeat tag.