<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.xen.wiki/index.php?action=history&amp;feed=atom&amp;title=Gral_method</id>
	<title>Gral method - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.xen.wiki/index.php?action=history&amp;feed=atom&amp;title=Gral_method"/>
	<link rel="alternate" type="text/html" href="https://en.xen.wiki/index.php?title=Gral_method&amp;action=history"/>
	<updated>2026-08-08T00:55:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://en.xen.wiki/index.php?title=Gral_method&amp;diff=235316&amp;oldid=prev</id>
		<title>Naren: Expand example, add labeling section</title>
		<link rel="alternate" type="text/html" href="https://en.xen.wiki/index.php?title=Gral_method&amp;diff=235316&amp;oldid=prev"/>
		<updated>2026-08-06T23:21:54Z</updated>

		<summary type="html">&lt;p&gt;Expand example, add labeling section&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:21, 6 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l142&quot;&gt;Line 142:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 142:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The columns a, b, c, d give the basis &amp;lt;math&amp;gt;(a,b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c,d)&amp;lt;/math&amp;gt; corresponding to the search interval &amp;lt;math&amp;gt;[a/c,b/d]&amp;lt;/math&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The columns a, b, c, d give the basis &amp;lt;math&amp;gt;(a,b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c,d)&amp;lt;/math&amp;gt; corresponding to the search interval &amp;lt;math&amp;gt;[a/c,b/d]&amp;lt;/math&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The columns s and t give the resulting step sizes (for which &amp;lt;math&amp;gt;as+ bt = g&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;cs + dt = h&amp;lt;/math&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The columns s and t give the resulting step sizes (for which &amp;lt;math&amp;gt;as+ bt = g&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;cs + dt = h&amp;lt;/math&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The row with mediant 10/17, for example, tells us that we get a 17 note MOS with 12 steps of 63.90 cents and 5 steps of 86.64 cents.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The row with mediant 10/17, for example, tells us that we get a 17 note MOS with 12 steps of 63.90 cents and 5 steps of 86.64 cents.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The corresponding search interval &amp;lt;math&amp;gt;[7/12, 3/5]&amp;lt;/math&amp;gt; tells us that any generator &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;between &amp;lt;math&amp;gt;1200 \cdot 7/12 = 700&amp;lt;/math&amp;gt; cents and &amp;lt;math&amp;gt;1200 \cdot 3/5 = 720&amp;lt;/math&amp;gt; cents will give a 10/17 MOS.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Gral method is a very convenient way to calculate MOS, and it was extensively used by Wilson.&amp;lt;ref name=&amp;quot;wilson-temperament&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wilson-recurrent&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Gral method is a very convenient way to calculate MOS, and it was extensively used by Wilson.&amp;lt;ref name=&amp;quot;wilson-temperament&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wilson-recurrent&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l182&quot;&gt;Line 182:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 185:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Wilson describes each basis as a different keyboard named with the mediant,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Wilson describes each basis as a different keyboard named with the mediant,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;so the basis &amp;lt;math&amp;gt;(1, 3)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(2, 5)&amp;lt;/math&amp;gt; is called the 4/7 keyboard.&amp;lt;ref name=&amp;quot;wilson-gralspectrum&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wilson-gralkeyboard&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;so the basis &amp;lt;math&amp;gt;(1, 3)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(2, 5)&amp;lt;/math&amp;gt; is called the 4/7 keyboard.&amp;lt;ref name=&amp;quot;wilson-gralspectrum&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wilson-gralkeyboard&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Labeling the MOS ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;For a given interval &amp;lt;math&amp;gt;[a/c, b/d]&amp;lt;/math&amp;gt; found by the Gral method,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;we might label the corresponding MOS by either of&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* The mediant &amp;lt;math&amp;gt;m/n = (a + b)/(c + d)&amp;lt;/math&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* The step counts &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So for the MOS corresponding to the row with mediant 10/17 discussed above, we might call it a 10/17 MOS, or a 12&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; 5&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; MOS.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;We can convert between these two labels:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Given the mediant &amp;lt;math&amp;gt;m/n&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;c = m^{-1}\ (\mathrm{mod}\ n)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;d = n - c&amp;lt;/math&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Given the step counts &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;n = c + d&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;m = c^{-1}\ (\mathrm{mod}\ n)&amp;lt;/math&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Here &amp;lt;math&amp;gt;m = c^{-1}\ (\mathrm{mod}\ n)&amp;lt;/math&amp;gt; means &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; is the modular inverse of &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; with respect to &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in Python this is written &amp;lt;code&amp;gt;m = pow(c, -1, n)&amp;lt;/code&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The modular inverse comes up because &amp;lt;math&amp;gt;ad - bc = -1&amp;lt;/math&amp;gt; is equivalent to &amp;lt;math&amp;gt;cm - an = 1&amp;lt;/math&amp;gt;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;so &amp;lt;math&amp;gt;cm \equiv 1\ (\mathrm{mod}\ n)&amp;lt;/math&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l209&quot;&gt;Line 209:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 231:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Erv Wilson]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Erv Wilson]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:MOS scale]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Naren</name></author>
	</entry>
	<entry>
		<id>https://en.xen.wiki/index.php?title=Gral_method&amp;diff=235245&amp;oldid=prev</id>
		<title>Naren: Create page</title>
		<link rel="alternate" type="text/html" href="https://en.xen.wiki/index.php?title=Gral_method&amp;diff=235245&amp;oldid=prev"/>
		<updated>2026-08-06T00:06:58Z</updated>

		<summary type="html">&lt;p&gt;Create page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;Gral method&amp;#039;&amp;#039;&amp;#039; is a method used by [[Erv Wilson]] for keyboard mapping and finding [[MOS|moments of symmetry]].&lt;br /&gt;
