Mathematics of MOS: Difference between revisions

ArrowHead294 (talk | contribs)
ArrowHead294 (talk | contribs)
Line 71: Line 71:
If the period is assumed to be 2<sup>{{frac|1|''n''}}</sup> 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. In this case, GCD(L,&nbsp;s) gives the number of periods in an octave.
If the period is assumed to be 2<sup>{{frac|1|''n''}}</sup> 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. In this case, GCD(L,&nbsp;s) gives the number of periods in an octave.


== Classification via the ? function ==
== Classification via the question-mark function ==
Yet another way of classifying MOS is via [[Wikipedia:Minkowski's question mark function|Minkowski's ? function]]. Here ?(x) is a continuous increasing function from the real numbers to the real numbers which has some peculiar properties, one being that it sends rational numbers to [[Wikipedia:dyadic rational|dyadic rational]]s. Hence if q is a rational number 0 < q < 1 in use in the mediant system of classifying MOS, r = ?(q) = A/2^n will be a dyadic rational number which can also be used. Note that the ? function is invertible, and it and its inverse function, the Box function, have code given for them in the algorithms section at the bottom of the article.
Yet another way of classifying MOS is via {{w|Minkowski's question-mark function}}. Here ?(''x''), {{nowrap|? : ℝ &rarr; R}} is a continuously increasing function which has some peculiar properties, one being that it sends rational numbers to {{w|dyadic rational}}s. Hence if ''q'' is a rational number {{nowrap|0 &lt; ''q'' &lt; 1}} in use in the mediant system of classifying MOS scales, {{nowrap|''r'' {{=}} ?(''q'')}} =&nbsp;{{sfrac|''A''|2<sup>''n''</sup>}} will be a dyadic rational number which can also be used. Note that the ? function is invertible, and it and its inverse function, the Box function, have code given for them in the algorithms section at the bottom of the article.


The integer n in the denominator of r (with A assumed to be odd) is the order (or n+1 is, according to some sources) of q in the [[Wikipedia:Stern-Brocot tree|Stern-Brocot tree]]. The two neighboring numbers of order n+1, which define the range of propriety, can also be expressed in terms of the ? and Box functions as Box(r - 2^(-n-1) and Box(r + 2^(-n-1)). If r represents a MOS, the range of possible values for a generator of the MOS will be Box(r) < g < Box(r + 2^(-n)), and the proper generators will be Box(r) < g < Box(r + 2^(-n-1)). So, for example, the MOS denoted by 3/2048 will be between Box(3/2048) and Box(4/2048), which means that 2/21 < g < 1/10, and will be proper if 2/21 < g < 3/31. Hence 7/72, a generator for miracle temperament, will define a MOS but it will not be proper since 7/72 > 3/31 = Box(3/2048 + 1/4096)).
The integer ''n'' in the denominator of ''r'' (with ''A'' assumed to be odd) is the order (or {{nowrap|''n'' + 1}} is, according to some sources) of ''q'' in the {{w|Stern&ndash;Brocot tree}}. The two neighboring numbers of order {{nowrap|''n'' + 1}}, which define the range of propriety, can also be expressed in terms of the ? and Box functions as {{nowrap|Box(''r'' &#177; 2<sup>&minus;''n'' &minus; 1</sup>)}}. If ''r'' represents a MOS, the range of possible values for a generator of the MOS will be {{nowrap|Box(''r'') &lt; ''g''}} {{nowrap|&lt; Box(''r'' + 2<sup>&minus;''n''</sup>)}}, and the proper generators will be {{nowrap|Box(''r'') &lt; ''g'' &lt; Box(''r'' + 2<sup>&minus;''n'' &minus; 1</sup>)}}. So, for example, the MOS denoted by 3/2048 will be between Box(3/2048) and Box(4/2048), which means that {{nowrap|{{frac|2|21}} &lt; ''g'' &lt; {{frac|1|10}}}}, and will be proper if {{nowrap|{{frac|2|21}} &lt; ''g''}} &lt;&nbsp;{{frac|3|31}}}}. Hence 7/72, a generator for miracle temperament, will define a MOS but it will not be proper since {{nowrap|{{frac|7|72}} &gt; {{frac|3|31}}}} {{nowrap|{{=}} Box({{frac|3|2048}} + {{frac|1|4096}})}}.


== MOS in equal tunings ==
== MOS in equal tunings ==