Module:MOS in EDO allperiods: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added checks for whether to add temperament names
Ganaram inukshuk (talk | contribs)
Commented out test temperament names, fixing duplication case with edo=12, periods=4
Line 24: Line 24:
-- Generators start with half the period rounded down, plus 1
-- Generators start with half the period rounded down, plus 1
function p.moses_in_edo(edo, number_of_periods, temperaments)
function p.moses_in_edo(edo, number_of_periods, temperaments)
local edo = edo or 31
local edo = edo or 12
local number_of_periods = number_of_periods or 1
local number_of_periods = number_of_periods or 4
local temperaments = temperaments or { "slender", "valentine", "miracle", "nusecond", "hemithirds", "mothra", "orwell", "myna", "mohajira", "würschmidt", "squares", "semisept", "meantone", "casablanca", "tritonic" }
local temperaments = temperaments --or { "slender", "valentine", "miracle", "nusecond", "hemithirds", "mothra", "orwell", "myna", "mohajira", "würschmidt", "squares", "semisept", "meantone", "casablanca", "tritonic" }
-- Check whether the number of periods divides the edo
-- Check whether the number of periods divides the edo
Line 38: Line 38:
-- Generator
-- Generator
local starting_generator = math.floor(period_in_edosteps / verified_number_of_periods / 2) + 1
local starting_generator = math.ceil(period_in_edosteps / verified_number_of_periods / 2)