Wedgie/Archived version: Difference between revisions

m Internalize wikipedia links
m Readability improvement and +todo
Line 3: Line 3:
In geometric terms, given JI ratios ''u'' and ''v'', and a rank-2 temperament's wedgie ''W'', the number ''W''(''u'', ''v'') is the (normalized) signed area of the parallelogram spanned by (tempered versions of) ''u'' and ''v''. This is the determinant of the tempered versions of ''u'' and ''v''. The musical interpretation of the parallelogram spanned by ''u'' and ''v'' is: If you want to consider intervals that are multiples of ''u'' apart the same note (for example, if you want an octave-equivalent scale), ''W''(''u'', ''v'') tells you how many generators of your rank-2 temperament it would take to get to ''v''. The reason that wedgies work as unique identifiers of temperaments is that the value ''W''(''u'', ''v'') only depends on what the temperament does to ''u'' and ''v'', and this dependence (in a sense) matches up exactly with what commas are tempered out by the temperament.
In geometric terms, given JI ratios ''u'' and ''v'', and a rank-2 temperament's wedgie ''W'', the number ''W''(''u'', ''v'') is the (normalized) signed area of the parallelogram spanned by (tempered versions of) ''u'' and ''v''. This is the determinant of the tempered versions of ''u'' and ''v''. The musical interpretation of the parallelogram spanned by ''u'' and ''v'' is: If you want to consider intervals that are multiples of ''u'' apart the same note (for example, if you want an octave-equivalent scale), ''W''(''u'', ''v'') tells you how many generators of your rank-2 temperament it would take to get to ''v''. The reason that wedgies work as unique identifiers of temperaments is that the value ''W''(''u'', ''v'') only depends on what the temperament does to ''u'' and ''v'', and this dependence (in a sense) matches up exactly with what commas are tempered out by the temperament.


A wedgie is written as a list of entries that give the values of the wedgie on the basis elements of the [[JI subgroup]] that the temperament is on. By the alternating property [i.e. ''W''(''u'', ''v'') = &minus;''W''(''v'', ''u'')] and bilinearity [''W'' is linear in each argument separately], specifying the values on basis elements of the JI subgroup is enough to define ''W'' as an alternating bilinear form on all of the JI subgroup. The simplest example is rank-2 wedgies: Let ''a'' and ''b'' be (non-[[contorted]]) vals on a [[JI subgroup]] ''q''<sub>1</sub>.[...].''q''<sub>''n''</sub> (where the ''q''<sub>''i''</sub> need not be prime). Then the entries of the wedgie ''W'' corresponding to the rank-2 temperament ''a''&''b'' of the JI subgroup ''q''<sub>1</sub>.[...].''q''<sub>''n''</sub> are (ignoring sign):
A wedgie is written as a list of entries that give the values of the wedgie on the basis elements of the [[JI subgroup]] that the temperament is on. By the alternating property [i.e. ''W''(''u'', ''v'') = &minus;''W''(''v'', ''u'')] and bilinearity [''W'' is linear in each argument separately], specifying the values on basis elements of the JI subgroup is enough to define ''W'' as an alternating bilinear form on all of the JI subgroup. The simplest example is rank-2 wedgies: Let ''a'' and ''b'' be (non-[[contorted]]) vals on a [[JI subgroup]] ''q''<sub>1</sub>.[…].''q''<sub>''n''</sub> (where the ''q''<sub>''i''</sub> need not be prime). Then the entries of the wedgie ''W'' corresponding to the rank-2 temperament ''a''&''b'' of the JI subgroup ''q''<sub>1</sub>.[…].''q''<sub>''n''</sub> are (ignoring sign):


<math>W(q_i, q_j) = a(q_i)b(q_j) - a(q_j)b(q_i) \text{ for } i < j.</math>  
<math>W(q_i, q_j) = a(q_i)b(q_j) - a(q_j)b(q_i) \text{ for } i < j.</math>  


(Note that by the alternating property, W(q<sub>i</sub>, q<sub>i</sub>) = 0 for all i.)
(Note that by the alternating property, ''W''(''q''<sub>''i''</sub>, ''q''<sub>''i''</sub>) = 0 for all ''i''.)


For the p_n-prime limit, the entries of ''W'' are conventionally listed in the order  
For the ''p''<sub>''n''</sub>-prime limit, the entries of ''W'' are conventionally listed in the order  


