A self-similar map of rhythmic components

This paper defines a collection of rhythmic building blocks produced by generative operations that fuse metrical anticipation and parallelism. It connects aspects of musical expectation with Arthur Komar's constraints on the generation of rhythmic derivations. A correspondence between those constraints and the divisibility of binomial coefficients is used to map derived rhythmic elaborations and syncopations separately onto Pascal's triangle and jointly onto the Sierpinski gasket. This mapping provides concise means to directly enumerate and compare rhythmic configurations. An Online Supplement provides musical examples and discusses potential applications. It can be accessed at http://dx.doi.org/10.1080/17459737.2015.1136001.


Introduction
Musical prediction and coherence have been analyzed from many angles since Leonard B. Meyer wrote that "Embodied musical meaning is, in short, a product of expectation" (Meyer, 1956, 35). One area of focus has been the role that rhythm and meter play as a listener makes sense of music. Some outcomes of that focus will be used here to define a practical low-level approach to understanding particular rhythmic features, with potential applications in musical analysis and algorithmic composition.
In Sweet Anticipation: Music and the Psychology of Expectation, David Huron describes musical meters as "predictive schemas for temporal events," embodying the "tendency to apply hierarchical temporal schemas for predicting recurring event onsets" (Huron, 2006, 197).
"A note onset in a weak metric position increases the probability that an ensuing note will occur at the next stronger metric position. Syncopation, by contrast, occurs when this heuristic is broken. Syncopation occurs whenever a note onset fails to occur at the next higher metric position" (Huron, 2006, 295).
Fred Lerdahl and Ray Jackendoff in A Generative Theory of Tonal Music (hereafter GTTM ) stress that "The importance of parallelism in musical structure cannot be overestimated. The more parallelism one can detect, the more internally coherent an analysis becomes, and the less Specific assumptions in effect throughout this paper are as follows.
(1) An attack at a relatively weak beat raises the expectation of an attack on the next stronger beat.
(2) Attacks are more likely to occur, overall, on relatively stronger beats.
(3) A relatively long note is perceived to occur on a relatively strong beat, all other things being equal. (4) Repetition enhances predictability.
No new evidence supporting or refining these assumptions is provided here; the goal is rather to encapsulate them within a concise, precise formulation that generalizes relevant characteristics and comparisons. A substantial overview of related research and theories is not given, as there is no attempt here to refine or undermine their conclusions.

Domain
The domain of this discussion is limited to rhythmic passages in strictly binary meter. We hope that the musical relationships and mathematical connections can be extended to triple meter, but that is beyond the scope of this paper. A standard notion of binary meter is intended, with nested, strictly alternating strong and weak pulses that are equally spaced at each metrical level. GTTM metrical well-formedness rules MWFR 1-4 capture this definition (Lerdahl and Jackendoff, 1983, 97). Only events that fall on a pulse at some metrical level are under consideration, excluding, for example, triplet figures or grace notes.
Although this is a significant limitation, binary meter has sufficiently wide usage to constitute a worthwhile domain. Huron has found that "in Western classical music there exists a preference for binary beat groupings and a marked preference for binary beat subdivisions" (Huron, 2006, 295). Clearly, much popular music, including most rock, hip-hop, and electronic dance music (EDM), has binary meter.
Meter induction, beat tracking, tempo curves, and expressive timing are not goals of this discussion. Musical pitch is not addressed, only attack patterns.
The musical term anticipation is used broadly here to mean any attack on a relatively weak beat, thereby raising expectation of an attack at the next stronger beat. For example, in this usage a half note that occupies the second half of a bar of 4 4 may be considered an anticipation of the next downbeat.
Musical contexts under consideration will generally be short, one-or two-bar segments of 4 4 with eighth or sixteenth note values as the shortest event durations. Significantly longer passages are not presumed to fully benefit from the approach outlined here, because, as noted by GTTM, "Metrical structure is a relatively local phenomenon" (Lerdahl and Jackendoff, 1983, 21). Syncopation as defined by Huron (Huron, 2006, 295) relies on the prevalence of local meter, and so it is naturally constrained in its effectiveness to shorter passages. The quarter note tactus is given no special attention here other than to note that this is more or less the central metrical unit with, for instance, two higher levels and two lower levels in one bar of 4 4 at sixteenth note resolution.

Looping musical contexts
Repetition is the implied context of the rhythmic configurations described here. For instance, an anticipation at a particular metrical level will often appear after the relatively stronger beat with which it is associated, as shown throughout Figure 1. The characterization of internal patterns as well as the modular arithmetic used to map those patterns is more explanatory for repeated rhythms than it is for through-composed continual rhythmic development.
Musical passages that form loops are not uncommon. Huron states that "In the mental coding for music, veridical expectations tend to be linked into circular patterns where the end of the pattern points to its own beginning" (Huron, 2006, 231). Loops are especially prevalent in the construction of much electronic dance music (Butler, 2003, 103).
Throughout this discussion, a looping context within n binary metrical levels implies a time span with 2 n equal time divisions. The position of each of those time divisions is an equivalence class belonging to Z/2 n Z.

