Delta-rational chord: Difference between revisions

Inthar (talk | contribs)
Inthar (talk | contribs)
No edit summary
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Interwiki
|de=Delta-rationaler Akkord
|en=Delta-rational chord
|es=
|ja=
}}
A '''delta-rational''' ('''DR''') chord is a [[chord]] that has integer ratios between frequency ''differences'' of some pair of intervals, called '''deltas''', with the intervals in question assumed to be between successive notes (Δ, capital delta, is often used to denote "difference").  
A '''delta-rational''' ('''DR''') chord is a [[chord]] that has integer ratios between frequency ''differences'' of some pair of intervals, called '''deltas''', with the intervals in question assumed to be between successive notes (Δ, capital delta, is often used to denote "difference").  


DR chords are a generalization of JI chords, in which all frequency differences of intervals are exactly integer ratios. But unlike JI chords, a DR chord need not have integer ratios between frequencies of notes. For example, the [[13edo]] chord {{dash|0, 3, 8, 10|med}}\13 ({{dash|, 277¢, 738¢, 923¢|med}}) is close to being delta-rational, because the frequency difference of the interval 8–10\13 is 0.994 times the frequency difference of the interval 0–3\13. (In the exactly DR chord {{dash|0\13, 3\13, 8\13, 924.159¢|med}}, the 3rd and 4th notes have exactly the same frequency difference as the interval 0–3\13.)  
DR chords are a generalization of JI chords, in which all frequency differences of intervals are exactly integer ratios. But unlike JI chords, a DR chord need not have integer ratios between frequencies of notes. For example, the [[13edo]] chord {{dash|0, 3, 8, 10|med}}\13 ({{dash|0{{c}}, 277{{c}}, 738{{c}}, 923{{c}}|med}}) is close to being delta-rational, because the frequency difference of the interval 8–10\13 is 0.994 times the frequency difference of the interval 0–3\13. (In the exactly DR chord {{dash|0\13, 3\13, 8\13, 924.159{{c}}|med}}, the 3rd and 4th notes have exactly the same frequency difference as the interval 0–3\13.)  


