Module:Ups and downs sharpness: Difference between revisions

Tristanbay (talk | contribs)
fixed bold and fractional numbering of steps/semitones
Dave Keenan (talk | contribs)
Increase width of sesquiflat now that it is Zimmermann's, not Couper's.
 
(2 intermediate revisions by 2 users not shown)
Line 43: Line 43:
local ssharp_t = "  [[File:HeQu3.svg|22px]]"
local ssharp_t = "  [[File:HeQu3.svg|22px]]"
local sflat_t = "  [[File:HeQd3.svg|27px]]"
local sflat_t = "  [[File:HeQd3.svg|30px]]"
if frame.args["sz"] == "true" and sharp % 2 == 0 then -- use SZ accidentals?
if frame.args["sz"] == "true" and sharp % 2 == 0 then -- use SZ accidentals?
Line 57: Line 57:
tab = "{{sharpness-flat1}}"
tab = "{{sharpness-flat1}}"
elseif sharp == 0 then
elseif sharp == 0 then
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
tab = "<div style=\"overflow-x: auto;\">\n{| class=\"wikitable center-all\"\n"
.. "|-\n"
.. "|-\n"
.. "! Step offset\n"
.. "! Step offset\n"
Line 75: Line 75:
else
else
if edo % 12 == 0 and edo <= 300 then -- does it temper out 531441/524288?
if edo % 12 == 0 and edo <= 300 then -- does it temper out 531441/524288?
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
tab = "<div style=\"overflow-x: auto;\">\n{| class=\"wikitable center-all\"\n"
.. "|-\n"
.. "|-\n"
.. "! Semitones\n"
.. "! Semitones\n"
Line 81: Line 81:
if use_sz then
if use_sz then
for i = 1, sharp * 4 + 1 do
for i = 1, sharp * 4 + 1 do
tab = tab .. (i % (sharp * 2) == 0 and string.format(" || '''%s'''", math.floor(i / sharp)) or string.format(" || {{Simplified fraction|%s|%s|true}}", i, sharp * 2))
tab = tab .. (i % (sharp * 2) == 0 and string.format(" || '''%s'''", math.floor(i / sharp / 2)) or string.format(" || {{Simplified fraction|%s|%s|true}}", i, sharp * 2))
end
end
else
else
Line 89: Line 89:
end
end
else
else
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
tab = "<div style=\"overflow-x: auto;\">\n{| class=\"wikitable center-all\"\n"
.. "|-\n"
.. "|-\n"
.. "! Step offset\n"
.. "! Step offset\n"