Mathematics of MOS: Difference between revisions
Line 71: | Line 71: | ||
When R is less than 1, it represents the ratio in (logarithmic) size between the smaller and the larger step. When it is greater than 1, it is larger/smaller. By replacing g with 1 - g if necessary, we can reduce always to the case where R>1 (or R<1 if we prefer.) | When R is less than 1, it represents the ratio in (logarithmic) size between the smaller and the larger step. When it is greater than 1, it is larger/smaller. By replacing g with 1 - g if necessary, we can reduce always to the case where R>1 (or R<1 if we prefer.) | ||
=Algorithms= | ==Algorithms== | ||
Below is some Maple code for various mathematical routines having to do with MOS. If you have access to Maple, you can of course copy and run these programs. Even if you do not, since Maple code makes better pseudocode than most languages or computer algebra packages afford, it can be used as pseudocode. For that purpose, it will be helpful to know that <code>modp(x, n)</code> means reducing x mod the integer n to 0, 1, ..., n-1 not only when x is an integer, but also when it is a rational number with denominator prime to n. In that case, p/q mod n = r means p = qr mod n. | Below is some Maple code for various mathematical routines having to do with MOS. If you have access to Maple, you can of course copy and run these programs. Even if you do not, since Maple code makes better pseudocode than most languages or computer algebra packages afford, it can be used as pseudocode. For that purpose, it will be helpful to know that <code>modp(x, n)</code> means reducing x mod the integer n to 0, 1, ..., n-1 not only when x is an integer, but also when it is a rational number with denominator prime to n. In that case, p/q mod n = r means p = qr mod n. | ||
Line 232: | Line 232: | ||
if type(x, rational) and modp(denom(x), 2)=0 then RETURN(w) fi; | if type(x, rational) and modp(denom(x), 2)=0 then RETURN(w) fi; | ||
evalf(w) end: | evalf(w) end: | ||
== Proofs == | |||
=== Binary generated scales with #L coprime to #s within each period are MOS === | |||
By ''generatedness'', we mean that every interval in the scale is of the form ''jg'' + ''kp'' where ''g'' is a generator, ''p'' is the period, and ''j, k'' ∈ '''Z''', and that either ''g'' or ''−g'' occurs on every note. We have shown that the chunking procedure yields a scale that is generated and binary and that has gcd(#L, #s) = 1 within each period. We need only show that any such scale is a MOS. We claim that any interval class not ''p''-equivalent to 0 has ''exactly'' 2 sizes. | |||
Suppose that such a scale ''S'' (with ''n'' ≥ 2 notes) has ''a''-many L steps and ''b''-many s steps per period ''p'', and has generator ''g''. Since ''S'' is generated, the interval sizes modulo ''p'' that occur in ''S'' are: | |||
{(−''n'' + 1)''g'', ..., −''g'', 0, ''g'', ..., (''n'' − 1)''g''}, | |||
and all sizes {0, ''g'', ..., (''n'' − 1)''g''} are distinct. | |||
We thus have: | |||
L = ''cg'' + ''dp'' | |||
s = ''eg'' + ''fp'' | |||
for appropriate integers ''c, d, e, f'', where |''c''| < ''n'' and |''e''| < ''n''. | |||
Now we assume that ''g'' and ''p'' are linearly independent. By assumption ''a''L + ''b''s = (''ac'' + ''be'')''g'' + (''ad'' + ''bf'')''p'' = ''p''. Since ''a''L + ''b''s occurs on the "brightest" mode, from generatedness we have ''ac'' + ''be'' ∈ {0, ..., ''n'' − 1}. Hence we must have ''ac'' + ''be'' = 0, and thus ''c'' = ±''b'' and ''e'' = ∓''a'', from the assumption that gcd(a, b) = 1. | |||
In fact, {L, s} is another valid basis for the abelian group with basis {''p'', ''g''}, since by binarity we have ''p, g'' ∈ span(L, s). Assume ''c'' = ''b'' and ''e'' = −''a''. [This corresponds to assuming that ''g'' is the "bright" generator.] Let χ = L − s > 0; then χ is ''p''-equivalent to ''+ng''. Now by generatedness and binarity, any interval class that has at least two sizes must have sizes separated by ''ng'' (the separation corresponding to changing an L step to an s step). Since ''g'' and ''p'' are linearly independent, for each ''j'' ∈ {1, ..., ''n'' − 1} there exists at most one ''k'' = ''k''(''j'') ∈ {1, ..., ''n'' − 1}</sub> such that ''jg'' is ''p''-equivalent to one size of ''k''-step. Hence if the class of ''k''-steps has ''at least'' two sizes, the sizes must be ''j''(''k'')''g'' and (''j''(''k'') − ''n'')''g''; any other size must leave the range −(''n'' − 1)''g'', ..., 0, ..., (''n'' − 1)''g''. Thus the class of ''k''-steps has at most two sizes for 1 ≤ ''k'' ≤ (''n'' − 1). Each non-''p''-equivalent class must have ''exactly'' two sizes, since the inverse of the ''k''-step that is equivalent to ''jg'' is an (''n'' − ''k'')-step equivalent to ''−jg'', which by linear independence must be distinct from an (''n'' − ''k'')-step equivalent to a positive number of ''g'' generators. (Note that the latter (''n'' − ''k'')-step does occur in the "brightest" mode of ''S'', i.e. the mode with the most ''g'' generators stacked ''up'' rather than ''down'' from the tonic.) | |||
To establish MOSness in the case of non-linearly-independent ''p'' and ''g'', observe that every ''k''-step (which is a specific linear combination of L and s) in the scale with rational step ratio is a limit point of the same linear combination of L and s in versions of the binary scale with linearly independent ''p'' and ''g'', and thus there must be ''at most'' 2 sizes for each generic interval. Since χ, which separates the two sizes in the previous case, is ''p''-equivalent to ''ng'' and remains ''p''-inequivalent to 0 in the limit since L/s ≠ 1/1, each generic interval not ''p''-equivalent to 0 has ''exactly'' 2 sizes. | |||
[[Category:Math]] | [[Category:Math]] | ||
[[Category:MOS scale]] | [[Category:MOS scale]] | ||
[[Category:Scale]] | [[Category:Scale]] |