Continued fractions, best measurements, and musical scales and intervals