This article deals with the discovery of repeated patterns and their variations in a discrete representation of musical data. This task consists in identifying repetitions within a set of points in \(\mathbb {R}^2\) , where each point represents a musical note whose coordinates are its onset and its pitch value. A common approach is to compute all the possible translations between points in order to discover repeated musical patterns. In this paper, we propose to start from specific subsets of points and to complete them by using morphological operations to form repeated patterns. Moreover, these operations can be extended to discover pattern variations given a particular approximation. This method not only reveals certain variations of the given subset of points, but also adds specific points to it despite the fact that they were not initially present. We apply our approach to the collection of 24 fugues from the first book of Bach’s Well-Tempered Clavier. In this particular case, we consider the first m points as the subset to be completed by the morphological operators. We demonstrate that specific values of m enable the discovery of the subject and its occurrences, whereas the smallest values identify truncated versions of it. We compare our approach with previous work on the analysis of Bach’s fugues and illustrate the results for different values of m with graphical representations including both exact and approximate repetitions.