(a) Example of canon, from “Ach, Gott und Herr,” BWV 724, mm. 3844 (dotted line marks canonic imitation); (b) example of fugue, from “Machs mit mir, Gott,” BWV 957, mm. 14 (asterisks mark notes of the chorale melody)