Operations on intervals: Difference between revisions
m The linear-domain operations should go in the DR article |
mNo edit summary |
||
| Line 1: | Line 1: | ||
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 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. | ||
== Conversion between frequency ratios and cent values == | |||
To convert a ratio ''r'' to a cent value ''c'': | |||
<math>c = 1200 \frac{\log (r)}{\log 2}</math> | |||
To convert a cent value ''c'' to a frequency ratio ''r'': | |||
<math>r = 2^{c/1200}</math> | |||
== Stacking and unstacking == | == Stacking and unstacking == | ||
Stacking two intervals feels perceptually like we are ''adding'' two distances, but it corresponds to ''multiplying'' two frequency ratios. The logarithm function is the bridge between frequency space and pitch space: | Stacking two intervals feels perceptually like we are ''adding'' two distances, but it corresponds to ''multiplying'' two frequency ratios. The logarithm function is the bridge between frequency space and pitch space: | ||
Revision as of 02:07, 19 December 2025
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.
Conversion between frequency ratios and cent values
To convert a ratio r to a cent value c:
To convert a cent value c to a frequency ratio r:
Stacking and unstacking
Stacking two intervals feels perceptually like we are adding two distances, but it corresponds to multiplying two frequency ratios. The logarithm function is the bridge between frequency space and pitch space:
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. Hence, stacking corresponds to multiplying frequency ratios in linear (frequency) space, and adding cent values in logarithmic (pitch) space.
To convert octaves to cents, we simply multiply both sides by 1200:
As a consequence, since the inverse operation of multiplication is division, dividing frequency ratios corresponds to subtracting their perceptual sizes:
Examples
Logarithmic multiplication and division
From the log rule
we see that stacking n copies of the ratio r corresponds to taking the nth power of r:
The analogous holds for dividing a ratio into n equal parts:
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:
Division by 0 is not allowed, so you can't take
Examples
Reduction
Reduction is the pitch equivalent of modular arithmetic ("clock arithmetic"). Reduction is more of a fundamentally pitch-space operation, so mathematically we can just denote it using or .
The most common reduction operation is octave reduction, or the operation , so let's talk about that first. You can visualize octave reduction as wrapping pitch space into a circle of octave-equivalent "pitch classes".
The way to compute the octave reduction of an interval x is:
- If x > 0 cents, keep (logarithmically) subtracting 1200c from the cents value of x until x is greater than or equal to 0 cents and (strictly) less than 1200 cents.
- If x < 0 cents, keep (logarithmically) adding 1200c from 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
Mediant
The mediant between two ratios and is the freshman sum The mediant operation is ubiquitous in xenharmonic theory, as:
- the mediant of two unequal ratios is always strictly between the two ratios
- the mediant is the simplest ratio between two ratios adjacent in the Stern-Brocot tree
- the continued fraction for any irrational value is a result of taking mediants "infinitely many times" between adjacent ratios in the Stern-Brocot tree, the resulting value approaching that irrational value at the limit
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 med 4\7 = 11\19.
For JI ratios
Example (the path to 11/8 in the Stern-Brocot tree):