[[JI]] chords and chords that are subsets of [[Delta-rational chord#Isodifferential chord|isodifferential chord]]s (these correspond to all chords of the form α : {{nowrap|α + ''k''<sub>1</sub>}} : ... : {{nowrap|α + ''k''<sub>''n''</sub>}} for any positive (possibly irrational) number α and integers ''k''<sub>1</sub>, ..., ''k''<sub>''n''</sub>) are special cases of delta-rational chords, but in these chords ''all'' intervals are rationally related in frequency space, which we call '''fully delta-rational''' (FDR).
[[JI]] chords and chords that are subsets of [[Delta-rational chord#Isodifferential chord|isodifferential chord]]s (these correspond to all chords of the form α : {{nowrap|α + ''k''<sub>1</sub>}} : ... : {{nowrap|α + ''k''<sub>''n''</sub>}} for any positive (possibly irrational) number α and integers ''k''<sub>1</sub>, ..., ''k''<sub>''n''</sub>) are special cases of delta-rational chords, but in these chords ''all'' intervals are rationally related in frequency space, which we call '''fully delta-rational''' (FDR).
Line 37: Line 43:
We start by choosing the [[MOS scale]] and equave, and the DR chord.  
We start by choosing the [[MOS scale]] and equave, and the DR chord.  


For example with 5L 2s ⟨2/1⟩, the usual diatonic scale, and we want to approximate 4:5:6, the just major chord, with a delta-rational MOS chord.   
For example, with 5L&nbsp;2s, the usual diatonic scale, and we want to approximate 4:5:6, the just major chord, with a delta-rational MOS chord.   


Identify the mappings of each of the deltas. The deltas are 5/4, 6/5, 7/6. For a Meantone mapping, these are g<sup>4</sup>/4 -1, g-g<sup>4</sup>/4. This is because in meantone, 1/1, 3/2, 5/4 are 1, g, g<sup>4</sup>/4 respectively, so the deltas are identified by subtracting the each term with the one before it.  
Identify the mappings of each of the deltas. The deltas are 5/4, 6/5, 7/6. For a Meantone mapping, these are {{nowrap|''g''<sup>4</sup>/4 1}}, {{nowrap|''g'' − ''g''<sup>4</sup>/4}}. This is because in meantone, 1/1, 3/2, 5/4 are 1, ''g'', {{nowrap|''g''<sup>4</sup>/4}} respectively, so the deltas are identified by subtracting the each term with the one before it.  


In this case, we want the difference between our deltas to become 1, so the delta signature will be +1+1.  
In this case, we want the difference between our deltas to become 1, so the delta signature will be +1+1.  


To achieve this, we take the difference between the first two deltas and set it to zero, so (g<sup>4</sup>/4 -1) - (g-g<sup>4</sup>/4) = 0. Put in integer terms, it's g<sup>4</sup> - 2g - 2 = 0. Solving for g, the only root that makes sense is g≈1.49453, which in cents is 695.630c. And thus, with this generator, we will have a DR ~4:5:6 meantone chord!
To achieve this, we take the difference between the first two deltas and set it to zero, so {{nowrap|(''g''<sup>4</sup>/4 1) (''g'' − ''g''<sup>4</sup>/4) {{=}} 0}}. Put in integer terms, it's {{nowrap|''g''<sup>4</sup> 2''g'' − 2 {{=}} 0}}. Solving for ''g'', the only root that makes sense is {{nowrap|''g'' ≈ 1.49453}}, which corresponds to 695.63{{c}}. And thus, with this generator, we will have a DR ~4:5:6 meantone chord.


Note that the equation to solve depends on what chord you want to tune as equal-beating. For example, assuming pure octaves, Meantone admits an equation for tuning the 3:4:5 as equal-beating: {{nowrap|''g''<sup>4</sup> + 2''g'' − 8 {{=}} 0}} The latter equation has solution {{nowrap|''g'' {{=}} 1.4960 {{=}} 697.}}.  
Note that the equation to solve depends on what chord you want to tune as equal-beating. For example, assuming pure octaves, Meantone admits an equation for tuning the 3:4:5 as equal-beating: {{nowrap|''g''<sup>4</sup> + 2''g'' − 8 {{=}} 0}} The latter equation has solution {{nowrap|''g'' {{=}} 1.4960 {{=}} 697.3{{c}}}}.  


If instead we chose a Schismic mapping, the deltas would be g<sup>8</sup>/8 -1, 2/g - g<sup>8</sup>/8, which gives a generator of 498.308c for 4:5:6.  
If instead we chose a Schismic mapping, the deltas would be {{nowrap|''g''<sup>8</sup>/8 1}} and {{nowrap|2/''g'' − ''g''<sup>8</sup>/8}}, which gives a generator of 498.308{{c}} for 4:5:6.  


=== Mathematical definition ===
=== Mathematical definition ===
Let ''a'' and ''b'' be positive integers and suppose {{nowrap|gcd(''a'', ''b'') {{=}} 1}}. Let {{nowrap|''E'' &gt; 1}} be the frequency ratio of the equave. Consider a MOS ''a'''''L'''''b'''''s'''{{angbr|''E''}} with generator range <math>I \subseteq (1, \sqrt{E})</math> (in the linear frequency domain), and consider a pair ({{nowrap|'''u''', '''v'''}}) of notes from the root of a given triad in the MOS, {{nowrap|'''0''' (unison) &lt; '''u''' &lt; '''v'''}}. Let '''p''', '''g''' be a basis formally representing the MOS scale's period and generator. Write  
Let ''a'' and ''b'' be positive integers and suppose {{nowrap|gcd(''a'', ''b'') {{=}} 1}}. Let {{nowrap|''E'' &gt; 1}} be the frequency ratio of the equave. Consider a MOS ''a'''''L'''&nbsp;''b'''''s'''{{angbr|''E''}} with generator range <math>I \subseteq (1, \sqrt{E})</math> (in the linear frequency domain), and consider a pair ('''u''',&nbsp;'''v''') of notes from the root of a given triad in the MOS, {{nowrap|'''0''' (unison) &lt; '''u''' &lt; '''v'''}}. Let '''p''', '''g''' be a basis formally representing the MOS scale's period and generator. Write  


<math>\begin{align}
<math>\begin{align}
Line 68: Line 74:
The existence of an exact tuning for a delta signature specification is only guaranteed to hold when we only care about a ratio between ''two'' terms in the delta signature being exact. If we want to optimize an arbitrary specified delta signature (with some deltas possibly held free), we can use a least-squares-error solution instead to minimize the error.
The existence of an exact tuning for a delta signature specification is only guaranteed to hold when we only care about a ratio between ''two'' terms in the delta signature being exact. If we want to optimize an arbitrary specified delta signature (with some deltas possibly held free), we can use a least-squares-error solution instead to minimize the error.


== Least-squares error ==
== Error measures ==
Least-squares linear error (here linear means "in frequency space, not pitch space") is a proposed error measure for approximations to DR chords. Like any other numerical measure of concordance or error, you should take it with a grain of salt.
{{main|Error measures for DR chords}}
=== Fully DR ===
The idea motivating least-squares linear error on a chord as an approximation to a given delta signature is the following: Say we want the error of a chord 1:''r''<sub>1</sub>:''r''<sub>2</sub>:...:''r''<sub>''n''</sub> (in increasing order), with {{nowrap|''n'' &gt; 1}}, in the linear domain as an approximation to a fully delta-rational chord with signature {{nowrap|+δ<sub>1</sub> +δ<sub>2</sub> ... +δ<sub>''n''</sub>
}}, i.e. a chord
 
<math> x : x + \delta_1 : \cdots : x + \sum_{l=1}^n \delta_l.</math>
 
We can vary ''x'' and ask, "By at least how much (in the linear domain) does the approximating chord have to be off for any ''x'' > 0?" When a specific ''x'' > 0 achieves this minimum, the resulting chord with delta signature {{nowrap|+δ<sub>1</sub> +δ<sub>2</sub> ... +δ<sub>''n''</sub>
}} is taken to be the DR chord that is being approximated.
 
Rewriting a bit, suppose the chord that is considered the approximation is 1:''f''<sub>1</sub>:''f''<sub>2</sub>:...:''f''<sub>''n''</sub>. Let <math>D_i = \sum_{k=1}^i \delta_k</math> be the delta signature {{nowrap|+δ<sub>1</sub> +δ<sub>2</sub> ... +δ<sub>''n''</sub>
}} written cumulatively. Then the resulting linear least-squares optimization problem is
 
<math>
\displaystyle{ \underset{x}{\text{minimize}}  \sqrt{\sum_{i=1}^n \Bigg( \frac{x + D_i}{x} - f_i \Bigg)^2 }  = \underset{x}{\text{minimize}}  \sqrt{\sum_{i=1}^n \Bigg( 1 + \frac{D_i}{x} - f_i \Bigg)^2 } }
</math>
 
with solution
 
<math>
x = \displaystyle{\frac{\sum_{i=1}^n D_i }{-n + \sum_{i=1}^n f_i},}
</math>
 
which can be plugged back into the error formula to obtain the error. (We multiply the target DR chord by ''x'' in order to compare it to the approximation on the same isodifferential series.) Note that scaling the delta signature does not affect the error, a critical property for a DR error measure.
 
The least-squares linear error measure does not form a metric on the set of delta signatures with a fixed number of terms, since it is not symmetric.
 
=== Partially DR ===
Suppose we wish to approximate a target delta signature of the form <math>+\delta_1 +? +\delta_3</math> with the chord <math>1:f_1:f_2:f_3</math> (where the +? is free to vary). By a derivation similar to the above, the least-squares problem is
 
<math>
\displaystyle {\underset{x,y}{\text{minimize}} \sqrt{\bigg(\frac{x + \delta_1}{x} - f_1 \bigg)^2 + \bigg(\frac{x+\delta_1 + y}{x} - f_2 \bigg)^2 + \bigg(\frac{x+\delta_1 + y + \delta_3}{x} - f_3 \bigg)^2 }}.
</math>
 
We can set the partial derivatives with respect to ''x'' and ''y'' of the inner expression equal to zero (since the derivative of sqrt() is never 0) and use SymPy to solve the system:
 
<syntaxhighlight lang="py">
import sympy
x = sympy.Symbol("x", real=True)
y = sympy.Symbol("y", real=True)
d1 = sympy.Symbol("\\delta_{1}", real=True)
d2 = sympy.Symbol("\\delta_{2}", real=True)
d3 = sympy.Symbol("\\delta_{3}", real=True)
f1 = sympy.Symbol("f_1", real=True)
f2 = sympy.Symbol("f_2", real=True)
f3 = sympy.Symbol("f_3", real=True)
err_squared = ((x + d1) / x - f1) ** 2 + ((x + d1 + y) / x - f2) ** 2 + ((x + d1 + y + d3) / x - f3) ** 2
err_squared.expand()
err_squared_x = sympy.diff(err_squared, x)
err_squared_y = sympy.diff(err_squared, y)
sympy.nonlinsolve([err_squared_x, err_squared_y], [x, y])
</syntaxhighlight>
 
We similarly include a free variable to be optimized for every additional +?, after coalescing two consecutive +?'s and omitting the middle note. If two variables are related to each other but not to the integer deltas in the signatures, they have a common variable.


== DR chords in small edos ==
== DR chords in small edos ==
=== Fully DR triads ===
=== Fully DR triads ===
{{main|Delta-rational triads in small edos}}
{{main|Delta-rational triads in small edos}}
=== Partially DR tetrads ===
=== Partially DR tetrads ===
{{main|Partially delta-rational tetrads in small edos}}
{{main|Partially delta-rational tetrads in small edos}}


== DR and RTT ==<!--Essentially tempered [[Dyadic chord|dyadic]] triads are also more difficult to tune with simple delta-signatures, since they lack simple JI preimages.-->
== DR and RTT ==<!--Essentially tempered [[Dyadic chord|dyadic]] triads are also more difficult to tune with simple delta-signatures, since they lack simple JI preimages.-->
As stated above, one can tune a rank-2 regular temperament or a MOS scale in such a way that a triad of interest exactly "inherits" its delta signature from a simple JI mapping.
As stated above, one can tune a rank-2 regular temperament or a MOS scale in such a way that a triad of interest exactly "inherits" its delta signature from a simple JI mapping.


Line 145: Line 98:
! rowspan="2" | Edos
! rowspan="2" | Edos
|-
|-
! g<sup>10</sup>
! ''g''<sup>10</sup>
! g<sup>9</sup>
! ''g''<sup>9</sup>
! g<sup>8</sup>
! ''g''<sup>8</sup>
! g<sup>7</sup>
! ''g''<sup>7</sup>
! g<sup>6</sup>
! ''g''<sup>6</sup>
! g<sup>5</sup>
! ''g''<sup>5</sup>
! g<sup>4</sup>
! ''g''<sup>4</sup>
! g<sup>3</sup>
! ''g''<sup>3</sup>
! g<sup>2</sup>
! ''g''<sup>2</sup>
! g<sup>1</sup>
! ''g''<sup>1</sup>
! g<sup>0</sup>
! ''g''<sup>0</sup>
|-
|-
|  
|  
Line 1,198: Line 1,151:
! colspan="2" rowspan="2" | Not JI, but isodifferential
! colspan="2" rowspan="2" | Not JI, but isodifferential
| style="white-space: nowrap;" | φ:(φ + 1):(φ + 2):(φ + 3)
| style="white-space: nowrap;" | φ:(φ + 1):(φ + 2):(φ + 3)
| rowspan="7" | No, not all or none
| rowspan="8" | No, not all or none
| +1+1+1
| +1+1+1
|-
|-
Line 1,243: Line 1,196:


== External links ==
== External links ==
* [https://inthar-raven.github.io/delta/ Inthar's DR chord explorer (Includes least-squares linear error calculation)]
* [http://turbofishcrow.github.io/delta/ Inthar's DR chord explorer (Includes least-squares linear error calculation)]


[[Category:Chords]]
[[Category:Chord]]
[[Category:Harmonic]]
[[Category:Harmonic]]
[[Category:Lists of scales]]
[[Category:Lists of scales]]
[[Category:Xenharmonic series]]
[[Category:Xenharmonic series]]