Module:MOS/doc: Difference between revisions

ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{documentation|
{{documentation|
{{dochead|header=none}}
{{dochead|header=none}}{{lua|ET|Rational|Utils}}
This module provides helper functions for working with [[MOS scale]]s in {{w|Lua (programming language)|Lua}} code. It serves as a "library" for mos-related modules and thus does not have a corresponding template
<p>This module provides functions for working with [[MOS scale]]s in {{w|Lua (programming language)|Lua}} code. It serves as a "library" for mos-related modules and thus does not have a corresponding template.</p>


This module follows [[User:Ganaram inukshuk/Provisional style guide for Lua#Lua_style|Ganaram Inukshuk's provisional style guide for Lua]].
It allows working with MOS scales with no fixed step sizes, as well as working with its modes and intervals. Also included are functions related to equal tunings to obviate the need to include [[Module:ET]], in the form of functions that produce an ET, denote mossteps as steps of an ET, and produce the cent values of mossteps.{{clear}}
 
Functionality includes:
* Creating/parsing mosses from string representations (scalesigs, xL ys)
* Creating scalesigs (string representations) of mosses
* Finding relatives of mosses or applying certain operations on them
* Finding certain modes of a mos
* Finding generators for a mos
* Producing vectors for simple mos intervals
* Interval arithmetic, in the form of adding vectors of L's and s's, and period/equave-reducing intervals
* Finding equal tunings for mosses
* Producing intervals of mosses as steps of an equal tuning, as a quantity of steps (e.g., for 7\12, this is 7) or as a string (e.g., 7\12 as a string).
 
Naming scheme for function names:
* Functions related to mosses don't have any special names.
* Functions related to a mos's modes generally end with "mode".
* Functions related to a mos's generators, equave, or period contain the corresponding interval as part of its name.
* Functions related to intervals generally begin with "interval".
* Interval complement/reduce functions end with "complement" and "reduce".
* Functions that produce strings generally have the phrase "as string".
* Functions that "count" something generally end with "count".
* If a function requires an interval and mos as input, the interval(s) come after the mos.
* Functions that have to do with equal tunings will have "et" in its name.
}}
}}