&lt;br /&gt;
== Lattice bases ==&lt;br /&gt;
&lt;br /&gt;
For concreteness, consider a two-dimensional keyboard.&lt;br /&gt;
The keys on the keyboard are labeled by pairs of integers &amp;lt;math&amp;gt;(x, y)&amp;lt;/math&amp;gt;, their &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; coordinates.&lt;br /&gt;
The set of all these integer pairs is called a lattice.&amp;lt;ref name=&amp;quot;cassels1971introduction&amp;quot;/&amp;gt;&lt;br /&gt;
For two lattice points &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt;, if we can write any lattice point &amp;lt;math&amp;gt;(x, y)&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\displaystyle&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
    x \\&lt;br /&gt;
    y \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
    =&lt;br /&gt;
    p&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
    a \\&lt;br /&gt;
    b \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
    +&lt;br /&gt;
    q&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
    c \\&lt;br /&gt;
    d \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with integer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;,&lt;br /&gt;
we say &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt; form a basis for the lattice.&lt;br /&gt;
Two points &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt; form a basis if and only if&lt;br /&gt;
&amp;lt;math&amp;gt;ad - bc = \pm 1 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Problem ==&lt;br /&gt;
&lt;br /&gt;
[[File:Gral-diagram.svg|thumb|200px|Figure 1: Lattice geometry for the Gral method.]]&lt;br /&gt;
&lt;br /&gt;
Say we have a lattice with points &amp;lt;math&amp;gt;(x, y)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Consider a quantity &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; which depends linearly on &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
    q = s x + t y&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for some step sizes &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Given two numbers &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt;,&lt;br /&gt;
we are looking for a lattice basis &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt;&lt;br /&gt;
such that the value of &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; at &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; at &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt;, that is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\displaystyle&lt;br /&gt;
\begin{align}&lt;br /&gt;
    g &amp;amp;= a s + b t \\&lt;br /&gt;
    h &amp;amp;= c s + d t&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and for which the step sizes &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; are positive.&lt;br /&gt;
&lt;br /&gt;
The step sizes are determined by the numbers &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the basis &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\displaystyle&lt;br /&gt;
\begin{align}&lt;br /&gt;
    s &amp;amp;= \frac{dg - bh}{\Delta} \\&lt;br /&gt;
    t &amp;amp;= \frac{-cg + ah}{\Delta} \\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\Delta = ad - bc&amp;lt;/math&amp;gt;,&lt;br /&gt;
