The shifted difference between the BIAB song playback and the MIDI I just recorded is heard using the headphone out of the XV-2020. I didn't try to listen to it output from the PC.

Maybe this isn't a latency issue, but something else that should be corrected using track offset or timeshift. Do I adjust track offset on what I've recorded, or maybe timeshift the melody? Have you used those options, and if so, to correct what problems?