Module:MOS gamut: Difference between revisions
mNo edit summary |
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 |
||
| Line 151: | Line 151: | ||
local scale_sig = mos.as_string(input_mos) | local scale_sig = mos.as_string(input_mos) | ||
-- The default UDP corresponds to the | -- The default UDP corresponds to the middle mode. For mosses with an even | ||
-- If it's 5L 2s, default to the second-brightest mode | -- number of modes, there are two middle modes, so use the brighter of the | ||
local udp_default = { | -- two instead. | ||
-- 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) } | |||
if scale_sig == "5L 2s" then | if scale_sig == "5L 2s" then | ||
udp_default = { 5, 1 } | udp_default = { 5, 1 } | ||
| Line 305: | Line 307: | ||
local scale_sig = mos.as_string(input_mos) | local scale_sig = mos.as_string(input_mos) | ||
-- The default UDP corresponds to the | -- The default UDP corresponds to the middle mode. For mosses with an even | ||
-- If it's 5L 2s, default to the second-brightest mode | -- number of modes, there are two middle modes, so use the brighter of the | ||
local udp = { | -- two instead. | ||
-- 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) } | |||
if scale_sig == "5L 2s" then | if scale_sig == "5L 2s" then | ||
udp = { 5, 1 } | udp = { 5, 1 } | ||