<math>\langle\langle W(2, 3) \ ... \ W(2, p_n) \ W(3, 5) \ ... \ W(3, p_n) \ ... W(p_{n-2}, p_{n-1}) \ W(p_{n-2}, p_n)\ W(p_{n-1}, p_n)]].</math>  
<math>\langle\langle W(2, 3) \ \ldots \ W(2, p_n) \ W(3, 5) \ ldots \ W(3, p_n) \ ldots W(p_{n-2}, p_{n-1}) \ W(p_{n-2}, p_n)\ W(p_{n-1}, p_n)]].</math>  


For example, a 5-limit wedgie is of the form
For example, a 5-limit wedgie is of the form
Line 21: Line 21:
<math>\langle \langle W(2, 3) \ W(2,5) \ W(2, 7) \ W(3, 5) \ W(3, 7) \ W(5, 7)]].</math>
<math>\langle \langle W(2, 3) \ W(2,5) \ W(2, 7) \ W(3, 5) \ W(3, 7) \ W(5, 7)]].</math>


More generally, if one takes ''r'' independent [[vals]] ''V''<sub>1</sub>, ..., ''V''<sub>''r''</sub> in a rank-''n'' [[JI subgroup]] ''q''<sub>1</sub>.[...].''q''<sub>''n''</sub>, then the wedgie for the rank-''r'' temperament ''V''<sub>1</sub>& ...&''V''<sub>''r''</sub> is defined by:
More generally, if one takes ''r'' independent [[vals]] ''V''<sub>1</sub>, …, ''V''<sub>''r''</sub> in a rank-''n'' [[JI subgroup]] ''q''<sub>1</sub>.[…].''q''<sub>''n''</sub>, then the wedgie for the rank-''r'' temperament ''V''<sub>1</sub>&…&''V''<sub>''r''</sub> is defined by:
# Take the [[Wikipedia: Wedge product|wedge product]] of the vals, producing an ''r''-'''multival'''.
# Take the [[Wikipedia: Wedge product|wedge product]] of the vals, producing an ''r''-'''multival'''.
# Divide out the greatest common divisior of the entries.
# Divide out the greatest common divisior of the entries.
# If the first non-zero entry of the result of step 2 is negative, every entry of the multival is multiplied by &minus;1, changing the sign of the first non-zero entry to be positive.  
# If the first non-zero entry of the result of step 2 is negative, every entry of the multival is multiplied by &minus;1, changing the sign of the first non-zero entry to be positive.  
The result is the wedgie of the rank-''r'' temperament ''V''<sub>1</sub>&...&''V''<sub>r</sub>, whose entries are (ignoring steps 2 and 3):
The result is the wedgie of the rank-''r'' temperament ''V''<sub>1</sub>&…&''V''<sub>r</sub>, whose entries are (ignoring steps 2 and 3):


<math>W(q_{k_1}, ..., q_{k_r}) = \det[V_i(q_{k_j})]_{i,j}, \ \text{for} \ 1 < k_j < n, </math>
<math>W(q_{k_1}, ldots, q_{k_r}) = \det[V_i(q_{k_j})]_{i,j}, \ \text{for} \ 1 < k_j < n, </math>


where <math>[V_i(q_{k_j})]_{i,j}</math> denotes the ''r''×''r'' matrix whose (''i'', ''j'') entry is <math>V_i(q_{k_j})</math>. These are ''r''-dimensional quantities, the volumes of the ''r''-dimensional parallelograms spanned by ''q''<sub>''k''<sub>''j''</sub></sub> in the temperament's lattice.
where <math>[V_i(q_{k_j})]_{i,j}</math> denotes the ''r''×''r'' matrix whose (''i'', ''j'') entry is <math>V_i(q_{k_j})</math>. These are ''r''-dimensional quantities, the volumes of the ''r''-dimensional parallelograms spanned by ''q''<sub>''k''<sub>''j''</sub></sub> in the temperament's lattice.


==How the period and generator falls out of a rank-2 wedgie==
== How the period and generator falls out of a rank-2 wedgie ==
The following is a procedure for finding a period and a generator for a rank-2 regular temperament on the 2.q_1.(...).q_n [[Subgroup temperaments|JI subgroup]]. We also give a (hopefully convincing and enlightening) proof of why the procedure always works. We'll assume that the [[equave]] is the octave, but non-octave JI equaves can be substituted for the octave if needed, by substituting the appropriate JI ratio for 2/1.
The following is a procedure for finding a period and a generator for a rank-2 regular temperament on the 2.''q''<sub>1</sub>.(…).q<sub>''n''</sub> [[JI subgroup]]. We also give a (hopefully convincing and enlightening) proof of why the procedure always works. We'll assume that the [[equave]] is the octave, but non-octave JI equaves can be substituted for the octave if needed, by substituting the appropriate JI ratio for 2/1.


