Normal forms: Difference between revisions

m +1
Normal val lists: readability improvement
Line 37: Line 37:


== Normal val lists ==
== Normal val lists ==
If L is a list of n vals, we may write it as an nxm matrix, where the rows of the matrix are the vals, and m = pi(p), where p is the prime limit. To get the normal val list, we do the following:
If L is a list of ''n'' vals, we may write it as an ''n''×''m'' matrix, where the rows of the matrix are the vals, and ''m'' = π (''p''), where ''p'' is the prime limit. To get the normal val list, we do the following:


(1) Hermite reduce the matrix for L
# Hermite reduce the matrix for L
# Throw away all rows which consist of nothing but zeros, resulting in a ''k''×''m'' matrix
# Find the [[Wikipedia: Moore–Penrose pseudoinverse|Moore–Penrose pseudoinverse]] of the ''k''×''m'' matrix, and multiply this from the left by the row vector 1200·[1 log<sub>2</sub>3 log<sub>2</sub>5 … log<sub>2</sub>''p'']. If the ''i''-th entry in the result is negative, multiply the corresponding val by -1. Return the result as the normalized val list.


(2) Throw away all rows which consist of nothing but zeros, resulting in a kxm matrix
The point of steps two and three is that now the vals on the list correspond to a list of generators which are all positive (written additively) or equivalently greater than 1 (written multiplicatively). Just as a normal comma list can be used to classify an [[abstract regular temperament]], so can a normal val list. The val list is what on [[Graham Breed]]'s [http://x31eq.com/temper/ web site] is called a "mapping", put into a canonical form. The "Maps" (though not the "Map to lattice") listed on temperament pages of this wiki are all normal val lists; an example would be [{{val| 1 0 -4 -13 }}, {{val| 0 1 4 10 }}], the normal val list for septimal meantone. Using this as input, the output is 1199.25¢, 1899.45¢ (tempered 2/1, tempered 3/1).
 
(3) Find the [http://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse Moore-Penrose pseudoinverse] of the kxm matrix, and multiply this from the left by the row vector [1200 1200*log2(3) 1200*log2(5) ... 1200*log2(p)]. If the ith entry in the result is negative, multiply the corresponding val by -1. Return the result as the normalized val list.
 
The point of steps two and three is that now the vals on the list correspond to a list of generators which are all positive (written additively) or equivalently greater than 1 (written multiplicatively.) Just as a normal comma list can be used to classify an [[Abstract_regular_temperament|abstract regular temperament]], so can a normal val list. The val list is what on [[Graham_Breed|Graham Breed]]'s [http://x31eq.com/temper/ web site] is called a "mapping", put into a canonical form. The "Maps" (though not the "Map to lattice") listed on temperament pages of this wiki are all normal val lists; an example would be [&lt;1 0 -4 -13|, &lt;0 1 4 10|], the normal val list for septimal meantone. Using this as input, the output is 1199.25¢, 1899.45¢ (tempered 2/1, tempered 3/1).


==Maple code==
==Maple code==