Module:MOS degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added naming rules for nL ns mosses to newly added function; "unison" is now used instead of "0-mosstep"
Ganaram inukshuk (talk | contribs)
Degreechain function outputs result in notationally agnostic form (mossteps and quality) for ease of translation to tamnams or other notation
Line 56: Line 56:
-- Default parameters for testing
-- Default parameters for testing
--[[
--[[
local input_mos = input_mos or mos.new(5, 5, 2)
local input_mos = input_mos or mos.new(5, 2, 2)
local genchain_length_per_period = genchain_length_per_period or 10
local genchain_length_per_period = genchain_length_per_period or 20
local going_up = false
local going_up = true
]]--
]]--
Line 141: Line 141:
quality = aug_or_dim
quality = aug_or_dim
else
else
quality = chromas .. "×" .. aug_or_dim
quality = chromas .. "× " .. aug_or_dim
end
end
end
end
-- Put together the name
-- Put together the name
-- TODO?: Prefix lookup
local degree = { ['mossteps'] = mossteps, ['quality'] = quality }
-- If it's the 0-mosstep, simply say it's the unison instead.
local degree = ""
if mossteps == 0 then
degree = quality .. " unison"
else
degree = quality .. " " .. mossteps .. "-mosstep"
end
table.insert(chain_for_period, degree)
table.insert(chain_for_period, degree)
end
end