Edit: To clarify, I am interested in dealing with multiple simultaneous tempos (polytempo). Pieces where all voices are in the same tempo at any given time (with exceptions to account for polyrhythms) are not difficult to deal with.
Note that the idea discussed in this post is commonly used to teach polyrhythms like 7:8 (draw fifty-six lines, mark off every seven on the top and every eight on the bottom, etc.).
Consider the problem of laying out the rhythm of a piece of music on a grid. The idea is that each note value can be expressed in an integer multiple of one unit. Let's name the largest possible grid unit the largest common duration, abbreviated LCD. We want the largest possible unit because it is the simplest to work with.
If the music uses only binary rhythmic subdivisions, then the LCD is usually the shortest note value present. For example, a piece of music that consists entirely of quarter notes and eighth notes has a LCD of an eighth note. If a piece of music consists of quarter notes and dotted quarter notes, the LCD is still an eighth note, but this is less obvious.
Things get much more interesting when other subdivisions are involved; the shortest note value may not be the LCD. For instance, if we were to add an eighth note triplet to the previous example, the LCD becomes a “triplet sixteenth note” or twenty-fourth note.
I am interested in a method of computing the LCD for any piece of music with any rhythmic values. In the following, I will describe a way that appears to work, but it seems suboptimal, needlessly complicated, and problematic. My main question: Is there a cleaner way to do it (while retaining the generality)?
We will be treating tuplets and tempo changes identically, for the most part, and we will express both of them using ratios. For example, the common triplet can be thought of as a temporary increase in speed at a 3:2 ratio; a note “within” the triplet is 2/3 as long as the same note “outside” the triplet. The exact same thing happens if a piece changes tempo from 60 bpm to 90 bpm. A change from 90 bpm to 100 bpm causes notes to become 9/10 as long as they previously were.
Step 1. First, normalize all tempos that occur in the music so that they are expressed in terms of the same note value. This is a major problem of this method, since it essentially requires finding the LCD in order to find the LCD! Most of the time, tempos are given using binary rhythms, but it is not inconceivable that we might want to say that there are 120 sixth notes in a minute (e.g., if the music makes heavy use of meters that aren't based on powers of two).
For example, if we have a piece of music that changes from 4/4 at 𝅘𝅥 = 100 to 6/8 (i.e., 2/𝅘𝅥𝅭 ) at 𝅘𝅥𝅭 = 111, then we'll treat the tempos as 𝅘𝅥𝅮 = 200 and 𝅘𝅥𝅮 = 333.
Tuplets will be dealt with at a later stage; for now, ignore them.
Step 2. Choose one tempo as the “base” and convert the other tempos to ratios based on note values in the base tempo.
For example, say we have a piece of music with tempos 𝅘𝅥 = 90, 𝅘𝅥 = 95, 𝅘𝅥 = 98. If we set 𝅘𝅥 = 90 as the base, then the other two tempos are related to the base by ratios of 19:18 and 49:45.
Step 3. Next we will eliminate tuplets. Take all tuplet ratios (reduced to lowest terms) and multiply them by the ratio of the tempo in which they occur.
For example, say we have the piece of music in the previous example (with tempos related to the base by 19:18 and 49:45). If a triplet occurs in the 19:18 tempo, then we'll obtain a new tempo related to the base by (3:2)×(19:18) = 19:12.
As long as the two terms of the tuplet ratio refer to the same note value, we needn't worry about anything besides the ratio. Thus 5:4𝅘𝅥 , 5:4𝅘𝅥𝅮 , and indeed 10:8𝅘𝅥 are equivalent. But the full generality of the tuplet ratio notation is troublesome and again seems to require finding the LCD, because we have to normalize the note values.
For example, what if we want to fit eight fifth notes in the time of seven sixth notes? I'm pretty sure that this relationship is equivalent to 18:7, but figuring it out is tricky. With binary divisions (e.g., three eighth notes in the time of two quarter notes), normalization is not too bad.
Step 4. Now we have a collection of tempo ratios corresponding to the tempos that appear in the piece of music. Match each tempo ratio to the shortest note value occurring in the music at that tempo.
For example, Conlon Nancarrow's Study no. 36 for player piano is a canon in four voices, related by a 20:19:18:17 tempo ratio; that is, voice 2 is 18/17 faster than voice 1, voice 3 is 19/17 faster than voice 1, and voice 4 is 20/17 faster than voice 1. Because it is a canon, all four voices have the same shortest note value, a sixty-fourth note.
Step 5. Our current goal is to equalize the second terms of all the ratios. We care only about ratios that aren't expressed in terms of powers of two; we'll call such ratios “defective”. If there are no defective ratios, skip to Step 6.
Repeat Steps 5a–5e for each tempo ratio p = a:b. Let V be the associated note value.
Step 5a. Convert p to a fraction f. If a < b, let f be 2a/b and divide V in half.
Step 5b. Find the closest fraction to f that has the form c/d, where c > d and d is a power of two; call this fraction g. For example, if f is 7/5, then g will be 7/4.
Step 5c. Let t = f/g. This will be a fraction m/n where m is a power of two and m < n.
Step 5d. Construct a c:d tuplet made up of V's. Divide each of the c notes into m parts.
Step 5e. Use g instead of p for the current tempo ratio, and use V×m instead of V for the associated note value.
For example, let's return to Nancarrow, with the ratios 18:17, 19:17, and 20:17, where the shortest note value in each tempo is a sixty-fourth note. First f is 18/17, g is 18/16 = 9/8, and t is 16/17. We make a 9:8 sixty-fourth note tuplet, divide each sixty-fourth note into sixteen 1024th notes, and group together seventeen of those 1024th notes. Instead of 18:17 we use 9:8, and instead of a sixty-fourth note we use seventeen 1024th notes. Proceeding similarly for the other voices gives us new ratios of 19:16 and 5:4, both of which have the same associated duration of seventeen 1024th notes.
Step 6. Now we have only non-defective tempo ratios. Multiply the ratios by powers of two until the second terms are all the same. If the first term of any ratio exceeds the second term, then double the first term and double the corresponding duration before scaling. We also find the “binary” LCD using the expressions of the durations associated with the ratios so that they are all in terms of the same note value. All of this is done for the base ratio of 1:1 as well.
Continuing with the Nancarrow example, we will adjust 1:1 to be 16:16 and 9:8 to be 18:16 and 5:4 to be 20:16; 19:16 stays the same. The sixty-fourth note associated with 1:1 gets scaled to sixteen 1024th notes.
Step 7. Find the least common multiple of the first terms of the ratios. This is the LCD of the entire piece of music and represents the duration of the binary LCD found in Step 6, at the base tempo.
In the Nancarrow piece, this is lcm(16, 18, 19, 20) = 13680. Thus 13680 units make up one 1024th note at the base tempo, and 218880 units make up one sixty-fourth note at the base tempo; 12160 units make up one 1024th note at the 18:16 tempo, and 206720 units make up one sixty-fourth note at the original 18:17 tempo ratio; 11520 units make up one 1024th note at the 19:16 tempo, and 195840 units make up one sixty-fourth note at the original 19:17 tempo ratio; 10944 units make up one 1024th note at the 20:16 tempo ratio, and 186048 units make up one sixty-fourth note at the original 20:17 tempo ratio. I believe that one of these grid units is a 224133120th note, in relation to the base tempo.