Module:MOS in EDO allperiods: Difference between revisions

Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
Hopefully fixed logic for subset edos
Line 65: Line 65:
-- Skip mosses that are supported by subset edos; this happens if the
-- Skip mosses that are supported by subset edos; this happens if the
-- gen and comp have a gcd > 1; if show_subsets is set to true, then
-- gen and comp have a gcd > 1; if show_subsets is set to true, then
-- show them anyway
-- show them anyway.
local gcd = utils._gcd(gen, comp)
local gcd = utils._gcd(gen, comp)
if gcd ~= 1 and show_subsets then
local add_table = gcd == 1 or show_subsets
local subset_edo = edo / gcd;
local subset_gen = gen / gcd;
-- Add table
local subset_comp = comp / gcd;
if add_table then
--result = result .. string.format('Generators form a subset scale in [[%iedo]] with the generators %i\\%i and %i\\%i.\n', subset_edo, subset_gen, subset_edo, subset_comp, subset_edo)
else
-- TODO: Rewrite code here for entry of temperaments as a set of
-- TODO: Rewrite code here for entry of temperaments as a set of
-- key-value pairs
-- key-value pairs