Operations on intervals: Difference between revisions

From Xenharmonic Reference
 
(3 intermediate revisions by the same user not shown)
Line 31: Line 31:
This also means that going up (positive cents value) corresponds to a ratio greater than 1, and going down (negative cents value) corresponds to a ratio less than 1.
This also means that going up (positive cents value) corresponds to a ratio greater than 1, and going down (negative cents value) corresponds to a ratio less than 1.


When applied to chords, stacking in the sense of using the top note of the first chord as the root note of the second may be called ''concatenation''.
When applied to chords, stacking in the sense of using the top note of the first chord as the root note of the second may be called ''concatenation''. For example, the concatenation of two 4:5:6 triads is 8:10:12:15:18.
=== Examples ===
=== Examples ===
# <math>1200 \log_2 (3/2) - 1200 \log_2 (5/4) = 1200 \log_2 (6/5)</math>
# <math>1200 \log_2 (3/2) - 1200 \log_2 (5/4) = 1200 \log_2 (6/5)</math>
Line 91: Line 91:


=== For JI ratios ===
=== For JI ratios ===
Example:
Examples:
# <math>\frac{1}{1} \oplus \frac{1}{0} = \frac{1+1}{1+0} = \frac{2}{1}</math>
# <math>\frac{1}{1} \oplus \frac{1}{0} = \frac{1+1}{1+0} = \frac{2}{1}</math>
# <math>\frac{1}{1} \oplus \frac{2}{1} = \frac{1+2}{1+1} = \frac{3}{2}</math>
# <math>\frac{1}{1} \oplus \frac{2}{1} = \frac{1+2}{1+1} = \frac{3}{2}</math>
Line 105: Line 105:
* 13:16:19 {{=}} (4+1/3):(5+1/3):(6+1/3) is a linear compression of 4:5:6 (approximately 0-6-11\20)
* 13:16:19 {{=}} (4+1/3):(5+1/3):(6+1/3) is a linear compression of 4:5:6 (approximately 0-6-11\20)


{{Adv|Linearly stretching a chord preserves the [[delta signature]], unlike logarithmic stretching, which preserves the logarithmic ratios between intervals (ratios between cent values) in a chord. Note that all the chords in the examples above are isodifferential (+1+1).}}
{{Adv|Linearly stretching a chord preserves its [[delta signature]], unlike logarithmic stretching, which preserves the logarithmic ratios between intervals (ratios between cent values) in a chord. Note that all the chords in the examples above are isodifferential (+1+1).}}


{{adv|A small logarithmic stretch nevertheless ''approximates'' a small linear stretch. This can be useful when hunting for approximate DR chords in equal divisions: for example, the 19edo major triad 0-6-11\19 can be logarithmically stretched to 0-6-11\18 and logarithmically compressed to 0-6-11\20. All of these chords are roughly +1+1.}}
{{adv|A small logarithmic stretch nevertheless ''approximates'' a small linear stretch. This can be useful when hunting for approximate DR chords in equal divisions: for example, the 19edo major triad 0-6-11\19 can be logarithmically stretched to 0-6-11\18 and logarithmically compressed to 0-6-11\20. All of these chords are roughly +1+1.}}


{{cat|Core knowledge}}
{{cat|Core knowledge}}

Latest revision as of 01:54, 9 February 2026

The following are common arithmetic operations on musical intervals. If you're unfamiliar with the operations, you're encouraged to verify the examples for interval operation rules with a calculator. The website xen-calc can perform many of these operations automatically.

Conversion between frequency ratios and cent values

To convert a ratio to a cent value:

cents=1200log2(ratio)=1200log(ratio)log2

To convert a cent value to a frequency ratio:

ratio=2cents/1200

Stacking

Stacking two intervals feels perceptually like adding two distances, but it corresponds to multiplying two frequency ratios. The bridge between frequency space and perceptual pitch space is the logarithm function:

log2a+log2b=log2(ab)

for any two frequency ratios a and b. The above equation tells us that the sum of the size (in octaves) of a and the size (in octaves) of b is equal to the size in octaves of the product of two frequency ratios, ab.

To convert octaves to cents, we simply multiply both sides by 1200:

1200log2a+1200log2b=1200log2(ab).

We can read the equation as: "perceptual size of a + perceptual size of b = perceptual size of ab".

In summary, stacking corresponds to multiplying frequency ratios in linear (frequency) space, and adding cent values in logarithmic (pitch) space. The logarithmic sum of a list of intervals is called a stack (noun).

As a consequence, since the inverse operation of multiplication is division, dividing frequency ratios corresponds to subtracting their perceptual sizes, or "unstacking":

1200log2a1200log2b=1200log2(a/b).

