Module:Scale tree: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 111: Line 111:
-- - Step ratio and hardness
-- - Step ratio and hardness
-- - Comments
-- - Comments
local result = string.format("{| class=\"wikitable center-all\"\n")
local result = "{| class=\"wikitable center-all\"\n"
.. "|+ style=\"font-size: 105%;\" | " .. string.format("Scale Tree and Tuning Spectrum of %s\n", mos_as_string)
.. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("Scale Tree and Tuning Spectrum of %s\n", mos_as_string)
.. string.format("! rowspan=\"2\" colspan=\"%d\" | Generator<sup><abbr title=\"In steps of ed%s.\">(ed%s)</abbr></sup>\n", depth + 1, equave_suffix, equave_suffix)
.. string.format("! rowspan=\"2\" colspan=\"%d\" | Generator<sup><abbr title=\"In steps of ed%s.\">(ed%s)</abbr></sup>\n", depth + 1, equave_suffix, equave_suffix)
.. "! colspan=\"2\" | Cents\n"
.. "! colspan=\"2\" | Cents\n"
Line 163: Line 163:
local hardness = ""
local hardness = ""
if step_ratio[2] == 0 then
if step_ratio[2] == 0 then
hardness = "→ ∞"
hardness = "&rarr;&nbsp;&#8734;"
else
else
hardness = string.format("%.3f", step_ratio[1] / step_ratio[2])
hardness = string.format("%.3f", step_ratio[1] / step_ratio[2])