A hierarchy of rhythmic components
To recapitulate, rhythmic anticipation and parallelism, being key ingredients of musical expectancy and coherence, are important features of rhythmic organization. The goal here is to enable systematic, and algorithmically tractable, access to rhythmic components that encapsulate these features, based on constraints that will be enumerated shortly, in order to dissect and compare actual rhythms. This approach has affinity to the simplicity principle invoked by Andranick Tanguiane, which he claims "justifies hierarchical data representations as saving memory and provides the cues for finding optimal hierarchies for the data representation, corresponding to perception patterns" (Tanguiane, 1993, 11). For these purposes, a hierarchy will be defined here of rhythmic components that consist of either (1) a single attack on the initial downbeat, or (2) an attack pattern derived from a simpler pattern, which may in turn be derived from another, and so on until reaching the component described by (1).
A stance on whether generative hierarchies reveal musical deep structure is left to higher level theories such as Komar's and GTTM. These components are not claimed to capture higherlevel structures such as melodies, motives, and riffs. Salient musical features may go against the grain of these building blocks in many cases. These rhythmic configurations may overlap others; that is, they freely violate GTTM 's metrical well-formedness rule GWFR 1, which stipulates that "only contiguous elements can constitute a group" (Lerdahl and Jackendoff, 1983, 37). An actual rhythm may be the union of a number of these components; a rhythmic complexity measure proposed in Section 2.2 of the Online Supplement alludes to such unions.
Rhythmic operations that produce these components will be defined after theoretical context for key aspects of those operations is provided. Ultimately, the hierarchy of all such components will be shown to express a geometric, approximately fractal, shape that reflects the recursive tree structure between and within those rhythmic components.

Komar's constraints on rhythmic derivation
The specific structures and operations described in this paper were suggested in part by aspects of a broader generative theory described in Arthur Komar's Theory of Suspensions (Komar, 1971). It is not claimed that the approach defined in this paper reflects the broader aims of his theory of musical counterpoint. In particular, the relationship of pitch to evolving rhythmic structure is not addressed.
Nevertheless, the specific constraints that Komar outlines as a basis for rhythmic derivation suggested the connection drawn in this paper between rhythmic structure and the parity of binomial coefficients. Some brief background on that aspect of his theory is given here. Operations will be defined in Section 4.2 that tighten key aspects of those constraints into a systematic approach.
According to Komar, Schenker accounted for the element of pitch by formulating a system in which pitches are derived by means of a limited number of tonal operations applied successively through a series of progressively more elaborate levels. (Komar, 1971, 4) Komar proposes a similar type of analysis for rhythm.
What is needed for the element of rhythm is a corresponding formulation for generating rhythmic values -or at least for providing some basis for deriving ultimate rhythmic values -from background note configurations. (Komar, 1971, 4) Komar outlines a succession of musical operations where new events are generated or deleted in each time span via rhythmic operations on a more generic background version of that time span. These operations are largely defined by constraints on rhythmic displacements that can be applied to particular notes at a given metrical level. Komar defines the following constraint on the placement of new notes at each stage of rhythmic elaboration.
The set of metrical levels which arises in connection with the generation of a note in a given time-span governs the placement of further notes to be generated within that time-span. [...] Where a given note is generated in the nth equal part of a given time-span, other notes can be subsequently generated only in portions of that time-span where the initial time-point and strongest beat thereof coincide. (Komar, 1971, 55). This constraint stipulates that newly generated attacks, when viewed as derivations of attacks in a background rhythmic configuration, articulate one additional metrical level at a time. A newly generated note whose attack is weaker than other points within its time span does not make sense as a single derivational step.
A related constraint applies to displacements used when generating new attack points. According to Komar, [...] syncopation arises through the application of rhythmic operations which either extend a note backward or forward into an adjacent time span. [...] Once a note is shifted into a syncopated time-span, operations can be applied in that time-span, providing that none of the one or more newly generated notes itself occupies a syncopated time-span. (Komar, 1971, 57-58) When applied to binary meter, this suggests that successive derivations incorporate displacements at mutually exclusive metrical levels. In other words, syncopation of a syncopation at the same metrical level is akin to a double negative, not a meaningful formulation for a rhythmic derivation. We will focus here only on operations that displace a note forward in time. That is because our goal is to map low-level elements of musical expectation, which are characterized by anticipations more so than by relatively refined operations such as suspensions and appoggiaturas. Figure 2 shows how particular rhythms might emerge from the derivations described by Komar. The arrows between boxes trace successive derivations from background configurations to foreground ones. At each step an additional attack has been added, displaced in time from an existing attack, as shown by the arrow within the box. In accordance with Komar's constraints, in each case no stronger beat occurs between each new attack and the attack from which it was displaced.

