The written quality of the music has enabled a high level of complexity within them: J.S. Bach's fugues, for instance, achieve a remarkable marriage of boldly distinctive melodic lines weaving in counterpoint yet creating a coherent harmonic logic that would be impossible in the heat of live improvisation.