Module:MOS intervals: Difference between revisions

Ganaram inukshuk (talk | contribs)
m a colspan
Ganaram inukshuk (talk | contribs)
Undo previous change (it didn't look right); todo
Line 8: Line 8:


-- TODO:
-- TODO:
-- - Fix rounding, capitalization
-- - Address cent range having backwards values
-- - Require both a mos prefix and abbrev
-- - Require both a mos prefix and abbrev


Line 37: Line 37:
result = result .. '|+ Intervals of ' .. scale_sig .. '\n'
result = result .. '|+ Intervals of ' .. scale_sig .. '\n'
result = result .. '! colspan="3" | Intervals\n'
result = result .. '! colspan="3" | Intervals\n'
result = result .. '! colspan="2" | Range in cents\n'
result = result .. '! rowspan="2" | Range in cents\n'
result = result .. '! rowspan="2" | Abbrev.\n'
result = result .. '! rowspan="2" | Abbrev.\n'
result = result .. '|-\n'
result = result .. '|-\n'
result = result .. '! <abbr title="A mos interval denoted solely by the number of steps it subtends.">Generic</abbr>\n'
result = result .. '! <abbr title="A mos interval denoted solely by the number of steps it subtends.">Generic</abbr>\n'
result = result .. '! <abbr title="A mos interval denoted by the large and small steps it subtends.">Specific</abbr>\n'
result = result .. '! <abbr title="A mos interval denoted by the large and small steps it subtends.">Specific</abbr>\n'
result = result .. '! <abbr title="The number of steps, by size, subtended by the interval.">Steps</abbr>\n'
result = result .. '! <abbr title="The number of steps subtended by the interval.">Steps</abbr>\n'
result = result .. '! Min.\n'
result = result .. '! Max.\n'
-- Write each row
-- Write each row
Line 64: Line 62:
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case"))
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case"))
result = result .. string.format("| %s\n" , mos.interval_as_string(current_bright_interval))
result = result .. string.format("| %s\n" , mos.interval_as_string(current_bright_interval))
result = result .. string.format("| colspan=\"2\" | %.1f¢\n", cents)
result = result .. string.format("| %.1f¢\n", cents)
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev", "m"))
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev", "m"))
else
else
Line 76: Line 74:
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_dark_interval, input_mos, "sentence-case"))
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_dark_interval, input_mos, "sentence-case"))
result = result .. string.format("| %s\n" , mos.interval_as_string(current_dark_interval))
result = result .. string.format("| %s\n" , mos.interval_as_string(current_dark_interval))
result = result .. string.format("| %.1f¢\n| %.1f¢\n", sm_min_cents, sm_max_cents)
result = result .. string.format("| %.1f¢ to %.1f¢\n", sm_min_cents, sm_max_cents)
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_dark_interval, input_mos, "abbrev", "m"))
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_dark_interval, input_mos, "abbrev", "m"))
Line 82: Line 80:
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case"))
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case"))
result = result .. string.format("| %s\n" , mos.interval_as_string(current_bright_interval))
result = result .. string.format("| %s\n" , mos.interval_as_string(current_bright_interval))
result = result .. string.format("| %.1f¢\n| %.1f¢\n", lg_min_cents, lg_max_cents)
result = result .. string.format("| %.1f¢ to %.1f¢\n", lg_min_cents, lg_max_cents)
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev", "m"))
result = result .. string.format("| %s\n" , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev", "m"))
end
end