Module:MOS/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{documentation|
{{documentation|{{dochead | header = metamodule}}
{{dochead|header=none}}
<p>This module provides functions for working with [[MOS scale]]s in {{w|Lua (programming language)|Lua}} code.</p>
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
{{clear}}


This module follows [[User:Ganaram inukshuk/Provisional style guide for Lua#Lua_style|Ganaram Inukshuk's provisional style guide for Lua]].
{{Module introspection}}
 
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.
}}
}}

Latest revision as of 11:00, 30 October 2025

This module primarily serves as a library for other modules and has no corresponding template.

This module provides functions for working with MOS scales in Lua code.

To see introspection summary, see this module's main page.