Module:MOS/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
No edit summary
Line 1: Line 1:
{{documentation|
{{documentation|
{{dochead|header=none}}
{{dochead|header=none}}
{{Todo| Documentation |inline=1}}
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
 
This module follows [[User:Ganaram inukshuk/Provisional style guide for Lua#Lua_style|Ganaram Inukshuk's provisional style guide for Lua]].
 
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.
}}
}}