Rhythmic derivations
A rhythmic derivation under Komar's constraints, confined to forward displacements, articulates each metrical level in one of three ways. At any metrical level m and for a generated rhythm x there are three potential operations: (1) shift the rhythm x one unit earlier at metrical level m; (2) shift x one unit earlier at m and combine the result with the original rhythm x; (3) leave x unchanged.
Komar's constraints on rhythmic derivations are observed if exactly one of those three operations is applied at each metrical level. Additionally, internal structure within each derived rhythm exhibits parallelism, because generated attacks are always an exact copy of all existing attacks, potentially shifted in time.
We will call the three rhythmic operations described above d-operations. In order to formalize these rhythmic operations it is convenient to notate each rhythm as a series of "x"s and "o"s representing pulses with and without attacks respectively. This representation captures attack patterns without specifying anything about durations and makes it possible to represent any rhythm with a unique binary number, by associating "x"s with 1s and "o"s with 0s. This binary representation is used in the following formal definition of a d-operation.
Definition 4.1 (Formalization of d-operations). Let x be a rhythm, let n be the number of metrical levels, and let m < n be some metrical level, where 0 is the lowest metrical level. Then the syncopation of x at metrical level m is the elaboration of x at metrical level m is and the unmodified version of x is At each metrical level one and only one of these three operations is applied. 1 Syncopation results when d-operation s shifts one or more attacks onto a relatively weaker metrical position. An example is shown in Figure 3. Arthur Komar defines syncopation as "a time-span which contains a stronger beat within it than at its beginning" (Komar, 1971, 57). This is a more specific formulation of the general notion of syncopation as "momentary contradiction of the prevailing meter or pulse" (Randel, 1986, 861). David Temperley, in The Cognition of Basic Musical Structures, states a compatible rule: Syncopation Shift Rule. In inferring the deep representation of a melody from the surface representation, any event may be shifted forward by one beat at a low level. (Temperley, 2001, 243)  Deletion of the old attack and retention of the new creates the rhythmic context described by these definitions.
Elaboration results when both old and new attacks are combined in the derived rhythm, via d-operation e. An example is shown in Figure 4. Elaboration is here taken to mean strict addition of attacks, as defined by Andranick Tanguiane, after Mont-Reynaud and Goldstein (Tanguiane 1993, 144;Mont-Reynaud and Goldstein 1985, 394-395).
Rule 5 (Elaboration) Rhythmic pattern A is the elaboration of rhythmic pattern B if A preserves the pulse train of B, i.e. if A results from a subdivision of durations of B by inserting additional time events. (Mont-Reynaud and Goldstein, 1985) 1 Expressing the definitions of syncopation and elaboration in terms of bitwise operators may provide a more intuitive link to the shifting and grouping of rhythmic attacks. In that case the syncopation of x is where the vertical bar "|" represents bitwise OR.  Recall that the ultimate background rhythmic configuration for all rhythmic components described here consists of a single attack on an initial downbeat. An attack can be shifted at most once at each metrical level; it is never the case that an attack is shifted onto an existing attack or onto a relatively stronger beat. Each shift at metrical level m is a move forward in time by 2 m pulses of the lowest metrical level, and since the powers of 2 form a sum-free sequence, no sequence of shifts at distinct metrical levels can ever equal a shift at any other metrical level. This means that d-operations are commutative, and whenever e is applied the number of attacks doubles, whereas when s is applied the number of attacks remains unchanged.
Elaboration and syncopation can be combined, provided that the respective operations take place at distinct levels. An example is shown in Figure 6.
The rhythmic hierarchy in Figure 5 can be more succinctly displayed in terms of d-operations alone, as follows. Section 6 will show that associating d-operations u, e, and s with ternary digits 0, 1, and 2 (respectively) maps every allowable combination of d-operations to a location on the Sierpinski Figure 6. The elaboration operation e 2 followed by the syncopation operation s 0 .
gasket. The intervening sections will trace the relationship between binary meter and the emergence of self-similarity within and between the results of d-operations that culminates in that mapping. Take for example the single downbeat represented at the top of Figure 2, which would be represented in three binary metrical levels with eighth-note resolution as xooooooo. The immediate rhythmic derivation branching to the right in that figure is xoooxooo. It is generated from xoooooo by applying e 2 to the corresponding binary representation of 1000000, which equals 128 in decimal notation. Applying e 2 with n = 3 metrical levels gives where s 2 (128) = 2 2 2 128 mod (2 2 3 − 1) = 8.
Therefore e 2 (128) = 128 + 8 = 136, which represented in binary is 10000000 + 00001000 = 10001000 or, equivalently, the rhythm xoooxooo. Note that the next derived rhythm immediately below xoooxooo in Figure 2, namely xoxoxooo, contains an elaboration of the attack on the second half note, but not a further elaboration of the downbeat. Here e 1 is applied to the rhythm ooooxooo, generating ooxoxooo, and this is simply recombined with the results of e 2 above, meaning that the entire derived rhythm is the union of the attacks in xoooxooo and ooxoxooo. This is an illustration of an actual rhythm resulting from two combinations of d-operations: u 0 u 1 e 2 and u 0 e 1 s 2 . In other words, xoxoxooo is itself not an atomic rhythmic component belonging to a hierarchy like that shown in Figure 5, but instead a rhythm where a lack of parallelism at the quarter note level, and the fact that the quarter note elaboration belongs to a relatively weaker beat at the half-note level, is exposed by the set of combined d-operations required to construct that rhythm, most prominently by the s 2 in the second combination above.
Strictly speaking one might view xoxoxooo as the union of u 0 u 1 u 2 and u 0 e 1 s 2 , but this obscures the fact that the attack on the second half note is not only a syncopation within the context of its quarter note elaboration but also an elaboration itself at the half-note level. When analyzing an actual rhythm it generally seems more explanatory to let each combination of d-operations subsume as many attacks as possible in order to capture the multiple roles played by those attacks.

