I was recently shown this interesting little tool on the interwebs that will take any piece of music, analyze it, and find the best logical loop point. It works pretty well with normal songs (with lyrics and whatnot) so I figure it could be pretty helpful with looping chiptunes or other midi file stuff.
Link:
Infinite JukeboxP.S. It's a bit finicky about the browser you use. I think it is most compatible with Chrome and Safari.