Tp tuning: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Wikispaces>genewardsmith
**Imported revision 350566972 - Original comment: **
Wikispaces>genewardsmith
**Imported revision 350573190 - Original comment: **
Line 1: Line 1:
<h2>IMPORTED REVISION FROM WIKISPACES</h2>
<h2>IMPORTED REVISION FROM WIKISPACES</h2>
This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br>
This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br>
: This revision was by author [[User:genewardsmith|genewardsmith]] and made on <tt>2012-07-05 23:52:05 UTC</tt>.<br>
: This revision was by author [[User:genewardsmith|genewardsmith]] and made on <tt>2012-07-06 00:27:43 UTC</tt>.<br>
: The original revision id was <tt>350566972</tt>.<br>
: The original revision id was <tt>350573190</tt>.<br>
: The revision comment was: <tt></tt><br>
: The revision comment was: <tt></tt><br>
The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br>
The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br>
Line 25: Line 25:


=L2 tuning=
=L2 tuning=
In the special case where p = 2, the Lp norm becomes the L2 norm, which is the [[Tenney-Euclidean metrics|Tenney-Euclidean]] norm, or TE complexity. Associated to this norm is L2 tuning, or TE tuning, extended to arbitrary JI groups, and the TE error, which is E2(S) for the temperament S. Starting from a [[gencom]] for the temperament, we may find the tuning by the following proceedure:
In the special case where p = 2, the Lp norm becomes the L2 norm, which is the [[Tenney-Euclidean metrics|Tenney-Euclidean]] norm, or TE complexity. Associated to this norm is L2 tuning, or TE tuning, extended to arbitrary JI groups, and the L2 error, which is E2(S) for the temperament S, and which is approximately proportionaal to [[Tenney-Euclidean+temperament+measures#TE error|TE error]]. Starting from a [[gencom]] for the temperament, we may find the tuning and the L2 error by the following proceedure:


# Convert the gencom into monzo form.
# Convert the gencom into monzo form.
Line 34: Line 34:
# The result of the maximization process is a positive definite quadratic form Q(x1, x2, ..., xn) in n indeterminates x1, x2, ..., xn.
# The result of the maximization process is a positive definite quadratic form Q(x1, x2, ..., xn) in n indeterminates x1, x2, ..., xn.
# Find the point T on the subspace of G-tuning space spanned by the [[Gencom|gencom mapping]] closest to the JIP using the distance function defined by Q. As usual the JIP is &lt;1 1 1 ... 1|. Since Q is a quadratic polynomial, this minimal distance is easily found by calculus methods.
# Find the point T on the subspace of G-tuning space spanned by the [[Gencom|gencom mapping]] closest to the JIP using the distance function defined by Q. As usual the JIP is &lt;1 1 1 ... 1|. Since Q is a quadratic polynomial, this minimal distance is easily found by calculus methods.
# Since the primes may or may not be in the group G, the mapping of primes in T may or may not make sense by itself; however, now unweight T and apply it to the generators of the gencom, and obtain the TE tuning of those generators, which defines the TE tuning for the temperament defined by the gencom.</pre></div>
# Since the primes may or may not be in the group G, the mapping of primes in T may or may not make sense by itself; however, now unweight T and apply it to the generators of the gencom, and obtain the TE tuning of those generators, which defines the TE tuning for the temperament defined by the gencom.
# Given the tuning T, we may find the L2 error as PE2s(T) by constrained optimization of ErrT) under the constraint M∙M = 1.</pre></div>
<h4>Original HTML content:</h4>
<h4>Original HTML content:</h4>
<div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;width:200%;white-space: pre-wrap ! important" class="old-revision-html">&lt;html&gt;&lt;head&gt;&lt;title&gt;Tp tuning&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;!-- ws:start:WikiTextTocRule:8:&amp;lt;img id=&amp;quot;wikitext@@toc@@flat&amp;quot; class=&amp;quot;WikiMedia WikiMediaTocFlat&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/flat?w=100&amp;amp;h=16&amp;quot;/&amp;gt; --&gt;&lt;!-- ws:end:WikiTextTocRule:8 --&gt;&lt;!-- ws:start:WikiTextTocRule:9: --&gt;&lt;a href="#Definition"&gt;Definition&lt;/a&gt;&lt;!-- ws:end:WikiTextTocRule:9 --&gt;&lt;!-- ws:start:WikiTextTocRule:10: --&gt; | &lt;a href="#Dual norm"&gt;Dual norm&lt;/a&gt;&lt;!-- ws:end:WikiTextTocRule:10 --&gt;&lt;!-- ws:start:WikiTextTocRule:11: --&gt; | &lt;a href="#L2 tuning"&gt;L2 tuning&lt;/a&gt;&lt;!-- ws:end:WikiTextTocRule:11 --&gt;&lt;!-- ws:start:WikiTextTocRule:12: --&gt;
<div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;width:200%;white-space: pre-wrap ! important" class="old-revision-html">&lt;html&gt;&lt;head&gt;&lt;title&gt;Tp tuning&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;!-- ws:start:WikiTextTocRule:8:&amp;lt;img id=&amp;quot;wikitext@@toc@@flat&amp;quot; class=&amp;quot;WikiMedia WikiMediaTocFlat&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/flat?w=100&amp;amp;h=16&amp;quot;/&amp;gt; --&gt;&lt;!-- ws:end:WikiTextTocRule:8 --&gt;&lt;!-- ws:start:WikiTextTocRule:9: --&gt;&lt;a href="#Definition"&gt;Definition&lt;/a&gt;&lt;!-- ws:end:WikiTextTocRule:9 --&gt;&lt;!-- ws:start:WikiTextTocRule:10: --&gt; | &lt;a href="#Dual norm"&gt;Dual norm&lt;/a&gt;&lt;!-- ws:end:WikiTextTocRule:10 --&gt;&lt;!-- ws:start:WikiTextTocRule:11: --&gt; | &lt;a href="#L2 tuning"&gt;L2 tuning&lt;/a&gt;&lt;!-- ws:end:WikiTextTocRule:11 --&gt;&lt;!-- ws:start:WikiTextTocRule:12: --&gt;
Line 57: Line 58:
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc2"&gt;&lt;a name="L2 tuning"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;L2 tuning&lt;/h1&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc2"&gt;&lt;a name="L2 tuning"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;L2 tuning&lt;/h1&gt;
In the special case where p = 2, the Lp norm becomes the L2 norm, which is the &lt;a class="wiki_link" href="/Tenney-Euclidean%20metrics"&gt;Tenney-Euclidean&lt;/a&gt; norm, or TE complexity. Associated to this norm is L2 tuning, or TE tuning, extended to arbitrary JI groups, and the TE error, which is E2(S) for the temperament S. Starting from a &lt;a class="wiki_link" href="/gencom"&gt;gencom&lt;/a&gt; for the temperament, we may find the tuning by the following proceedure:&lt;br /&gt;
In the special case where p = 2, the Lp norm becomes the L2 norm, which is the &lt;a class="wiki_link" href="/Tenney-Euclidean%20metrics"&gt;Tenney-Euclidean&lt;/a&gt; norm, or TE complexity. Associated to this norm is L2 tuning, or TE tuning, extended to arbitrary JI groups, and the L2 error, which is E2(S) for the temperament S, and which is approximately proportionaal to [[Tenney-Euclidean+temperament+measures#TE error|TE error]]. Starting from a &lt;a class="wiki_link" href="/gencom"&gt;gencom&lt;/a&gt; for the temperament, we may find the tuning and the L2 error by the following proceedure:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Convert the gencom into monzo form.&lt;/li&gt;&lt;li&gt;Convert the monzos to weighted coordinates.&lt;/li&gt;&lt;li&gt;Multiply each monzo by an indeterminate, creating a parametrized n-dimensional weighted monzo, where n is the number of primes in the prime limit; call that M.&lt;/li&gt;&lt;li&gt;Take the dot product of M with a vector &amp;lt;x1 x2 ... xn| consisting of n new indeterminates x1, x2, ..., xn; call that X.&lt;/li&gt;&lt;li&gt;Maximize X^2 subject to the constraint that the M∙M, the dot product of M with itself, is equal to 1. This is maximinzing a quadric subject to a quadratic constraint, and so is easily done via Lagrange multipliers.&lt;/li&gt;&lt;li&gt;The result of the maximization process is a positive definite quadratic form Q(x1, x2, ..., xn) in n indeterminates x1, x2, ..., xn.&lt;/li&gt;&lt;li&gt;Find the point T on the subspace of G-tuning space spanned by the &lt;a class="wiki_link" href="/Gencom"&gt;gencom mapping&lt;/a&gt; closest to the JIP using the distance function defined by Q. As usual the JIP is &amp;lt;1 1 1 ... 1|. Since Q is a quadratic polynomial, this minimal distance is easily found by calculus methods.&lt;/li&gt;&lt;li&gt;Since the primes may or may not be in the group G, the mapping of primes in T may or may not make sense by itself; however, now unweight T and apply it to the generators of the gencom, and obtain the TE tuning of those generators, which defines the TE tuning for the temperament defined by the gencom.&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</pre></div>
&lt;ol&gt;&lt;li&gt;Convert the gencom into monzo form.&lt;/li&gt;&lt;li&gt;Convert the monzos to weighted coordinates.&lt;/li&gt;&lt;li&gt;Multiply each monzo by an indeterminate, creating a parametrized n-dimensional weighted monzo, where n is the number of primes in the prime limit; call that M.&lt;/li&gt;&lt;li&gt;Take the dot product of M with a vector &amp;lt;x1 x2 ... xn| consisting of n new indeterminates x1, x2, ..., xn; call that X.&lt;/li&gt;&lt;li&gt;Maximize X^2 subject to the constraint that the M∙M, the dot product of M with itself, is equal to 1. This is maximinzing a quadric subject to a quadratic constraint, and so is easily done via Lagrange multipliers.&lt;/li&gt;&lt;li&gt;The result of the maximization process is a positive definite quadratic form Q(x1, x2, ..., xn) in n indeterminates x1, x2, ..., xn.&lt;/li&gt;&lt;li&gt;Find the point T on the subspace of G-tuning space spanned by the &lt;a class="wiki_link" href="/Gencom"&gt;gencom mapping&lt;/a&gt; closest to the JIP using the distance function defined by Q. As usual the JIP is &amp;lt;1 1 1 ... 1|. Since Q is a quadratic polynomial, this minimal distance is easily found by calculus methods.&lt;/li&gt;&lt;li&gt;Since the primes may or may not be in the group G, the mapping of primes in T may or may not make sense by itself; however, now unweight T and apply it to the generators of the gencom, and obtain the TE tuning of those generators, which defines the TE tuning for the temperament defined by the gencom.&lt;/li&gt;&lt;li&gt;Given the tuning T, we may find the L2 error as PE2s(T) by constrained optimization of ErrT) under the constraint M∙M = 1.&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</pre></div>

Revision as of 00:27, 6 July 2012

IMPORTED REVISION FROM WIKISPACES

This is an imported revision from Wikispaces. The revision metadata is included below for reference:

This revision was by author genewardsmith and made on 2012-07-06 00:27:43 UTC.
The original revision id was 350573190.
The revision comment was:

The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.

Original Wikitext content:

[[toc|flat]]

=Definition=
**Lp tuning** is a generalzation of [[TOP tuning|TOP]] and [[Tenney-Euclidean tuning|TE]] tuning. If p ≥ 1, define the Lp norm, which we may also call the Lp complexity, of any monzo in weighted coordinates b as 
[[math]]
|| |b_2 \ b_3 \ ... \ b_k> ||_p = (|b_2|^p + |b_3|^p + ... + |b_k|^p)^{1/p}
[[math]]
where 2, 3, ... k are the primes up to k in order. In unweighted coordinates, this would be, for unweighted monzo m, 
[[math]]
|| |m_2 \ m_3 \ ... \ m_k> ||_p = (|\log_2(2) m_2|^p + |\log_2(3)m_3|^p + ... + |\log_2(k) m_k|^p)^{1/p}
[[math]]
If q is any positive rational number, ||q||_p is the Lp norm defined by the monzo. 

For some just intonation group G, which is to say some finitely generated group of positive rational numbers which can be either a full prime-limit group or some subgroup of such a group, a regular temperament tuning T for an abstract temperament S is defined by a linear map from monzos belonging to G to a value in cents, such that T(c) = 0 for any comma c of the temperament. We define the error of the tuning on q, Err(q), as |T(q) - cents(q)|, and if q ≠ 1, the //Lp proportional error// is PEp(q) = Err(q)/||q||_p. For any tuning T of the temperament, the set of PEp(q) for all q ≠ 1 in G is bounded, and hence has a least upper bound, the supremum PEps(T). The set of values PEps(T) is bounded below, and by continuity achieves its minimum value, which is the Lp error Ep(S) of the abstract temperament S; if we measure in cents as we've defined above, Ep(S) has units of cents. Any tuning achieving this minimum, so that PEps(T) = Ep(S), is an Lp tuning. Usually this tuning is unique, but in the case p = 1, called the [[TOP tuning]], it may not be. In this case we can chose a TOP tuning canonically by setting it to the limit as p tends to 1 of the Lp tuning, thereby defining a unique tuning Lp(S) for any abstract temperament S on any group G.

=Dual norm=
We can extend the Lp norm on monzos to a [[http://en.wikipedia.org/wiki/Normed_vector_space|vector space norm]] on [[Monzos and Interval Space|interval space]], thereby defining the real normed interval space Lp. This space has a normed subspace generated by monzos belonging to the just intonation group G, which in the case where G is a full p-limit will be the whole of Lp but otherwise might not be; this we call G-interval space. The dual space to G-interval space is G-tuning space, and on this we may define a [[http://en.wikipedia.org/wiki/Dual_norm|dual norm]]. If r1, r2, ... rn are a set of generators for G, which in particular could be a normal list and so define [[Smonzos and Svals|smonzos]] for G, then corresponding generators for the dual space can in particular be the sval generators. On this standard basis for G-tuning space we can express the dual norm canonically as the G-sval norm. If [r1 r2 ... rn] is the normal G generator list, then <cents(r1) cents(r2) ... cents(rn)| is a point, in unweighted coordinates, in G-tuning space, and the nearest point to it under the G-sval norm on the subspace of tunings of some abstract G-temperament S, meaning svals in the null space of its commas, is precisely the Lp tuning Lp(S).

=L2 tuning=
In the special case where p = 2, the Lp norm becomes the L2 norm, which is the [[Tenney-Euclidean metrics|Tenney-Euclidean]] norm, or TE complexity. Associated to this norm is L2 tuning, or TE tuning, extended to arbitrary JI groups, and the L2 error, which is E2(S) for the temperament S, and which is approximately proportionaal to [[Tenney-Euclidean+temperament+measures#TE error|TE error]]. Starting from a [[gencom]] for the temperament, we may find the tuning and the L2 error by the following proceedure:

# Convert the gencom into monzo form.
# Convert the monzos to weighted coordinates.
# Multiply each monzo by an indeterminate, creating a parametrized n-dimensional weighted monzo, where n is the number of primes in the prime limit; call that M.
# Take the dot product of M with a vector <x1 x2 ... xn| consisting of n new indeterminates x1, x2, ..., xn; call that X.
# Maximize X^2 subject to the constraint that the M∙M, the dot product of M with itself, is equal to 1. This is maximinzing a quadric subject to a quadratic constraint, and so is easily done via Lagrange multipliers.
# The result of the maximization process is a positive definite quadratic form Q(x1, x2, ..., xn) in n indeterminates x1, x2, ..., xn.
# Find the point T on the subspace of G-tuning space spanned by the [[Gencom|gencom mapping]] closest to the JIP using the distance function defined by Q. As usual the JIP is <1 1 1 ... 1|. Since Q is a quadratic polynomial, this minimal distance is easily found by calculus methods.
# Since the primes may or may not be in the group G, the mapping of primes in T may or may not make sense by itself; however, now unweight T and apply it to the generators of the gencom, and obtain the TE tuning of those generators, which defines the TE tuning for the temperament defined by the gencom.
# Given the tuning T, we may find the L2 error as PE2s(T) by constrained optimization of ErrT) under the constraint M∙M = 1.

Original HTML content:

<html><head><title>Tp tuning</title></head><body><!-- ws:start:WikiTextTocRule:8:&lt;img id=&quot;wikitext@@toc@@flat&quot; class=&quot;WikiMedia WikiMediaTocFlat&quot; title=&quot;Table of Contents&quot; src=&quot;/site/embedthumbnail/toc/flat?w=100&amp;h=16&quot;/&gt; --><!-- ws:end:WikiTextTocRule:8 --><!-- ws:start:WikiTextTocRule:9: --><a href="#Definition">Definition</a><!-- ws:end:WikiTextTocRule:9 --><!-- ws:start:WikiTextTocRule:10: --> | <a href="#Dual norm">Dual norm</a><!-- ws:end:WikiTextTocRule:10 --><!-- ws:start:WikiTextTocRule:11: --> | <a href="#L2 tuning">L2 tuning</a><!-- ws:end:WikiTextTocRule:11 --><!-- ws:start:WikiTextTocRule:12: -->
<!-- ws:end:WikiTextTocRule:12 --><br />
<!-- ws:start:WikiTextHeadingRule:2:&lt;h1&gt; --><h1 id="toc0"><a name="Definition"></a><!-- ws:end:WikiTextHeadingRule:2 -->Definition</h1>
<strong>Lp tuning</strong> is a generalzation of <a class="wiki_link" href="/TOP%20tuning">TOP</a> and <a class="wiki_link" href="/Tenney-Euclidean%20tuning">TE</a> tuning. If p ≥ 1, define the Lp norm, which we may also call the Lp complexity, of any monzo in weighted coordinates b as <br />
<!-- ws:start:WikiTextMathRule:0:
[[math]]&lt;br/&gt;
|| |b_2 \ b_3 \ ... \ b_k&gt; ||_p = (|b_2|^p + |b_3|^p + ... + |b_k|^p)^{1/p}&lt;br/&gt;[[math]]
 --><script type="math/tex">|| |b_2 \ b_3 \ ... \ b_k> ||_p = (|b_2|^p + |b_3|^p + ... + |b_k|^p)^{1/p}</script><!-- ws:end:WikiTextMathRule:0 --><br />
where 2, 3, ... k are the primes up to k in order. In unweighted coordinates, this would be, for unweighted monzo m, <br />
<!-- ws:start:WikiTextMathRule:1:
[[math]]&lt;br/&gt;
|| |m_2 \ m_3 \ ... \ m_k&gt; ||_p = (|\log_2(2) m_2|^p + |\log_2(3)m_3|^p + ... + |\log_2(k) m_k|^p)^{1/p}&lt;br/&gt;[[math]]
 --><script type="math/tex">|| |m_2 \ m_3 \ ... \ m_k> ||_p = (|\log_2(2) m_2|^p + |\log_2(3)m_3|^p + ... + |\log_2(k) m_k|^p)^{1/p}</script><!-- ws:end:WikiTextMathRule:1 --><br />
If q is any positive rational number, ||q||_p is the Lp norm defined by the monzo. <br />
<br />
For some just intonation group G, which is to say some finitely generated group of positive rational numbers which can be either a full prime-limit group or some subgroup of such a group, a regular temperament tuning T for an abstract temperament S is defined by a linear map from monzos belonging to G to a value in cents, such that T(c) = 0 for any comma c of the temperament. We define the error of the tuning on q, Err(q), as |T(q) - cents(q)|, and if q ≠ 1, the <em>Lp proportional error</em> is PEp(q) = Err(q)/||q||_p. For any tuning T of the temperament, the set of PEp(q) for all q ≠ 1 in G is bounded, and hence has a least upper bound, the supremum PEps(T). The set of values PEps(T) is bounded below, and by continuity achieves its minimum value, which is the Lp error Ep(S) of the abstract temperament S; if we measure in cents as we've defined above, Ep(S) has units of cents. Any tuning achieving this minimum, so that PEps(T) = Ep(S), is an Lp tuning. Usually this tuning is unique, but in the case p = 1, called the <a class="wiki_link" href="/TOP%20tuning">TOP tuning</a>, it may not be. In this case we can chose a TOP tuning canonically by setting it to the limit as p tends to 1 of the Lp tuning, thereby defining a unique tuning Lp(S) for any abstract temperament S on any group G.<br />
<br />
<!-- ws:start:WikiTextHeadingRule:4:&lt;h1&gt; --><h1 id="toc1"><a name="Dual norm"></a><!-- ws:end:WikiTextHeadingRule:4 -->Dual norm</h1>
We can extend the Lp norm on monzos to a <a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Normed_vector_space" rel="nofollow">vector space norm</a> on <a class="wiki_link" href="/Monzos%20and%20Interval%20Space">interval space</a>, thereby defining the real normed interval space Lp. This space has a normed subspace generated by monzos belonging to the just intonation group G, which in the case where G is a full p-limit will be the whole of Lp but otherwise might not be; this we call G-interval space. The dual space to G-interval space is G-tuning space, and on this we may define a <a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Dual_norm" rel="nofollow">dual norm</a>. If r1, r2, ... rn are a set of generators for G, which in particular could be a normal list and so define <a class="wiki_link" href="/Smonzos%20and%20Svals">smonzos</a> for G, then corresponding generators for the dual space can in particular be the sval generators. On this standard basis for G-tuning space we can express the dual norm canonically as the G-sval norm. If [r1 r2 ... rn] is the normal G generator list, then &lt;cents(r1) cents(r2) ... cents(rn)| is a point, in unweighted coordinates, in G-tuning space, and the nearest point to it under the G-sval norm on the subspace of tunings of some abstract G-temperament S, meaning svals in the null space of its commas, is precisely the Lp tuning Lp(S).<br />
<br />
<!-- ws:start:WikiTextHeadingRule:6:&lt;h1&gt; --><h1 id="toc2"><a name="L2 tuning"></a><!-- ws:end:WikiTextHeadingRule:6 -->L2 tuning</h1>
In the special case where p = 2, the Lp norm becomes the L2 norm, which is the <a class="wiki_link" href="/Tenney-Euclidean%20metrics">Tenney-Euclidean</a> norm, or TE complexity. Associated to this norm is L2 tuning, or TE tuning, extended to arbitrary JI groups, and the L2 error, which is E2(S) for the temperament S, and which is approximately proportionaal to [[Tenney-Euclidean+temperament+measures#TE error|TE error]]. Starting from a <a class="wiki_link" href="/gencom">gencom</a> for the temperament, we may find the tuning and the L2 error by the following proceedure:<br />
<br />
<ol><li>Convert the gencom into monzo form.</li><li>Convert the monzos to weighted coordinates.</li><li>Multiply each monzo by an indeterminate, creating a parametrized n-dimensional weighted monzo, where n is the number of primes in the prime limit; call that M.</li><li>Take the dot product of M with a vector &lt;x1 x2 ... xn| consisting of n new indeterminates x1, x2, ..., xn; call that X.</li><li>Maximize X^2 subject to the constraint that the M∙M, the dot product of M with itself, is equal to 1. This is maximinzing a quadric subject to a quadratic constraint, and so is easily done via Lagrange multipliers.</li><li>The result of the maximization process is a positive definite quadratic form Q(x1, x2, ..., xn) in n indeterminates x1, x2, ..., xn.</li><li>Find the point T on the subspace of G-tuning space spanned by the <a class="wiki_link" href="/Gencom">gencom mapping</a> closest to the JIP using the distance function defined by Q. As usual the JIP is &lt;1 1 1 ... 1|. Since Q is a quadratic polynomial, this minimal distance is easily found by calculus methods.</li><li>Since the primes may or may not be in the group G, the mapping of primes in T may or may not make sense by itself; however, now unweight T and apply it to the generators of the gencom, and obtain the TE tuning of those generators, which defines the TE tuning for the temperament defined by the gencom.</li><li>Given the tuning T, we may find the L2 error as PE2s(T) by constrained optimization of ErrT) under the constraint M∙M = 1.</li></ol></body></html>