Module:Infobox MOS: Difference between revisions
Cleanup; comments; commenting out; simplifying "in steps of edt/edf/edp/q" annotation |
Simplifying "steps of ed" annotation this time |
||
| Line 215: | Line 215: | ||
local section_header = "Generator size" | local section_header = "Generator size" | ||
local equave_annotation = "" | |||
if rat.eq(input_mos.equave, 3) then | if rat.eq(input_mos.equave, 3) then | ||
equave_annotation = '<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 | ||
equave_annotation = '<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 | ||
local equave_as_ratio = rat.as_ratio(input_mos.equave) | |||
equave_annotation = string.format('%s<sup><abbr title="In steps of ed%s">(ed%s)</sup>', section_header, equave_as_ratio, equave_as_ratio) | |||
end | end | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>%s", section_header, equave_annotation)}, | ||
{"[[Bright]]", string.format("%s to %s (%.1f¢ to %.1f¢)", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)}, | {"[[Bright]]", string.format("%s to %s (%.1f¢ to %.1f¢)", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)}, | ||
{"[[Dark]]", string.format("%s to %s (%.1f¢ to %.1f¢)", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)}, | {"[[Dark]]", string.format("%s to %s (%.1f¢ to %.1f¢)", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)}, | ||
| Line 256: | Line 258: | ||
local section_header = "Step size" | local section_header = "Step size" | ||
local equave_annotation = "" | |||
if rat.eq(input_mos.equave, 3) then | if rat.eq(input_mos.equave, 3) then | ||
equave_annotation = '<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 | ||
equave_annotation = '<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 | ||
local equave_as_ratio = rat.as_ratio(input_mos.equave) | |||
equave_annotation = string.format('%s<sup><abbr title="In steps of ed%s">(ed%s)</sup>', section_header, equave_as_ratio, equave_as_ratio) | |||
end | end | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>%s", section_header, equave_annotation)}, | ||
{"[[Step pattern | Large]]", string.format("%s to %s (%.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 | Large]]", string.format("%s to %s (%.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("%s to %s (%.1f¢ to %.1f¢)", 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 (%.1f¢ to %.1f¢)", small_step_min_in_steps, large_step_min_in_steps, small_step_min_in_cents, large_step_min_in_cents)} | ||
| Line 449: | Line 453: | ||
local section_header = "Equal tunings" | local section_header = "Equal tunings" | ||
local equave_annotation = "" | |||
if rat.eq(input_mos.equave, 3) then | if rat.eq(input_mos.equave, 3) then | ||
equave_annotation = '<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 | ||
equave_annotation = '<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 | ||
local equave_as_ratio = rat.as_ratio(input_mos.equave) | |||
equave_annotation = string.format('%s<sup><abbr title="In steps of ed%s">(ed%s)</sup>', section_header, equave_as_ratio, equave_as_ratio) | |||
end | end | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>%s", section_header, equave_annotation)}, | ||
} | } | ||
for i = 1, #step_ratios do | for i = 1, #step_ratios do | ||