Yeah, upgrading to Mavericks (the day it came out), and using MB 6.0 made no difference on the sound issues. BUT, changing the audio frequency did. It's been working great now for weeks. It's not your MIDI settings, but it's in the "AUDIO MIDI SETUP" settings, which is one app that located in your utilities folder (near Disk Utility).
-Find your output that is "lit-up" with a finder-like logo.
-Adjust the FORMAT: frequency. Try a different one than what you've been using (3 choices).
I have not noticed a difference in sound, other than that the distortion has completely disappeared. Hopefully, we'll get to the root of the issue, as sound worked perfectly for so long, with "vanilla" audio settings.