User:Ganaram inukshuk/Code: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added the moscalc and modecalc program
Ganaram inukshuk (talk | contribs)
Moscalc and Modecalc (as a Jupyter notebook): Sample output for updated code (consolidated mosstep/mosdegree table)
Line 2,202: Line 2,202:
* Scale degrees are generally described with terms such as major, minor, augmented, diminished, and perfect. Here, they're enumerated in decreasing order based on size, where larger enumerations denote larger intervals (and therefore larger scale degrees). Perfect intervals, such as the unison and octave, always appear as one size each, and so their scale degrees are always perfect. The other scale degrees that are described as perfect come from the generating intervals (such as the perfect 5th and perfect 4th); these usually apply for moment-of-symmetry scales. A perfect 5th is described as perfect because it appears as that size in all but one mode (the locrian mode, where it's a diminished 5th instead), and a perfect 4th is described as perfect because it appears as that size in all but one mode (then lydian mode, where it's an augmented 4th instead).
* Scale degrees are generally described with terms such as major, minor, augmented, diminished, and perfect. Here, they're enumerated in decreasing order based on size, where larger enumerations denote larger intervals (and therefore larger scale degrees). Perfect intervals, such as the unison and octave, always appear as one size each, and so their scale degrees are always perfect. The other scale degrees that are described as perfect come from the generating intervals (such as the perfect 5th and perfect 4th); these usually apply for moment-of-symmetry scales. A perfect 5th is described as perfect because it appears as that size in all but one mode (the locrian mode, where it's a diminished 5th instead), and a perfect 4th is described as perfect because it appears as that size in all but one mode (then lydian mode, where it's an augmented 4th instead).
* Intervals and scale degrees are enumerated starting at 0 rather than 1.
* Intervals and scale degrees are enumerated starting at 0 rather than 1.
=== Update (Nov 2022) ===
There is now an option to output a mos table as one consolidated table using the MosModecalcOnetable() function. Example output below (may be too wide on some screens).<syntaxhighlight>
Mode    UDP    Mode name      Rotational order  smiunison (0-smidegree)    1-smistep (1-smidegree)    2-smistep (2-smidegree)    3-smistep (3-smidegree)    4-smistep (4-smidegree)    5-smistep (5-smidegree)    6-smistep (6-smidegree)    smioctave (7-smidegree)
-------  -----  -----------  ------------------  -------------------------  -------------------------  -------------------------  -------------------------  -------------------------  -------------------------  -------------------------  -------------------------
LLsLsLs  6|0    Mode 1                        0  0 (perfect)                L (major)                  2L (augmented)            2L+s (major)              3L+s (major)              3L+2s (perfect)            4L+2s (major)              4L+3s (perfect)
LsLLsLs  5|1    Mode 2                        5  0 (perfect)                L (major)                  L+s (perfect)              2L+s (major)              3L+s (major)              3L+2s (perfect)            4L+2s (major)              4L+3s (perfect)
LsLsLLs  4|2    Mode 3                        3  0 (perfect)                L (major)                  L+s (perfect)              2L+s (major)              2L+2s (minor)              3L+2s (perfect)            4L+2s (major)              4L+3s (perfect)
LsLsLsL  3|3    Mode 4                        1  0 (perfect)                L (major)                  L+s (perfect)              2L+s (major)              2L+2s (minor)              3L+2s (perfect)            3L+3s (minor)              4L+3s (perfect)
sLLsLsL  2|4    Mode 5                        6  0 (perfect)                s (minor)                  L+s (perfect)              2L+s (major)              2L+2s (minor)              3L+2s (perfect)            3L+3s (minor)              4L+3s (perfect)
sLsLLsL  1|5    Mode 6                        4  0 (perfect)                s (minor)                  L+s (perfect)              L+2s (minor)              2L+2s (minor)              3L+2s (perfect)            3L+3s (minor)              4L+3s (perfect)
sLsLsLL  0|6    Mode 7                        2  0 (perfect)                s (minor)                  L+s (perfect)              L+2s (minor)              2L+2s (minor)              2L+3s (diminished)        3L+3s (minor)              4L+3s (perfect)
</syntaxhighlight>The same output can be formatted as a wikitable.