Module:MOS gamut: Difference between revisions

Ganaram inukshuk (talk | contribs)
Updated to use middle mode, since that's the common convention; as a tiebreaker for an even quantity of modes, use the brighter of the two
Ganaram inukshuk (talk | contribs)
m Corrected UDP calculation
Line 155: Line 155:
-- two instead.
-- two instead.
-- If it's 5L 2s, default to the second-brightest mode.
-- If it's 5L 2s, default to the second-brightest mode.
local udp_default = { periods_per_equave * math.ceil(mossteps_per_period / 2), periods_per_equave * math.floor(mossteps_per_period / 2) }
local udp_default = { periods_per_equave * math.ceil((mossteps_per_period - 1)/ 2), periods_per_equave * math.floor((mossteps_per_period - 1) / 2) }
if scale_sig == "5L 2s" then
if scale_sig == "5L 2s" then
udp_default = { 5, 1 }
udp_default = { 5, 1 }
end
end
local udp_parsed = udp or udp_default
local udp = udp or udp_default
local generators_up = udp_parsed[1]
local generators_up = udp[1]
local generators_down = udp_parsed[2]
local generators_down = udp[2]


-- The natural note symbols are those that correspond to diamond-mos
-- The natural note symbols are those that correspond to diamond-mos
Line 311: Line 311:
-- two instead.
-- two instead.
-- If it's 5L 2s, default to the second-brightest mode.
-- If it's 5L 2s, default to the second-brightest mode.
local udp = { periods_per_equave * math.ceil(mossteps_per_period / 2), periods_per_equave * math.floor(mossteps_per_period / 2) }
local udp = { periods_per_equave * math.ceil((mossteps_per_period - 1)/ 2), periods_per_equave * math.floor((mossteps_per_period - 1) / 2) }
if scale_sig == "5L 2s" then
if scale_sig == "5L 2s" then
udp = { 5, 1 }
udp = { 5, 1 }