MOS scale: Difference between revisions

Wikispaces>genewardsmith
**Imported revision 143015589 - Original comment: **
Wikispaces>genewardsmith
**Imported revision 143046049 - 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>2010-05-18 20:17:44 UTC</tt>.<br>
: This revision was by author [[User:genewardsmith|genewardsmith]] and made on <tt>2010-05-18 22:34:37 UTC</tt>.<br>
: The original revision id was <tt>143015589</tt>.<br>
: The original revision id was <tt>143046049</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:


The two systems are equivalent; in the Algorithms section you will find code for routines starting from the mediant and going to the Ls pair (the "Ls" routine) and for starting from an Ls pair and going to the mediant (the "medi" routine.) The Ls routine uses [[http://en.wikipedia.org/wiki/Modular_multiplicative_inverse|modular inverses]], whereas the medi routine uses continued fractions.
The two systems are equivalent; in the Algorithms section you will find code for routines starting from the mediant and going to the Ls pair (the "Ls" routine) and for starting from an Ls pair and going to the mediant (the "medi" routine.) The Ls routine uses [[http://en.wikipedia.org/wiki/Modular_multiplicative_inverse|modular inverses]], whereas the medi routine uses continued fractions.
If the period is assumed to be 2^(1/n) for some integer n, we can give instead the total number of large and small steps in the octave, instead of just the period, and this is commonly done.


Since numbers tend to be dry, Graham Breed has proposed a [[MOSNamingScheme|naming scheme for MOS scales]].
Since numbers tend to be dry, Graham Breed has proposed a [[MOSNamingScheme|naming scheme for MOS scales]].
Line 131: Line 133:
medi := proc(u)
medi := proc(u)
  # mediant from Large-small steps
  # mediant from Large-small steps
local q;
local q, r;
if u[2]=1 then RETURN(1/(u[1]+1)) fi;
if u[2]=1 then RETURN(1/(u[1]+1)) fi;
if igcd(u[1], u[2])&gt;1 then RETURN("not relatively prime") fi;
r := igcd(u[1], u[2]);
if r&gt;1 then RETURN(medi([u[1]/r, u[2]/r])) fi;
q := penult(u[1]/u[2]);
q := penult(u[1]/u[2]);
if q &gt; u[1]/u[2] then RETURN((numer(q)+denom(q))/(u[1]+u[2])) fi;
if q &gt; u[1]/u[2] then RETURN((numer(q)+denom(q))/(u[1]+u[2])) fi;
(u[1]+u[2]-numer(q)-denom(q))/(u[1]+u[2]) end:
(u[1]+u[2]-numer(q)-denom(q))/(u[1]+u[2]) end:


==[[MOSDiagrams]]== </pre></div>
==[[MOSDiagrams]]== </pre></div>
Line 160: Line 162:
&lt;br /&gt;
&lt;br /&gt;
The two systems are equivalent; in the Algorithms section you will find code for routines starting from the mediant and going to the Ls pair (the &amp;quot;Ls&amp;quot; routine) and for starting from an Ls pair and going to the mediant (the &amp;quot;medi&amp;quot; routine.) The Ls routine uses &lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse" rel="nofollow"&gt;modular inverses&lt;/a&gt;, whereas the medi routine uses continued fractions.&lt;br /&gt;
The two systems are equivalent; in the Algorithms section you will find code for routines starting from the mediant and going to the Ls pair (the &amp;quot;Ls&amp;quot; routine) and for starting from an Ls pair and going to the mediant (the &amp;quot;medi&amp;quot; routine.) The Ls routine uses &lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse" rel="nofollow"&gt;modular inverses&lt;/a&gt;, whereas the medi routine uses continued fractions.&lt;br /&gt;
&lt;br /&gt;
If the period is assumed to be 2^(1/n) for some integer n, we can give instead the total number of large and small steps in the octave, instead of just the period, and this is commonly done. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since numbers tend to be dry, Graham Breed has proposed a &lt;a class="wiki_link" href="/MOSNamingScheme"&gt;naming scheme for MOS scales&lt;/a&gt;.&lt;br /&gt;
Since numbers tend to be dry, Graham Breed has proposed a &lt;a class="wiki_link" href="/MOSNamingScheme"&gt;naming scheme for MOS scales&lt;/a&gt;.&lt;br /&gt;
Line 493: Line 497:
medi := proc(u)&lt;br /&gt;
medi := proc(u)&lt;br /&gt;
  # mediant from Large-small steps&lt;br /&gt;
  # mediant from Large-small steps&lt;br /&gt;
local q;&lt;br /&gt;
local q, r;&lt;br /&gt;
if u[2]=1 then RETURN(1/(u[1]+1)) fi;&lt;br /&gt;
if u[2]=1 then RETURN(1/(u[1]+1)) fi;&lt;br /&gt;
if igcd(u[1], u[2])&amp;gt;1 then RETURN(&amp;quot;not relatively prime&amp;quot;) fi;&lt;br /&gt;
r := igcd(u[1], u[2]);&lt;br /&gt;
if r&amp;gt;1 then RETURN(medi([u[1]/r, u[2]/r])) fi;&lt;br /&gt;
q := penult(u[1]/u[2]);&lt;br /&gt;
q := penult(u[1]/u[2]);&lt;br /&gt;
if q &amp;gt; u[1]/u[2] then RETURN((numer(q)+denom(q))/(u[1]+u[2])) fi;&lt;br /&gt;
if q &amp;gt; u[1]/u[2] then RETURN((numer(q)+denom(q))/(u[1]+u[2])) fi;&lt;br /&gt;
(u[1]+u[2]-numer(q)-denom(q))/(u[1]+u[2]) end:&lt;br /&gt;
(u[1]+u[2]-numer(q)-denom(q))/(u[1]+u[2]) end:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id="toc8"&gt;&lt;a name="MOS scales-MOSDiagrams"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;&lt;a class="wiki_link" href="/MOSDiagrams"&gt;MOSDiagrams&lt;/a&gt;&lt;/h2&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id="toc8"&gt;&lt;a name="MOS scales-MOSDiagrams"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;&lt;a class="wiki_link" href="/MOSDiagrams"&gt;MOSDiagrams&lt;/a&gt;&lt;/h2&gt;
&lt;/body&gt;&lt;/html&gt;</pre></div>
&lt;/body&gt;&lt;/html&gt;</pre></div>