Module:Infobox MOS: Difference between revisions

Ganaram inukshuk (talk | contribs)
mNo edit summary
Ganaram inukshuk (talk | contribs)
Reverted separating steps and cents to separate lines, simplified section headers
Line 258: Line 258:
section_header = section_header .. " in steps of edf"
section_header = section_header .. " in steps of edf"
elseif not rat.eq(input_mos.equave, 2) then
elseif not rat.eq(input_mos.equave, 2) then
section_header = string.format("%s in steps of ed%s", section_header, rat.as_ratio(input_mos.equave))
section_header = string.format("%s in steps of ed%s", section_header, rat.as_ratio(input_mos.equave), rat.as_ratio(input_mos.equave))
end
end
Line 293: Line 293:
local large_step_max_in_cents = et.cents(collapsed_ed, 1)
local large_step_max_in_cents = et.cents(collapsed_ed, 1)
local section_header = "Step size ranges"
local section_header = "Step size"
local ed_annotation = ""
if rat.eq(input_mos.equave, 3) then
if rat.eq(input_mos.equave, 3) then
ed_annotation = '<sup><abbr title="In steps of edt">(edt)</sup>'
section_header = section_header .. '<sup><abbr title="In steps of edt">(edt)</sup>'
elseif rat.eq(input_mos.equave, rat.new(3,2)) then
elseif rat.eq(input_mos.equave, rat.new(3,2)) then
ed_annotation = section_header .. '<sup><abbr title="In steps of edf">(edf)</sup>'
section_header = section_header .. '<sup><abbr title="In steps of edf">(edf)</sup>'
elseif not rat.eq(input_mos.equave, 2) then
elseif not rat.eq(input_mos.equave, 2) then
ed_annotation = string.format('<sup><abbr title="In steps of ed%s">(ed%s)</sup>', rat.as_ratio(input_mos.equave), rat.as_ratio(input_mos.equave))
section_header = string.format('%s<sup><abbr title="In steps of ed%s">(ed%s)</sup>', section_header, rat.as_ratio(input_mos.equave), rat.as_ratio(input_mos.equave))
end
end
local section_entries = {
local section_entries = {
{string.format("<b>%s</b>", section_header)},
{string.format("<b>%s</b>", section_header)},
{"[[Step pattern | Large]]", string.format("Steps%s: %s to %s<br>Cents: %.1f¢ to %.1f¢", ed_annotation, large_step_min_in_steps, large_step_max_in_steps, large_step_min_in_cents, large_step_max_in_cents)},
{"[[Step pattern | Large]]", string.format("%s to %s (Cents: %.1f¢ to %.1f¢)", large_step_min_in_steps, large_step_max_in_steps, large_step_min_in_cents, large_step_max_in_cents)},
{"[[Step pattern | Small]]", string.format("Steps%s: %s to %s<br>Cents: %.1f¢ to %.1f¢", ed_annotation, small_step_min_in_steps, large_step_min_in_steps, small_step_min_in_cents, large_step_min_in_cents)}
{"[[Step pattern | Small]]", string.format("%s to %s (Cents: %.1f¢ to %.1f¢)", small_step_min_in_steps, large_step_min_in_steps, small_step_min_in_cents, large_step_min_in_cents)}
}
}
Line 489: Line 488:
local section_header = "Equal tunings"
local section_header = "Equal tunings"
if rat.eq(input_mos.equave, 3) then
if rat.eq(input_mos.equave, 3) then
section_header = section_header .. " in steps of edt"
section_header = section_header .. '<sup><abbr title="In steps of edt">(edt)</sup>'
elseif rat.eq(input_mos.equave, rat.new(3,2)) then
elseif rat.eq(input_mos.equave, rat.new(3,2)) then
section_header = section_header .. " in steps of edf"
section_header = section_header .. '<sup><abbr title="In steps of edf">(edf)</sup>'
elseif not rat.eq(input_mos.equave, 2) then
elseif not rat.eq(input_mos.equave, 2) then
section_header = string.format("%s in steps of ed%s", section_header, rat.as_ratio(input_mos.equave))
section_header = string.format('%s<sup><abbr title="In steps of ed%s">(ed%s)</sup>', section_header, rat.as_ratio(input_mos.equave), rat.as_ratio(input_mos.equave))
end
end