User:Frostburn/Geometric algebra for regular temperaments: Difference between revisions

Frostburn (talk | contribs)
Geometric algebraic version: Add notes about not strictly needing the wedgie.
Frostburn (talk | contribs)
Add notes about optimizing database lookup. Remove boldface from scalars.
Line 54: Line 54:
and vice versa
and vice versa
:<math>\overleftarrow{12} = \overrightarrow{64/63}i \vee \overrightarrow{81/80}i \vee \overrightarrow{128/125}i</math>
:<math>\overleftarrow{12} = \overrightarrow{64/63}i \vee \overrightarrow{81/80}i \vee \overrightarrow{128/125}i</math>
In higher dimensions with algebra <math>\mathcal{G}(n,0)</math> pseudovals can be decomposed into a wedge of <math>(n-1)</math> vals and vals into a vee of <math>(n-1)</math> pseudovals.
In higher dimensions with algebra <math>\mathcal{G}(n,0)</math> pseudovals can be factored into a wedge of <math>(n-1)</math> vals and vals into a vee of <math>(n-1)</math> pseudovals.


The projection formula for calculating the optimal tuning for a temperament (in Tenney-weighted coordinates)
The projection formula for calculating the optimal tuning for a temperament (in Tenney-weighted coordinates)
Line 65: Line 65:
Let's translate the [[Wedgies_and_multivals#The_procedure|procedure]] introduced in the wedgie page to the notation I'm using.
Let's translate the [[Wedgies_and_multivals#The_procedure|procedure]] introduced in the wedgie page to the notation I'm using.


To find the '''period''' (in n dimensions). Calculate <math>d = gcd(\mathbf{W}_{12}, \mathbf{W}_{13}, \ldots, \mathbf{W}_{1n})</math>, where <math>\mathbf{W}_{1n}</math> are all of the bivector components associated with <math>e_1</math> (i.e. with prime 2) of the 2-wedgie for the temperament. Your period will be 1\d in backslash notation i.e. one step of d equal divisions of the octave.
To find the '''period''' (in n dimensions). Calculate <math>d = gcd(W_{12}, W_{13}, \ldots, W_{1n})</math>, where <math>W_{1n}</math> are all of the bivector components associated with <math>e_1</math> (i.e. with prime 2) of the 2-wedgie for the temperament. Your period will be 1\d in backslash notation i.e. one step of d equal divisions of the octave.


To find the '''generator'''. Solve the equation <math>c_2\mathbf{W}_{12} + c_3\mathbf{W}_{13} + \ldots + c_n\mathbf{W}_{1n} = d</math> for the coefficients <math>c_2,\ldots,c_n</math> (using some algorithm such as the [[Wikipedia:extended Euclidean algorithm|extended Euclidean algorithm]]). Then one valid generator for the temperament is <math>\overrightarrow{g}=c_2e_2 + c_3e_3 + \ldots + c_ne_n</math>. Thus (the tempered version of) the generator represents <math>q_2^{c_2} \cdots q_n^{c_n}</math> where 2.''q''<sub>2</sub>.(…).''q''<sub>n</sub> is the [[JI subgroup]].
To find the '''generator'''. Solve the equation <math>c_2 W_{12} + c_3 W_{13} + \ldots + c_n W_{1n} = d</math> for the coefficients <math>c_2,\ldots,c_n</math> (using some algorithm such as the [[Wikipedia:extended Euclidean algorithm|extended Euclidean algorithm]]). Then one valid generator for the temperament is <math>\overrightarrow{g}=c_2e_2 + c_3e_3 + \ldots + c_ne_n</math>. Thus (the tempered version of) the generator represents <math>q_2^{c_2} \cdots q_n^{c_n}</math> where 2.''q''<sub>2</sub>.(…).''q''<sub>n</sub> is the [[JI subgroup]].


This generator might not be the most meaningful musically, but it's enough to build [[MOS]] scales for rank-2 temperaments which along with the POTE tuning is the main thing you need to compose music in the chosen temperament.
This generator might not be the most meaningful musically, but it's enough to build [[MOS]] scales for rank-2 temperaments which along with the POTE tuning is the main thing you need to compose music in the chosen temperament.
Line 77: Line 77:
:<math>n \overrightarrow{p} ± \overrightarrow{g}, n \in \mathbb{Z}</math>
:<math>n \overrightarrow{p} ± \overrightarrow{g}, n \in \mathbb{Z}</math>
If the temperament is not expressed in lowest terms the number of divisions will miscompensate and you will end up with the wrong equave.
If the temperament is not expressed in lowest terms the number of divisions will miscompensate and you will end up with the wrong equave.
== Optimizing database keys ==
As mentioned before wedgies can be used as unique identifiers of temperaments. The geometric algebra for n-dimensional space is 2<sup>n</sup>-dimensional, but most of the wedgie components are zero and can be dropped. Additionally in the case of rank-2 temperaments there's a neat little [[Wedgies_and_multivals#Constrained_wedgies|trick]] that allows us to drop even more components. In the subgroup ''o''.''p''<sub>1</sub>.''p''<sub>2</sub>.(…).''p''<sub>n</sub> calculate
:<math>\mathbf{T}' = < 1, \log_o(p_2), \log_o(p_3), \ldots, \log_o(p_n) ] \wedge < 0, W_{12}, W_{13}, \ldots, W_{1n} ]</math>
If the temperament is reasonably close to just intonation it can be recovered by rounding <math>\mathbf{T}'</math> to the nearest integer.
Examples in 2.3.5 include [[Meantone_family#Meantone|Meantone]] ~ [1, 4], [[Augmented_family#Augmented|Augmented]] ~ [3, 0] and [[Limmic_temperaments#5-limit_.28blackwood.29|Blackwood]] ~ [0, 5], [[Slendro_clan#Semaphore|Semaphore]] ~ [2, 1] in 2.3.7 and [[Gamelismic_clan#Miracle|Miracle]] ~ [6, -7, -2] in 2.3.5.7.