Congruence between rhythm and meter
Rhythmic parallelism emerges as the result of one elaboration operation becomes the input to another. Any d-operation preserves parallelism, and in the case of d-operation e increases it. Application of e m results in the combination of the input rhythm with a copy of itself shifted forward one unit at metrical level m. This internal pattern formation creates repetitive, nested, anticipation figures that mimic aspects of binary meter.
In binary meter, the time span of each beat at each metrical level is evenly divided by a beat at the next lower level. GTTM specifies this (not strictly for binary meter) as a metrical wellformedness rule.
MWFR 3: At each metrical level, strong beats are spaced either two or three beats apart. (Lerdahl and Jackendoff, 1983, 69) If e is applied at every metrical level then repetition across all metrical levels combines into an unbroken string of pulses at the lowest metrical level. If u is applied at every metrical level the result is a single attack on the downbeat. Application of e at some metrical levels and u at the remaining levels creates repeated anticipation configurations at the levels where e was applied. If e is applied strictly to higher metrical levels than those where u is applied, then the result is an unbroken string of attacks on units at the lowest metrical level where e was applied. For example, e 3 e 2 u 1 u 0 produces the rhythm xoooxoooxoooxooo.
When the set of d-operations applied at distinct metrical levels is restricted to e and u, the resulting rhythmic configuration resembles binary meter in the sense that all rhythmic structure is strictly repetitive and every pair of adjacent attacks consists of a relatively strong beat and its immediate anacrusis at some metrical level. Such resemblance evokes Huron's characterization of meters themselves as "predictive schemas for temporal events" (Huron, 2006, 197). The resulting rhythmic configurations also conform to GTTM's metrical preference rule MPR 5, mentioned in Section 2. Figure 7 illustrates an example, showing the three distinct rhythms that arise when d-operations e 2 , u 1 , and e 0 are successively applied, where eighths are the lowest metrical level. The top four rows of dots indicate, starting from the bottom, the metrical levels corresponding to wholes, halves, quarters, and eighths. At each metrical level, dots have been circled that represent the attack pattern resulting from the application of e at that metrical level. The bottom three rows of dots represent the attack patterns alone at their respective metrical levels, omitting the quarter note level because that is where u was applied. The point is that those attack patterns Figure 7. A rhythmic configuration resulting from elaboration operations e 2 and e 0 , with three active metrical levels.
mimic three metrical levels insofar as at each level a weak beat has been articulated between each pair of stronger beats. The upper and lower groups of dot patterns at the bottom are meant to convey the consistently skewed relationship that occurs in this case between the attack patterns at each stage of derivation and the patterns of nested units across all metrical levels. A particular intersection of parallelism and anticipation in the attack pattern stands here as a departure from the perfect symmetry of binary meter. Section 5.6.3 will illustrate this numerically.
We will show in Section 5 that all rhythms created solely by application of d-operations e and u correspond to patterns of odd binary coefficients on Pascal's triangle. Then syncopation will be addressed by application of d-operation s, as shown in Figure 3. In Section 6 it will be shown that the relationships concerning carries in binary arithmetic and the parity of binomial coefficients lay out all the possible combinations of elaborations and syncopations in such a manner that the entire set of possible results can be indexed by locations on the Sierpinski gasket, a geometric object related to Pascal's triangle.

Mapping rhythmic operations to Pascal's triangle
Particular rhythmic configurations evolve as d-operations are applied to the results of doperations performed at other metrical levels. Repeated shifting and scaling of data sometimes leads to self-similar structures, at which point further transformations simply map the data back onto some part of that structure (Peitgen, Jürgens, and Saupe, 1992, 132). In the present context self-similarity is manifested by rhythmic structures that are invariant under potentially nested augmentation and/or diminution at various combinations of metrical levels.
Specific musical passages are probably not particularly self-similar in most instances, except when self-similarity is a conscious goal, as mentioned in Section 2.3.1 of the Online Supplement. But the applicability of limited rhythmic operations across multiple metrical levels suggests that the class of possible results of those operations might have a significant degree of self-similarity.
Work by nineteenth-century number theorists Adrien-Marie Legendre, Ernst Eduard Kummer, and Édouard Lucas drew a link between carries in binary arithmetic and the patterns formed by even versus odd binomial coefficients (Legendre 1808, 8-10;Kummer 1852, 115-116;Lucas 1878, 229-230). Carries in binary arithmetic correspond to beat strength in binary meter, in the sense that the number of carries that occur between the binary representation of one time point and the next determines the metrical strength of that second time point, assuming that time points are numbered starting from zero. Patterns formed by the parity of binomial coefficients will be seen to match the patterns of time displacements that evolve via d-operations. These patterns may be observed as rows of odd binomial coefficients on Pascal's triangle, often visualized as a fractal known as the Sierpinski gasket.

Derived rhythmic configurations
The goal here is to find a direct means to enumerate and characterize the set of rhythmic configurations that can be successively derived by d-operations, starting from a root configuration that consists of a sole attack on an initial downbeat. We will restrict the context to continually looping time spans within binary meter that have a duration of 2 n time divisions for some relatively low value of n.
In order to focus on internal structure, we will first consider only rhythmic configurations that can be produced by combinations of d-operations e and u. These restricted rhythmic configurations will be referred to as d-rhythms.

