don't take temporary copy of MIDI sequence

fixes potential boost shared_ptr double free.