Module:Infobox MOS: Difference between revisions
Added darkest mode and step pattern tooltips |
Fixed output for stepcount > 40 |
||
| Line 134: | Line 134: | ||
local period_in_cents = equave_in_cents / number_of_periods | local period_in_cents = equave_in_cents / number_of_periods | ||
local | local step_pattern = string.format("...%d steps...", input_mos.nL+input_mos.ns) | ||
if input_mos.nL + input_mos.ns <= 40 then | if input_mos.nL + input_mos.ns <= 40 then | ||
brightest_mode = mos.brightest_mode(input_mos) | local brightest_mode = mos.brightest_mode(input_mos) | ||
step_pattern = string.format('<abbr title="Brightest mode">%s</abbr><br><abbr title="Darkest mode">%s</abbr>', brightest_mode, string.reverse(brightest_mode)) | |||
end | end | ||
| Line 143: | Line 144: | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>", section_header)}, | ||
-- {"[[Step pattern]]", brightest_mode}, | -- {"[[Step pattern]]", brightest_mode}, | ||
{"[[Step pattern]] examples", | {"[[Step pattern]] examples", step_pattern}, | ||
{"[[Equave]]", string.format("%s (%.1f¢)", equave_as_string, equave_in_cents)}, | {"[[Equave]]", string.format("%s (%.1f¢)", equave_as_string, equave_in_cents)}, | ||
{"[[Period]]", string.format("%s (%.1f¢)", period_as_string, period_in_cents)} | {"[[Period]]", string.format("%s (%.1f¢)", period_as_string, period_in_cents)} | ||