The following assumes that:
The following assumes that:
* you can think of JI ratios as vectors living in the n-dimensional lattice of the "JI subgroup"
* you can think of JI ratios as vectors living in the ''n''-dimensional lattice of the "JI subgroup"
* you know what a "period" and a "generator" of a rank-2 temperament are
* you know what a "period" and a "generator" of a rank-2 temperament are
* you know what a [[val]] is and how to work with one.
* you know what a [[val]] is and how to work with one.
===The procedure===
Consider the rank-2 temperament a&b, where a and b are two [[val]]s. Then the entries of the wedgie W corresponding to a&b are W(2, q_1), ..., W(2, q_n), and W(q_i, q_j) for i < j, and the entry W(p,q) is given by a(p)b(q) - a(q)b(p).


To find the '''period''': Let d = gcd(W(2, q_1), ..., W(2, q_n)). Then your period is 1\d.
=== The procedure ===
Consider the rank-2 temperament a&b, where a and b are two [[val]]s. Then the entries of the wedgie W corresponding to a&b are W(2, ''q''<sub>1</sub>), …, W(2, ''q''<sub>''n''</sub>), and W(''q''<sub>''i''</sub>, ''q''<sub>''j''</sub>) for ''i'' < ''j'', and the entry W(''p'', ''q'') is given by a(''p'')b(''q'') - a(''q'')b(''p'').


To find (a JI interpretation of) the '''generator''': Use the [[Wikipedia: Extended Euclidean algorithm|extended Euclidean algorithm]] to find a JI ratio g = q_1^a_1 ... q_n^a_n (equivalently, a linear combination g = a_1 q_1 + ... + a_n q_n) such that W(2, g) = a_1 W(2, q_1) + ... a_n W(2,q_n) = d.
To find the '''period''': Let ''d'' = gcd(W(2, ''q''<sub>1</sub>), …, W(2, ''q''<sub>''n''</sub>)). Then your period is 1\''d''.
 
To find (a JI interpretation of) the '''generator''': Use the [[Wikipedia: Extended Euclidean algorithm|extended Euclidean algorithm]] to find a JI ratio ''g'' = ''q''<sub>1</sub><sup>''a''<sub>1</sub></sup> … q<sub>''n''</sub><sup>''a''<sub>''n''</sub></sup> (equivalently, a linear combination g = ''a''<sub>1</sub>''q''<sub>1</sub> + … + ''a''<sub>''n''</sub>''q''<sub>''n''</sub>) such that W(2, ''g'') = a<sub>1</sub> W(2, ''q''<sub>1</sub>) + … a<sub>''n''</sub> W(2, q<sub>''n''</sub>) = ''d''.


Now choosing an optimal tuning for the temperament is a matter of choosing a way to measure error from JI and minimizing the error with linear algebra (read: a program such as the x31eq temperament finder). For example, the [[TE tuning|TE]] and [[POTE tuning|POTE]] tunings are based on minimizing [[TE error]].
Now choosing an optimal tuning for the temperament is a matter of choosing a way to measure error from JI and minimizing the error with linear algebra (read: a program such as the x31eq temperament finder). For example, the [[TE tuning|TE]] and [[POTE tuning|POTE]] tunings are based on minimizing [[TE error]].


===Example===
=== Example ===
Consider the wedgie W = &lt;&lt;1 4 4|| for 2.3.5 meantone (the 12&19 temperament). We have W(2,3) = 1 and W(2,5) = 4, so d = 1, and our period is 1\1. We already have W(2,3) = 1, so we can use 3/1 as our generator. Alternatively, W(2, 3/2) = W(2,3) - W(2, 2) = W(2, 3) = 1, so 3/2 is a valid generator for meantone as well.
Consider the wedgie W = &lt;&lt;1 4 4|| for 2.3.5 meantone (the 12&19 temperament). We have W(2,3) = 1 and W(2,5) = 4, so d = 1, and our period is 1\1. We already have W(2,3) = 1, so we can use 3/1 as our generator. Alternatively, W(2, 3/2) = W(2,3) - W(2, 2) = W(2, 3) = 1, so 3/2 is a valid generator for meantone as well.


===Proof (a bit technical)===
=== Proof (a bit technical) ===
The following additionally assumes that you know what the words "basis", "linear map", and "determinant" mean.
The following additionally assumes that you know what the words "basis", "linear map", and "determinant" mean.


Line 124: Line 125:
[[Category:Math]]
[[Category:Math]]
[[Category:Theory]]
[[Category:Theory]]
{{todo| improve readability }}