Binary meter and binary integers
In practice, it is not necessary to successively apply every combination of d-operations e and u in order to enumerate the entire set of possible d-rhythms. The emergence of distinctive patterns via recursive application of simple operations has been studied in the context of number theory and fractals (Peitgen, Jürgens, and Saupe, 1992, 132). Applying the results of that work to musical rhythms requires first a numerical characterization of musical meter.
The nesting of metrical levels is expressed in GTTM as well-formedness rule MWFR 2, which requires that each beat at a particular metrical level must also be a beat at all higher levels (Lerdahl and Jackendoff, 1983, 72). In binary meter this nesting corresponds to divisibility by powers of 2, as expressed in binary notation. Numbering attack times from 0, the alternation of 0s and 1s at each binary place dovetails with the alternation of strong and weak beats at each metrical level. A 0 at a given binary place corresponds to the first half of a time span at the corresponding beat level; a 1 points to the second half. So the binary representation of a particular time point indicates a particular half of a particular half, and so on, of an overall duration equal to 2 n time divisions, where n is the number of metrical levels. It is important to keep in mind that each binary integer represents a single attack, rather than a pattern of attacks as in Section 4.2.
In the case of three metrical levels, for instance one bar of 4 4 at eighth-note resolution, each time slot can be represented by a three-digit binary integer. The most significant bit represents the alternation of strong and weak beats at the half-note level, and the least significant bit represents the alternation of strong and weak beats at the eighth-note level. A 0 in the binary representation of a time slot indicates that the slot corresponds to a strong beat at that metrical level. A 1 indicates a weak beat at that level. For example, the rhythm xooxxoox has attacks at 0, 3, 4, and 7, with respective binary representations 000, 011, 100, and 111.

Time displacements versus time points
Generation of newly derived attacks entails a projection of each attack onto an earlier position along the timeline, from a strong metrical position onto a weaker one. In order to characterize the patterns which arise from combinations of these time shifts at different metrical levels it is convenient to define time displacements as earlier time divisions counted starting from the initial downbeat within a looping overall time span.
We will use time point to refer to the position in that time span counted progressively later in time from time 0, and in both cases the basic time units are taken to be equal time divisions at the lowest metrical level under consideration. Within n levels of binary meter, the relationship between time displacement d and time point p is given by (6). We will refer to sets of time displacements as d-patterns, whereas d-rhythms are expressed in time points.

Carries and beat strength
The number and positions of binary carries incurred when incrementing the binary representation of a particular time point indicate the beat strength of the resulting time point, because each carry corresponds to a move from a weak beat to a strong beat at that metrical level. A carry between the binary representation of one time point and the next always coincides with a move to a relatively strong beat. The correspondence between carries and beat strength can be seen in Figure 8, which represents a looping context of sixteen time steps. Four carries are shown at time step 0; this is because 16 ≡ 0 mod 16, and there are four carries when incrementing from 15 to 16. This reflects the fact that the downbeat has the strongest beat strength. No carries occur when incrementing from 0 to 1; this reflects that there is minimal beat strength at the lowest-level time position following a downbeat. Whereas there are three carries upon arriving at the eighth time position, representing, for example, the downbeat of the next bar if we take each time step to represent one eighth note in 4 4 . Displacing an attack onto a weaker beat consists of incrementing 0 to 1 at some place in the binary representation of the time displacement corresponding to that attack. Attacks that are displaced together, at the same metrical level, must therefore each have a 0 at the same position in their time displacements. These displacements are identical to the d-operation s. Incrementing a binary place that contains a 1 produces a carry, corresponding to a move to a stronger beat, and is therefore disallowed as a rhythmic operation under the constraints in Section 4. This is specifically disallowed in the definition of d-operation by the constraint that only one d-operation can be carried out at any metrical level for a particular rhythmic derivation.

Binary integers as rhythmic configuration generators
This section introduces a representation of d-rhythms by binary integers that differs from the representation described for rhythms in general in Section 4.2. As noted above, for the moment we consider only those rhythmic configurations produced by combinations of d-operations e and u. Subsequent sections will augment this encoding to encompass application of d-operation s.
Since we are considering for the moment only two types of d-operations, and since at most one d-operation can take place at each metrical level, we can encode any resulting d-rhythm using an n-digit binary integer, where each binary place represents a particular metrical level. For example, in the context of one looping bar of 4 4 divided into eighth notes, there are eight possible attack points, implying three metrical levels (half notes, quarters, and eighths). A threebit number can represent any d-rhythm within that time span; that number is simply an encoding of the combined d-operations that produce that attack pattern.
For instance, consider the d-operations u 2 u 1 u 0 applied within a context of three metrical levels. The result is a single downbeat at time point 0. Now take the three-digit binary integer 000 to represent that same rhythm. In effect a 0 at each binary place substitutes for the explicit application of d-operation at the metrical level corresponding to that binary place. The 0 in each binary place indicates that there is no rhythmic parallelism at any metrical level. The binary integer 100 in turn corresponds to the combined d-operations e 2 u 1 u 0 representing a rhythm consisting of two half notes, where the 1 in the most significant bit indicates parallelism at that metrical level. The binary integer 001 corresponding to the combined d-operations u 2 u 1 e 0 represents a downbeat along with the eighth-note pick-up, since a 1 in the least significant place indicates a displacement forward in time at the lowest time resolution, in this case an eighth note.
The binary integer 101 indicates two levels of parallelism corresponding to the combined d-operations e 2 u 1 e 0 : repetition at the eighth-note metrical level, and at the half-note metrical level. There are two ways of interpreting this, which both lead to the same result: two attacks an eighth note apart are repeated at an interval of a half note, or two attacks a half note apart are repeated at the interval of an eighth note. The result is a repetitive dotted quarter-note pattern, as shown in Figure 9. As noted in Section 4.2 d-operations are commutative, by virtue of the fact that they are applied strictly at distinct metrical levels.
The number of attacks in a d-rhythm equals 2 raised to the number of 1s in the binary representation of that d-rhythm, because each 1 encodes an elaboration that doubles the number of attacks of the most basic, initial rhythmic configuration: a sole attack at time 0.
A binary number interpreted as a pattern of time points in the above manner is called here a generator, and has a direct mapping to d-operations, by associating e with 1 in the generator and u with 0 in the generator. The set of time displacements represented by a generator amounts to the sums of the different combinations of powers of 2 that make up that generator. More specifically, the set of time displacements represented by a generator is described as follows. For n metrical levels, the set of time displacements, taken from the set of non-negative integers, composing the d-pattern represented by generator a is 2 For instance, the d-pattern represented by 5 is {0, 1, 4, 5} because those numbers are composed of combinations of the same powers of 2 that compose the integer 5, as shown here: 0 = 0 · 2 0 + 0 · 2 1 + 0 · 2 2 1 = 1 · 2 0 + 0 · 2 1 + 0 · 2 2 4 = 0 · 2 0 + 0 · 2 1 + 1 · 2 2 5 = 1 · 2 0 + 0 · 2 1 + 1 · 2 2 .
Following equation (6), the time points for the corresponding d-rhythm are Here we are identifying combinations of 1s and 0s at particular binary places with combinations of d-operations e and u at corresponding respective metrical levels, where u is applied at all remaining levels.

