This page reconstructs a bit of essential work first described at the 1978 ICMC by John Rogers and John Rockstroh. The paper was entitled “Score-Time and Real-Time”. The achievement has not been celebrated widely in the computer music community, but then again the same community never lent much glamor to the larger subject of score preprocessing.
The central point made by Rogers and Rockstroh was that tempo changes feel most uniform when the tempo graph for an accelleration or a ritard proceeds along an exponential or equal-ratios curve. This should not be surprising, since we hear rhythms proportionally. A sequence of unequal rhythmic durations remains recognizable if every duration in the sequence is doubled; likewise if every duration is halved. However the result produced by extending each duration an extra eighth note is heard as a distortion of the original.
By “score-time” Rogers and Rockstroh meant what this site calls relative time; that is, time measured in quarter notes. By “real-time” they meant absolute time in seconds (rather than hear-as-you-calculate). Thus to make the tempo of a sequence of quarter notes accelerate uniformly over its timespan, the ratios between consecutive absolute-time durations should be the same and, particularly, the ratio between the opening pair of absolute-time durations should match the ratio between the closing pair of durations.
While the principle of equal ratios is itself straightforward, the math needed to convert from relative time to absolute time is challenging because the tempo potentially changes while the duration proceeds. We address this challenge by considering four scenarios. All four instances start with a duration Δr ranging along the relative-time axis from r_{0} to r_{1}, and all four end with an absolute-time duration Δt. The scenarios are:
The
Suppose first that tempo is constant. Figure 1 graphs this scenario. The horizontal axis plots relative time in quarter notes, while the vertical axis plots tempo in quarter-note beats per second. The thick horizontal line plots the tempo contour T(r), which holds constant at T_{0} over a single segment ranging from 0 to ∞.
Tempo gives the proportion of beats (relative time) to seconds (absolute time). We already know the number of beats is Δr, and what we want to know is the number of seconds Δt. That is we need to multiply Δr by the proportion of seconds to beats, which is the reciprocal of the tempo. Thus in a fixed-tempo scenario we can calculate:
Δt | = | Δr T(r) |
= | Δr T_{0} |
(Expression 1) |
In general a a relative-time duration Δr ranging from r_{0} to r_{1} may be converted into an the absolute-time duration Δt by calculating the area under the 1/T(r) curve from r_{0} to r_{0}. This operation can be represented mathematically using the formula:
Δt | = | ∫^{r1}_{r0} | dr T(r) |
(Expression 2) |
Where the ∫ sign means ‘sum together’ and the term dr indicates very small intervals along the horizontal axis.
Now we consider the the scenario depicted in Figure 2, where the tempo contour divides into four segments:
Wherever T(r) is constant, 1/T(r) is constant also. It is a fact about the ∫ operation that summing a constant over an interval scales the constant by the interval:
∫^{x3}_{x1} | Cdx | = | C | ∫^{x2}_{x1} | dx | + | C | ∫^{x3}_{x2} | dx | = | C[x_{2} − x_{1}] | − | C[x_{3} − x_{2}] | = | C[x_{3} − x_{1}] |
applying this fact to Figure 2,
∫^{a}_{r0} | dr T(r) |
= | a − r_{0} T_{1} |
∫^{b}_{a} | dr T(r) |
= | b − a T_{2} |
∫^{r1}_{b} | dr T(r) |
= | r_{1} − b T_{3} |
which combine to produce:
Δt | = | ∫^{a}_{r0} | dr T(r) |
+ | ∫^{b}_{a} | dr T(r) |
+ | ∫^{r1}_{b} | dr T(r) |
= | a − r_{0} T_{1} |
+ | b − a T_{2} |
+ | r_{1} − b T_{3} |
(Expression 3) |
If the tempo accelerates within a segment the acceleration is felt to be most uniform if it proceeds in "equal ratios". For example, suppose we have a sequence of twelve quarter notes and we want the music to accellerate uniformly from ♩=60 (1 quarter per second) to ♩=120 (two quarters per second). The following sequence of absolute durations will accomplish this:
Relative Time: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Absolute Duration: | 0.97 | 0.92 | 0.87 | 0.82 | 0.77 | 0.73 | 0.69 | 0.65 | 0.61 | 0.58 | 0.55 | 0.51 |
Notice three facts:
The "equal ratios" behavior is characteristic of an exponential contour as described above. However you can't just divide the relative duration by the tempo of the moment because the tempo continues to change as the duration proceeds.
The scenario shown in Figure 3 assumes a single segment starting at time a ≤ r_{0} with origin tempo T_{a} and starting at time b ≥ r_{0} with goal tempo T_{b}. The goal tempo T_{b} is faster than the origin tempo T_{a}. According to the general page on contour calculations, the interpolation formula for such a segment is:
where the interpolation factor x(r) is calculated as:
x(r) | = | r − a b − a |
(Expression 5) |
With this interpolation formula, the area under the 1/T(r) curve (Expression 2) evaluates as shown in Expression 6.
Δt = | b − a T_{a} ∙ ln(T_{a}/T_{b}) |
∙ | [e^{ln(Ta/Tb)x(r1)} − e^{ln(Ta/Tb)x(r0)}] | (Expression 6) |
This complicated expression, along with Expression 8 for ritards, fortunately need be implemented only once, deep in the conversion infrastructure. A mathematical derivation of Expression 6 is provided below.
This scenario resembles the one shown in Figure 3 except that the goal tempo T_{b} is slower than the origin tempo T_{a}. According to the general page on contour calculations, the interpolation formula becomes:
T(r) | = | T_{b} ∙ (T_{a}/T_{b})^{(1-x(r))} | (Expression 7) |
With this alternative interpolation formula, the area under the 1/T(r) curve evaluates as as shown in Expression 8.
Δt = | b − a T_{b} ∙ ln(T_{b}/T_{a}) |
∙ | [e^{ln(Tb/Ta)(1-x(r1))} − e^{ln(Tb/Ta)(1-x(r0))}] | (Expression 8) |
When the tempo increases by equal ratios, then the absolute duration may be calculated by integrating the reciprocal of the tempo from the relative starting time r_{0} to the relative ending time r_{1}.
Δt = | ∫^{r1}_{r0} | dr T(r) |
(Expression 2 reprised) |
Substituting T(r) from Expression 4 into Expression 2:
Δt = | ∫^{r1}_{r0} | 1 T_{a} |
∙ (T_{a}/T_{b})x(r)dr |
or
Δt = | 1 T_{a} |
∫^{r1}_{r0} | e^{ln(Ta/Tb)x(r)}dr | (Expression 9) |
Let
u = | ln(T_{a}/T_{b})x(r) | = ln(T_{a}/T_{b}) ∙ | r − a b − a |
(Expression 10) |
then
du dr |
= | ln(T_{a}/T_{b}) b − a |
solving for dr,
dr = | b − a ln(T_{a}/T_{b}) |
∙ du | (Expression 11) |
Substituting u from Expression 10 and dr from Expression 11 into Expression 9,
Δt = | b − a T_{a} ∙ ln(T_{a}/T_{b}) |
∙ | ∫^{u1}_{u0} | e^{u}du |
evaluating the definite integral,
Δt = | b − a T_{a} ∙ ln(T_{a}/T_{b}) |
∙ | [e^{u1} − e^{u0}] |
or
Δt = | b − a T_{a} ∙ ln(T_{a}/T_{b}) |
∙ | [e^{ln(Ta/Tb)x(r1)} − e^{ln(Ta/Tb)x(r0)}] | (Expression 6 reprised) |
© Charles Ames | Page created: 2012-12-01 | Last updated: 2015-08-25 |