I recently made two renditions of some rhythmic canons modulo 2, which I’ve posted on Youtube, and I’d like to post about the details behind these. There won’t be much math, except to recall what we’ve already seen in previous posts, in particular here.

Recall that, given a motif as a subset of the integers, which we can express as a polynomial , a rhythmic canon modulo 2 is the data of a subset of the integers , which we can also express as a polynomial , and (the length) such that we have

in

This means that on each beat, there is only an odd number of voices playing. It turns out that given any there always exists such an and . For example, if , or equivalently , tiles with length 21 and , as represented on the diagram below.

But as you can see, this means that this short motif needs 11 voices to make a canon, and most of the time each voice will be silent. If you look at the formula above, you’ll notice that we can swap and : the pattern of entries becomes the motif, and the motif becomes the entries, meaning that we need only three voices for the canon, as shown below.

This meant that I could choose a given number of voices and a pattern for how these voice should enter in the canon, swap it so that this pattern is now the motif and calculate the corresponding entries, then swap back the result to get the canon. But quite often with rhythmic canons, the length quickly become enormous. So I had two constraints: get a reasonable length, and have voices which would be playing most of the time instead of being mostly silent.

I considered all rhythmic canons modulo 2 with three to six voices where the voice would enter at the 20th beat maximum, and calculated the length and corresponding motif. Since I wanted the motif to be playing most of the time, I calculated the ratio between the maximum of the motif to the length of the canon. This gave me the figure below, in which each point represents a rhythmic canon, with the ratio on the x-axis, and the log of the length on the y-axis.

As expected, the length of these canons can be huge, so I searched for interesting rhythmic canons with length less than 60. I finally settled on a first rhythmic canon with motif which tiles with length 35 with five voices, entering at beat 0, 1, 3, 4, and 7, as shown below.

I was particularly interested by the fact that we only have one or three voices playing on each beat, except at beat 27 where all five voices play. I chose a different instrument for each voice, and to make the rendition more interesting, I decided to give different accentuations to each voice so that specific group of three voices would be heard prominently. In addition, there is a particular accentuation for when all five voices are playing at the same time. This is what you can hear on the video I made below.

Another canon which I considered is the one with motif , which tiles with length 31, with five voices entering at beat 0, 1, 7, 9, and 10, as shown below.

The fact that the voices enter at very different times (one group of two voices at beat 0 and 1, the three remaining much later at beat 7, 9, and 10) creates an interesting result, where we have distinct patterns at the beginning and at the end, and a complex one in the middle. This time, I did not play with the accentuation, but set myself the constraint to use only instruments which would come from a drum set. In each of the two group of voices, there is one cymbal and one or more drums. Here is the corresponding rendition.

All the renditions were made by algorithmically generating the MIDI file and playing it through a sampler with sounds I recorded myself.

There are many other possibilities to try: other motifs, canons modulo p where p is any prime, ‘dual’ canons modulo 2 (where the number of voices playing on each beat is even, as I explained briefly here) !