Almost maximally even grooves

Maximal evenness is a common property of rhythmic timelines, especially in Latin America and sub-Saharan Africa, and is yet largely unknown in the wider drumming community. Put simply, a maximally even rhythm is one in which the number of onsets, or attack points, is distributed as evenly as possible among the pulses. For example, distributing 4 onsets among 8 pulses as evenly as possible is as simple as playing once every two beats [x.x.x.x.]. Conversely, [xxxx....] is a perfectly uneven rhythm because the four onsets are now clustered as closely as possible within the 8-pulse grid.

Musical rhythms, however, have varying degrees of evenness, and one example of this variability is what Toussaint (2020) calls an almost maximally even rhythm, defined as a slight mutation of an even rhythm by “snapping” each onset to the nearest point. And unlike isochronous rhythms, which are produced from a perfectly even set of onsets, interesting rhythms have less regularity and more asymmetry, which perhaps explains why popular rhythms like the son clave are not even but almost even.

More specifically, “the family of almost maximally even rhythms is made up of rhythms obtained by all combinations of snapping intersection points to both, the nearest right and the nearest left pulses” (Toussaint, 2020 p. 150). This means that a maximally even rhythm created from 5 onsets and 16 pulses, for example, would require an interval of duration 3.2 between onsets (that is 16 divided by 5), so the respective position of each onset would be 0, 3.2, 6.4, 9.6, 12.8. Now snapping each interval to the nearest pulse yields 0, (3,4), (6,7), (9,10), (12,13) as shown in Figure 1 and from which a set of almost maximally even rhythms can be created. Note that now we have a few more rhythmic possibilities starting with 0, 3, 6, 9, 12 which can also be expressed as a list of durations [33334].

Snapping points to the nearest left and right pulses
Figure 1: Snapping points to the nearest left and right pulses

Now to generate these rhythms programmatically we need a function that returns the approximate position of all onsets given N onsets and K pulses.

(defun onsets (n k)
  "Return a list of positions given N onsets and K pulses."
  (let ((interval (/ (float k) n))
        (delta 0))
    (append (list (list 0))
            (mapcar (lambda (_)
                      (setq delta (+ delta interval))
                      (list (floor delta)
                            (ceiling delta)))
                    (make-list (1- n) 0)))))

(onsets n k)

We also have to compute the Cartesian product of the result, namely 0, (3,4), (9,10), (12,13), so that only one approximation is used at a time.

(defun cartesian-product (list)
  (if (null list)
      (list nil)
    (cl-loop for i in (car list)
             append (cl-loop for j in (cartesian-product (cdr list))
                             collect (cons i j)))))

(cartesian-product (onsets n k))
0 3 6 9 12
0 3 6 9 13
0 3 6 10 12
0 3 6 10 13
0 3 7 9 12
0 3 7 9 13
0 3 7 10 12
0 3 7 10 13
0 4 6 9 12
0 4 6 9 13
0 4 6 10 12
0 4 6 10 13
0 4 7 9 12
0 4 7 9 13
0 4 7 10 12
0 4 7 10 13

Finally, to generate all 16 possibilities using box notation, we simply pipe the results to the rhythms function, which creates a 16-pulse grid and adds the onsets accordingly.

(defun rhythms (n k)
  "Return all almost maximally even rhythms from N and K."
  (let (almost-even
        (list (cartesian-product (onsets n k))))
    (dolist (sublist list)
      (let ((pulses (make-list k ".")))
        (dolist (elt sublist)
          (setf (nth elt pulses) "x"))
        (push (mapconcat #'identity pulses "") almost-even)))
    (setq almost-even (seq-map-indexed
                       (lambda (elt idx)
                         (format "%2d. %s" (1+ idx) elt))
                       almost-even))
    (mapconcat #'identity almost-even "\n")))

(rhythms n k)
 1. x...x..x..x..x..
 2. x...x..x..x.x...
 3. x...x..x.x...x..
 4. x...x..x.x..x...
 5. x...x.x...x..x..
 6. x...x.x...x.x...
 7. x...x.x..x...x..
 8. x...x.x..x..x...
 9. x..x...x..x..x..
10. x..x...x..x.x...
11. x..x...x.x...x..
12. x..x...x.x..x...
13. x..x..x...x..x..
14. x..x..x...x.x...
15. x..x..x..x...x..
16. x..x..x..x..x...

These are all “good” rhythms generated using only two integers. Now the question is can and should notions of evenness be addressed in percussion pedagogy and, more specifically, applied to the studies of groove? A groove can be defined as a repeated rhythmic pattern that (often but not always) characterises a certain style of music. A groove is also not necessarily aligned with a mathematical grid from which Western music notation is based, but has a certain feel and motion to it that makes it enjoyable and easy to tap to, or perhaps not so easy depending on the groove. This one for instance is almost even [x.xxx.x.xx.], but can you tap its rhythm?

Here’s a follow-up to this article.

References

Godfried Toussaint. The geometry of musical rhythm: What makes a “good” rhythm good?, CRC Press, 2020.

🏷️ percussion, music programming