Constructing a scale already means “iterating intervals”: fifths for the Pythagorean scale (see *La gamme pythagoricienne*), fifths and thirds for Zarlino’s scale in the 16th century, and equally spaced semitone steps for the well-tempered scale, perhaps exemplified in the 18th century by Johann Sebastian Bach’s Clavecin bien tempéré. Composers subsequently—the word is apt—went much further, applying genuine geometric transformations to an initial theme to create canons, or extending it through distinctive forms of repetition, as in contemporary minimalist music, aptly described as repetitive. Other contemporary compositions depend entirely on arithmetic sequences or unexpected iterative processes.
Classical music: various iterations ---------------------------------------
A basic example of iteration is the canon, a musical structure in which a theme sung by one voice (the dux) is taken up in any number of ways by another (the comes). It may simply be a strict canon, in which the material is repeated unchanged: the voices, singing a melody described over time by the function M(t), enter at regular time intervals (d), perhaps transposed by a given interval (h). Thus, if M1 is the melody of the first voice at time t, and M2 that of the second, then M2(t) = M1(td) + h. Typically, in the sequence of pieces that make up Bach’s celebrated Offrande musicale, the so-called "royal" theme—so named because some attribute it to Frederick II of Prussia, himself a flautist and composer—is treated differently in each piece. It may, for instance, be taken up after ten bars (d) and at an interval of a fifth (h).

The royal theme from Johann Sebastian Bach’s Offrande musicale.