Mapping elaboration to Pascal's triangle
Using integers as d-pattern generators, where each displacement is indicated by incrementing some 0 to 1 in the binary representation, ensures that no d-operation specified by a generator will ever displace a metrically weak attack onto a relatively strong one. Such a displacement from strong to weak would imply that a 1 in the binary representation has been incremented, producing a carry. In other words, the occurrence of a binary carry corresponds to the application of two d-operations at the same metrical level, which is prohibited by definition. This stipulation closely reflects some results in number theory from the nineteenth century. In 1877 Édouard Lucas, building on earlier work by Kummer and by Legendre, found a way to determine whether a given binomial coefficient is even or odd (Peitgen, Jürgens, and Saupe, 1992, 398).

Parity of binomial coefficients
Consider Pascal's triangle, an arrangement of binomial coefficients, with the rows numbered from 0 starting at the top, and columns numbered from 0 starting flush left as shown here. Lucas proved that the odd coefficients appear wherever the non-zero bits in the column number are a subset of the non-zero bits in the row number (Lucas, 1878, 229-230). This is equivalent to saying that along each row of Pascal's triangle the odd coefficients appear at column numbers which exclusively share non-zero bits with the column number of the last coefficient in that row. For example, the sixth row contains odd coefficients in columns 0, 2, 4, and 6, and none of those columns' numbers contain any bits not also contained in 6. The number n k is the number of combinations of n elements taken k at a time, n!/k!(n − k)!, and corresponds to the kth binomial coefficient for the polynomial (1 + x) n . Note that for n k , n indicates row number in Pascal's triangle (counting from the top starting at 0), and k indicates column number. The values of the first eight rows are as follows. Lucas showed that the parity of an entry in Pascal's triangle depends on the bits in the row and column numbers: if the non-zero bits in the column are a subset of the non-zero bits in the row, then row column is odd (Peitgen, Jürgens, and Saupe, 1992, 398).  1 1 1 1 1 1 1 1 The pattern of odd coefficients in each row of Pascal's triangle corresponds to a single d-pattern, when each row is padded out with 0s to 2 n entries, where n is the number of metrical levels under consideration. Each row corresponds to a unique combination of d-operations e and u at distinct metrical levels, where the time displacements of the corresponding d-pattern are indicated by the positions of columns containing 1s. Those columns mark the metrical levels where e operations were applied to produce those time displacements.
Lucas's observation was built on a Kummer's proof that if r equals the number of carries incurred when adding two numbers, n and k, in base p, then p r is the largest power of p that divides n+k k (Kummer, 1852, 115-116). In base 2 this means that n+k k is odd if and only if there are no carries when adding n and k. Kummer's proof and the link to Lucas's criterion can be found in Chaos and Fractals: New Frontiers of Science (Peitgen, Jürgens, and Saupe, 1992, 397-402).

Generators as row numbers on Pascal's triangle
The generator of a d-pattern is equivalent to row number on Pascal's triangle, meaning that the positions of the odd entries on that row exactly match the time displacements of the attacks represented by the generator. This is because Komar's constraint that a particular metrical level cannot be used for more than one displacement of a particular rhythmic configuration corresponds perfectly to Lucas's criterion that the position of each odd entry on that row must contain a subset of the non-zero bits contained in the row number, as each entry consumes one additional, different power of 2. Lucas's criterion therefore also corresponds to the stipulation that only one d-operation is applied at any particular metrical level. And so each row of Pascal's triangle corresponds to a combination of d-operations e and u.
Consider again three metrical levels and a d-pattern with generator 5 (101 in binary). The binomial coefficients in row number 5 (starting from 0) in Pascal's triangle are 1, 5, 10, 10, 5, 1. The values mod 2 are 1, 1, 0, 0, 1, 1, and so the odd entries are at columns 0, 1, 4, and 5. This matches the time displacements for this d-pattern, corresponding to the d-rhythm containing time points 0, 3, 4, and 7. It can be observed that Lucas's criterion is satisfied by noting that the binary integers 000, 001, 100, and 101 each contain non-zero bits that are a subset the non-zero bits contained in the binary integer 101. Figure 10 displays generators 1, 4, and 5 as rows of odd entries on Pascal's triangle. These correspond to the d-rhythms for those same generators shown in Figure 9.