and &amp;lt;math&amp;gt;\Delta = \pm 1&amp;lt;/math&amp;gt; since &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt; is a lattice basis.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\Delta = -1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;c &amp;gt; 0&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;d &amp;gt; 0&amp;lt;/math&amp;gt;,&lt;br /&gt;
the positive step size conditions &amp;lt;math&amp;gt;s &amp;gt; 0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;t &amp;gt; 0&amp;lt;/math&amp;gt; are equivalent to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\displaystyle&lt;br /&gt;
\frac{a}{c} &amp;lt; \frac{g}{h} &amp;lt; \frac{b}{d}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the problem setup geometrically.&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
&lt;br /&gt;
Given numbers &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt;, the Gral method finds all lattice bases &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt; such that&lt;br /&gt;
* &amp;lt;math&amp;gt;ad - bc = -1&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;a, b, c, d \geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\frac{a}{c} &amp;lt; \frac{g}{h} &amp;lt; \frac{b}{d}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The algorithm is a binary search for the number &amp;lt;math&amp;gt;g/h&amp;lt;/math&amp;gt;,&lt;br /&gt;
starting with the interval &amp;lt;math&amp;gt;[0/1, 1/0]&amp;lt;/math&amp;gt; and &amp;#039;bisecting&amp;#039; each interval &amp;lt;math&amp;gt;[a/c, b/d]&amp;lt;/math&amp;gt; with the mediant &amp;lt;math&amp;gt;(a+b)/(c+d)&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;knuth1994concrete&amp;quot;/&amp;gt;&lt;br /&gt;
Each interval &amp;lt;math&amp;gt;[a/c, b/d]&amp;lt;/math&amp;gt; we encounter in the search has &amp;lt;math&amp;gt;ad - bc = -1&amp;lt;/math&amp;gt;,&lt;br /&gt;
so &amp;lt;math&amp;gt;(a, b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c, d)&amp;lt;/math&amp;gt; form a basis,&lt;br /&gt;
and &amp;lt;math&amp;gt;a/c &amp;lt; g/h &amp;lt; b/d&amp;lt;/math&amp;gt; since &amp;lt;math&amp;gt;g/h&amp;lt;/math&amp;gt; is in each search interval.&lt;br /&gt;
&lt;br /&gt;
== Application to finding MOS ==&lt;br /&gt;
&lt;br /&gt;
The Gral method finds all [[MOS]] formed when stacking a generator of pitch &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; cents within a period of pitch &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; cents.&lt;br /&gt;
Applying the Gral method to &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt;,&lt;br /&gt;
each interval &amp;lt;math&amp;gt;[a/c, b/d]&amp;lt;/math&amp;gt; found gives a [[MOS]] with &amp;lt;math&amp;gt;n = c + d&amp;lt;/math&amp;gt; notes,&lt;br /&gt;
where the generator is at scale degree &amp;lt;math&amp;gt;m = a + b&amp;lt;/math&amp;gt;; call this an &amp;lt;math&amp;gt;m/n&amp;lt;/math&amp;gt; MOS.&lt;br /&gt;
&lt;br /&gt;
* The step sizes &amp;lt;math&amp;gt;s = -d g + b h&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t = c g - a h&amp;lt;/math&amp;gt; are the MOS step sizes.&lt;br /&gt;
* The MOS has &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; steps of &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps of &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The interval &amp;lt;math&amp;gt;[a/c, b/d]&amp;lt;/math&amp;gt; gives the range of &amp;lt;math&amp;gt;g/h&amp;lt;/math&amp;gt; which will produce an &amp;lt;math&amp;gt;m/n&amp;lt;/math&amp;gt; MOS when stacking.&lt;br /&gt;
&lt;br /&gt;
In this way the Gral method directly gives the generator range and step size formulae from the [[Generator ranges of MOS]] page.&lt;br /&gt;
&lt;br /&gt;
For example, take &amp;lt;math&amp;gt;g = 707.22&amp;lt;/math&amp;gt; cents and &amp;lt;math&amp;gt;h = 1200&amp;lt;/math&amp;gt; cents.&lt;br /&gt;
The Gral method can usefully be shown in a table as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Left !! Right !! Mediant !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; !! &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; !! &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0/1 || 1/0 || 1/1 || 0 || 1 || 1 || 0 || 1200.00 || 707.22&lt;br /&gt;
|-&lt;br /&gt;
|  || 1/1 || 1/2 || 0 || 1 || 1 || 1 || 492.78 || 707.22&lt;br /&gt;
|-&lt;br /&gt;
| 1/2 ||  || 2/3 || 1 || 1 || 2 || 1 || 492.78 || 214.44&lt;br /&gt;
|-&lt;br /&gt;
|  || 2/3 || 3/5 || 1 || 2 || 2 || 3 || 278.34 || 214.44&lt;br /&gt;
|-&lt;br /&gt;
|  || 3/5 || 4/7 || 1 || 3 || 2 || 5 || 63.90 || 214.44&lt;br /&gt;
|-&lt;br /&gt;
| 4/7 ||  || 7/12 || 4 || 3 || 7 || 5 || 63.90 || 150.54&lt;br /&gt;
|-&lt;br /&gt;
| 7/12 ||  || 10/17 || 7 || 3 || 12 || 5 || 63.90 || 86.64&lt;br /&gt;
|-&lt;br /&gt;
| 10/17 ||  || 13/22 || 10 || 3 || 17 || 5 || 63.90 || 22.74&lt;br /&gt;
|-&lt;br /&gt;
|  || 13/22 || 23/39 || 10 || 13 || 17 || 22 || 41.16 || 22.74&lt;br /&gt;
|-&lt;br /&gt;
|  || 23/39 || 33/56 || 10 || 23 || 17 || 39 || 18.42 || 22.74&lt;br /&gt;
|-&lt;br /&gt;
| 33/56 ||  || 56/95 || 33 || 23 || 56 || 39 || 18.42 || 4.32&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here Left and Right are the endpoints of the search interval;&lt;br /&gt;
a blank means the same value as the row above&lt;br /&gt;
(this lets you see at a glance which endpoint moved to form each row).&lt;br /&gt;
The Mediant column is the mediant of the search interval.&lt;br /&gt;
The columns a, b, c, d give the basis &amp;lt;math&amp;gt;(a,b)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(c,d)&amp;lt;/math&amp;gt; corresponding to the search interval &amp;lt;math&amp;gt;[a/c,b/d]&amp;lt;/math&amp;gt;.&lt;br /&gt;
The columns s and t give the resulting step sizes (for which &amp;lt;math&amp;gt;as+ bt = g&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;cs + dt = h&amp;lt;/math&amp;gt;).&lt;br /&gt;
The row with mediant 10/17, for example, tells us that we get a 17 note MOS with 12 steps of 63.90 cents and 5 steps of 86.64 cents.&lt;br /&gt;
&lt;br /&gt;
The Gral method is a very convenient way to calculate MOS, and it was extensively used by Wilson.&amp;lt;ref name=&amp;quot;wilson-temperament&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wilson-recurrent&amp;quot;/&amp;gt;&lt;br /&gt;
We can understand why the Gral method calculates MOS by thinking about keyboard mapping.&amp;lt;ref name=&amp;quot;ratan2026another&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Application to keyboard mapping ==&lt;br /&gt;
&lt;br /&gt;
One way to map a scale onto a two-dimensional keyboard is to always go up &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; scale degrees when moving one key along a row,&lt;br /&gt;
and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; scale degrees when moving one key up a column, for some step sizes &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;.&lt;br /&gt;
If we choose scale degrees &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; which we want to be mapped to a basis on the keyboard,&lt;br /&gt;
the Gral method applied with &amp;lt;math&amp;gt;g = m&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h = n&amp;lt;/math&amp;gt; tells us which bases with non-negative coordinates will give positive step sizes &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;ratan2026another&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if we want scale degrees &amp;lt;math&amp;gt;m = 11&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n = 19&amp;lt;/math&amp;gt; to be mapped to a basis on the keyboard,&lt;br /&gt;
we can apply the Gral method to 11 and 19:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Left !! Right !! Mediant !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; !! style=&amp;quot;width:2.5em&amp;quot; | &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0/1 || 1/0 || 1/1 || 0 || 1 || 1 || 0 || 19 || 11&lt;br /&gt;
|-&lt;br /&gt;
|  || 1/1 || 1/2 || 0 || 1 || 1 || 1 || 8 || 11&lt;br /&gt;
|-&lt;br /&gt;
| 1/2 ||  || 2/3 || 1 || 1 || 2 || 1 || 8 || 3&lt;br /&gt;
|-&lt;br /&gt;
|  || 2/3 || 3/5 || 1 || 2 || 2 || 3 || 5 || 3&lt;br /&gt;
|-&lt;br /&gt;
|  || 3/5 || 4/7 || 1 || 3 || 2 || 5 || 2 || 3&lt;br /&gt;
|-&lt;br /&gt;
| 4/7 ||  || 7/12 || 4 || 3 || 7 || 5 || 2 || 1&lt;br /&gt;
|-&lt;br /&gt;
|  || 7/12 || 11/19 || 4 || 7 || 7 || 12 || 1 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The row with mediant 4/7, for example,&lt;br /&gt;
tells us that mapping the scale by going up 2 scale degrees when moving along a row and 3 scale degrees when moving up a column&lt;br /&gt;
will place scale degree 11 at &amp;lt;math&amp;gt;(1, 3)&amp;lt;/math&amp;gt; and scale degree 19 at &amp;lt;math&amp;gt;(2, 5)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Wilson describes each basis as a different keyboard named with the mediant,&lt;br /&gt;
so the basis &amp;lt;math&amp;gt;(1, 3)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(2, 5)&amp;lt;/math&amp;gt; is called the 4/7 keyboard.&amp;lt;ref name=&amp;quot;wilson-gralspectrum&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;wilson-gralkeyboard&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;cassels1971introduction&amp;quot;&amp;gt;&lt;br /&gt;
J.W.S. Cassels, [https://archive.org/details/introductiontoge0099jwsc An Introduction To The Geometry Of Numbers]. Springer-Verlag, 1971.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;knuth1994concrete&amp;quot;&amp;gt;&lt;br /&gt;
D.E. Knuth, O. Patashnik, and R.L. Graham, [https://seriouscomputerist.atariverse.com/media/pdf/book/Concrete%20Mathematics.pdf Concrete Mathematics]. Addison-Wesley, 1994.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wilson-temperament&amp;quot;&amp;gt;&lt;br /&gt;
Erv Wilson, [https://www.anaphoria.com/DiophantineTripletsTEMPER.pdf Diophantine triplets of temperament derived intervals]. The Wilson Archives.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wilson-recurrent&amp;quot;&amp;gt;&lt;br /&gt;
Erv Wilson, [https://www.anaphoria.com/DiophantineTripletsRECURR.pdf Diophantine triplets of recurrent derived intervals]. The Wilson Archives.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ratan2026another&amp;quot;&amp;gt;&lt;br /&gt;
Naren Ratan, [https://www.xenharmonikon.org/2026/05/19/another-look-at-wilsons-keyboard-mapping-system/ Another look at Wilson&amp;#039;s keyboard mapping system], Xenharmonikon Online, 2026.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wilson-gralspectrum&amp;quot;&amp;gt;&lt;br /&gt;
Erv Wilson, [https://www.anaphoria.com/gralspectrum.pdf The Gral Spectrum]. The Wilson Archives.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;wilson-gralkeyboard&amp;quot;&amp;gt;&lt;br /&gt;
Erv Wilson, [https://www.anaphoria.com/gralkeyboard.pdf Gral Keyboard Guide]. The Wilson Archives.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Erv Wilson]]&lt;/div&gt;</summary>
		<author><name>Naren</name></author>
	</entry>
</feed>