This also means that going up (positive cents value) corresponds to a ratio greater than 1, and going down (negative cents value) corresponds to a ratio less than 1.

When applied to chords, stacking in the sense of using the top note of the first chord as the root note of the second may be called concatenation. For example, the concatenation of two 4:5:6 triads is 8:10:12:15:18.

Examples

  1. 1200log2(3/2)1200log2(5/4)=1200log2(6/5)
  2. 1200log2(3/2)+1200log2(3/2)=1200log2(9/4)
  3. 1200log2(16/9)1200log2(3/2)=1200log2(32/27)

Logarithmic multiplication and division

From the log rule

nlog2r=log2(rn)

we see that stacking n copies of the ratio r corresponds to taking the nth power of r:

n(1200log2r)=1200log2(rn).

The analogous holds for dividing an interval into n perceptually equal parts:

1n(1200log2r)=1200log2(r1/n),

or for scaling the perceptual interval by a factor of any real number α:

α(1200log2r)=1200log2(rα).

There is another operation that can be called "logarithmic division", which is finding the perceptual ratio of two intervals. This is given by the base change operation:

1200log2r1200log2s=logsr.

Division by 0 is not allowed, so you can't take log1/1.

Examples

  1. 21200log2(4/3)=1200log2((4/3)2)=1200log2(16/9)
  2. 21200log2(9/8)=1200log2((9/8)2)=1200log2(81/64)
  3. 1131200log2(3/1)=1200log2(31/13)
  4. 1200log2(81/64)1200log2(9/8)=log9/8(81/64)=2

Reduction

Reduction is the modulo operation in pitch space. Reduction is a fundamentally pitch-space operation, so mathematically we just denote it using mod or % and working with cent values.

The most common reduction operation is octave reduction, or the operation xx % 1200c. You can visualize octave reduction as wrapping pitch space into a circle of octave-equivalent pitch classes.

One way to compute the octave reduction of an interval x by hand is:

  1. If x > 0 cents, keep subtracting 1200c from the cents value of x until x is greater than or equal to 0 cents and (strictly) less than 1200 cents.
  2. If x < 0 cents, keep adding 1200c to the cents value of x until the value of x is greater than or equal to 0 cents and (strictly) less than 1200 cents.

For reduction by any other interval, just substitute 1200c with the cents value of whatever interval you wish to reduce by.

Examples

  1. 1350c % 1200c=150c
  2. 7500c % 1200c=300c
  3. 450c % 1200c=750c

Mediant

The mediant between two ratios a/b and c/d is the freshman sum:

a/bc/d:=(a+c)/(b+d).

For example, the mediant of 4/3 and 5/4 is 9/7. The mediant operation is common in xenharmonic theory, as the mediant of two unequal ratios is always strictly between the two ratios, e.g. 3/5 < 7/12 < 4/7.

For intervals in equal divisions

Mediants can be used to obtain generators of MOS scales in edos (the procedure for any other equal division, given the equave, is the same). For example, if a\m and b\n are both diatonic fifths (including equalized and collapsed diatonic tunings), then (a+b)\(m+n) is also a diatonic fifth; for example, we obtain 10\17 by taking the mediant of 7\12 and 3\5, thus sharpening 7\12 into 10\17. On the other hand, we can flatten fifth generators by taking the mediant of the diatonic generator with the equalized diatonic generator 4\7: 7\12 ⊕ 4\7 = 11\19.

For JI ratios

Examples:

  1. 1110=1+11+0=21
  2. 1121=1+21+1=32
  3. 1132=1+31+2=43
  4. 4332=4+33+2=75
  5. 4375=4+73+5=118

Linear stretching

For a frequency ratio f1/f2 and a (valid) real number α>0 we call (f1α)/(f2α) a linear stretching and (f1+α)/(f2+α) a linear compression.

Examples:

  • 23:29:35 = (4-1/6):(5-1/6):(6-1/6) is a linear stretching of 4:5:6 (approximately 0-5-9\15)
  • 13:16:19 = (4+1/3):(5+1/3):(6+1/3) is a linear compression of 4:5:6 (approximately 0-6-11\20)

Linearly stretching a chord preserves its delta signature, unlike logarithmic stretching, which preserves the logarithmic ratios between intervals (ratios between cent values) in a chord. Note that all the chords in the examples above are isodifferential (+1+1).

A small logarithmic stretch nevertheless approximates a small linear stretch. This can be useful when hunting for approximate DR chords in equal divisions: for example, the 19edo major triad 0-6-11\19 can be logarithmically stretched to 0-6-11\18 and logarithmically compressed to 0-6-11\20. All of these chords are roughly +1+1.