Lucas's criterion and congruence between rhythm and meter
In Section 4.3 congruence between rhythm and meter was characterized by elaborations that form nested anticipations across some combination of metrical levels. This congruence can be made more concrete by considering the binary representations of the set of time displacements that make up a d-pattern. Applying Lucas's criterion as above, each of those binary integers contains a subset of the non-zero bits of the final time displacement, which is the generator of that d-pattern.
The binary places that contain 1s in the generator represent the metrical levels where elaborations have been performed. A binary place in the generator that contains a 0 will also contain a 0 at that same binary place in every time displacement in the d-pattern. By removing that binary place from each of the time displacements, effectively halving the value represented by each higher place, one is left with Z/2 n Z, where n is the number of non-zero bits in the generator.
Again using the generator 5 (101 in binary) as an example, this can be seen in Figure 11 by noting that each corresponding time displacement contains a 0 in the 2s place. If we remove the Figure 11. Mapping the d-pattern for generator 5 to Z/4Z. 2s place, thereby shifting the 4s place to replace the 2s place in the new set of integers we have the integers 0, 1, 2, and 3.
This mapping of non-contiguous integers to successive integers is an alternate account of the relationship between a d-rhythm with a repeated dotted figure and binary meter described in Section 4.3.

Mapping syncopation to Pascal's triangle
Every d-rhythm contains an attack at time point 0. The representation of each d-rhythm by a single binary generator relies on the fact that only d-operations e and u are used to construct d-rhythms. In a given binary generator, 1s appear in the binary places corresponding to the metrical levels where e was applied, and 0s appear in the binary places corresponding to metrical levels where u was applied.
To represent rhythmic configurations without this restriction, namely those resulting from application of d-operations s at some metrical level, an additional term, called here an offset, is needed. An offset specifies a time displacement applied uniformly to the time points within a d-pattern. In derivational terms, an offset is equivalent to one or more s d-operations carried out at distinct metrical levels. The generator and the offset cannot both contain a 1 in the same binary place; otherwise, two d-operations, in this case an e and an s, would be applied at the same metrical level. It is explicit in the definition of d-operations that only one of s, e, or u can be applied at a particular metrical level. This is equivalent to saying that no carries can occur in the binary addition of a generator and an offset.
Consider one looping bar of 4 4 at eighth-note resolution, constituting three metrical levels, and a d-pattern with the generator 4. The d-pattern contains the time displacements {0, 4} (incidentally, in this case the d-pattern and d-rhythm xoooxooo coincide). Now apply the offset 1. The offset 1 is allowed for generator 4 because the binary representations of those two numbers have no nonzero bits in common. The time displacements represented by generator 4 together with offset 1 are {1, 5}, therefore with time points {3, 7}. Each attack represented by the generator alone has now been displaced one eighth earlier by the offset. The stipulation that the generator and offset cannot have any non-zero bits in common is yet another way of saying that no combination of d-operations will ever displace a metrically weak attack onto a relatively strong one, since the offset is a time displacement at a single metrical level not already used in the internal pattern formation of the d-rhythm.

Offsets derived from Kummer's result
Kummer's result on carries, from which Lucas's criterion was derived, suggests a way of finding allowable offsets for a particular generator, under the constraint that no generator can be paired with an offset that contains any of the same powers of 2. If we set out the odd entries of the first eight rows of Pascal's triangle as entries of n+k k , we have the following. Here we are looking to Pascal's triangle to locate positions that can encode generator and offset together, rather than simply focusing on rows that exhibit the same patterns as that represented by particular generators. If we take the n in each n+k k to be the generator, and each k to be the offset, then each n + k expression that occurs at the odd entries contains a valid pairing of generator and offset. Such pairings occur in downward diagonals starting at the leftmost column. In each, n and k are guaranteed to contain no non-zero bits in common, because Kummer's result establishes that 1 is the largest power of 2 by which an odd n+k k can be divided.

Symmetry between generators and offsets
Another way of mapping generator-offset pairs to single locations on Pascal's triangle, within n metrical levels, is to subtract that generator from 2 n − 1, and use the difference itself as a generator. Rather than treat the time displacements represented by the new generator as a d-pattern, here we instead use those time displacements as the set of allowable offsets for the d-pattern represented by the first generator.
For any integer 0 ≤ p < 2 n , p and 2 n − p − 1 have no non-zero bits in common, and 2 n − p − 1 is the largest number less than 2 n that can be added to p without incurring any binary carries. Therefore, 2 n − p − 1 generates the largest set of valid offsets for generator p.
Operating within n metrical levels, we can take row number r on Pascal's triangle (counting from 0) to signify the generator equal to 2 n − r − 1. The odd entries on that row can then each signify the allowable offsets of the time displacements represented by the generator. Therefore a single location on Pascal's triangle now specifies both generator g and offset o for a given derived rhythmic configuration, at position row = 2 n − 1 − g and column = o. Therefore 2 n − p − 1 is simply a rotation and reversal of the arrangement of positions used for encoding generator-offset pairs in Section 5.7.1.
Returning to the example in Section 5.7.1 for generator 4 and offset 1 within three metrical levels, we can now designate a location on Pascal's triangle that specifies this particular combination of generator and offset. Since the generator is 4, the row number is 2 3 − 1 − 4 = 3. The entry at column 1, 3 1 = 3 is odd as expected. See Figure 12. Applying each allowable offset to the d-rhythm indicated by a given generator results in a set of disjunct rhythms, where the union of that set includes all time points within the overall duration. The fact that the shifting and grouping operations are governed by the same constraints makes this symmetry inevitable.

