Solved bugs with midifile creation and playback