Mapping combinations of elaboration and syncopation onto the Sierpinski gasket
Since the generator and offset cannot share any non-zero bits, the two numbers can be combined into a single ternary number. This is because we only need to consider three of the four possible combinations of bits at corresponding places in the generator and offset, since a 1 at the same binary place in both the generator and offset would violate the constraint that two d-operations cannot be applied at the same metrical level (along with Lucas's criterion and Kummer's result regarding carries). These three combinations of binary digits can be usefully mapped onto ternary digits as follows.
The relationship between the resulting ternary numbers and the pair of binary numbers from which each ternary number is constructed can be most easily visualized as a Sierpinski gasket. In the ternary representation of the attack pattern a 1 represents parallelism at that power of 2, while a 2 or 0 represents a displaced or non-displaced version, respectively, of that pattern. Therefore, the number of attacks represented by a ternary address is equal to 2 raised to the number of 1s in that address, and two addresses will represent disjunct rhythms if those addresses contain a 0 and a 2 respectively at the same place. As particular examples, a ternary representation consisting of all 1s represents attacks in all time slots, a ternary representation consisting of all 0s represents a single attack at time point 0, and a ternary representation consisting of all 2s represents a single attack at time displacement 2 n − 1, or equivalently time point 1, where n is the number of metrical levels. In terms of d-operations, a 1 at a ternary place signifies application of e at the corresponding metrical level, 0 signifies u, and 2 signifies s.
The ternary numbers representing patterns of time points are called here addresses, because each digit indicates a sub-triangle of a sub-triangle, and so on, of the Sierpinski gasket. Section 1 of the Online Supplement parses rhythms from specific examples of nineteenth-and twentiethcentury music into addresses and discusses rhythmic characteristics that can be inferred from those addresses.

Enumerating rhythmic components
The complete set of derived rhythmic configurations for n metrical levels can be enumerated directly using the n-digit ternary addresses on the Sierpinski gasket. Each address is translated into a pair of values representing the row and column numbers, counting from 0, at that address. For n metrical levels, the generator of the rhythmic configurations equals 2 n minus the row number, and the offset equals the column number.
The association between rhythmic elaborations and the Sierpinski gasket demonstrates the self-similarity that arises from repeated application of the simple, constrained, rhythmic displacements such as those suggested by Komar. The mapping of binary generator and binary offset to a single ternary address establishes that the total number of rhythmic components to be found within n metrical levels is 3 n . Figure 13 illustrates how each place in the ternary address specifies a region of the Sierpinski gasket at a distinct geometric scale. The first ternary place locates the address within a particular one of the largest subdivisions of the initial triangle. Each subsequent place determines the location within the sub-triangle specified by the previous place.

Simultaneous global and local pattern formation
In Pascal's triangle each entry is equal to the sum of the entry above and the entry above and to the left. The same is true of these values modulo 2. This corresponds to the cellular automaton (CA) generated by exclusive-or (XOR) operations. The output of the XOR rule is 0 whenever the two inputs are both 1, and the output is 1 otherwise. This is analogous to the prohibition against 1s at the same binary place in the generator and offset of a d-pattern. In A New Kind of Science, Stephen Wolfram describes the symmetry of the Sierpinski gasket in terms of global pattern formation arising from local rules. He points out that the XOR rule governing the CA that forms the gasket will eventually replicate a given pattern if the CA is run on the same pattern with 0s inserted between each element of the original pattern (Wolfram, 2002, 955). The symmetry as one zooms into the gasket is a product of this global pattern formation.
This connection between cellular automata and the formation of global patterns in Pascal's triangle suggests why iterated rhythmic operations constrained to mutually exclusive displacements would produce a self-similar map of resulting configurations, even though it is clear that consecutive rows of Pascal's triangle do not generally map onto consecutive rhythmic configurations produced by successive d-operations.

Conclusion
This paper has presented two main themes. The first is a spectrum of rhythmic components that span degrees of symbiosis between rhythm and meter, providing low-level clues to musical prediction and coherence. The second is a correspondence between the formulation of those components and rules that govern particular relations between numbers.
The result is a self-similar map that organizes global outcomes of local rhythmic operations. Whether the highly structured pattern formation that emerges from simple numeric operations has deep connections to any crystallization of compositional thought or music perception is left as an open question. The mapping described here might provide a tool for further exploration of generative approaches to rhythm, either in the grammatical or compositional sense.
At the least the approach presented here should be useful for reducing the search space and complexity of low-level rhythmic feature detection in the service of musical analysis and algorithmic music composition, provided that one accepts the assumptions outlined in Section 2. The aim of this paper has been to establish a particular connection between Music Theory and Number Theory and to point toward potential applications, as discussed in the Online Supplement. It is hoped that further work making use of this connection can demonstrate its potential as a preprocessing layer for higher-level music analysis, as an organizing principal for empirical data analyses, and as a construction element for generative music composition.