Module:MOS intervals: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
Removed harmonic entropy, as it's now in its own template |
||
| Line 3: | Line 3: | ||
local et = require("Module:ET") | local et = require("Module:ET") | ||
local tamnams = require("Module:TAMNAMS") | local tamnams = require("Module:TAMNAMS") | ||
local yesno = require("Module:Yesno") | local yesno = require("Module:Yesno") | ||
local p = {} | local p = {} | ||
-- Main function; to be called by wrapper | -- Main function; to be called by wrapper | ||
| Line 32: | Line 29: | ||
local bright_gen_step_count = mos.bright_gen_step_count(input_mos) | local bright_gen_step_count = mos.bright_gen_step_count(input_mos) | ||
local dark_gen_step_count = mos.dark_gen_step_count(input_mos) | local dark_gen_step_count = mos.dark_gen_step_count(input_mos) | ||
-- Create the table | -- Create the table | ||
| Line 57: | Line 43: | ||
.. "!! rowspan=\"2\" | Steps subtended" | .. "!! rowspan=\"2\" | Steps subtended" | ||
.. "!! rowspan=\"2\" | Range in cents" | .. "!! rowspan=\"2\" | Range in cents" | ||
.. "|-\n" -- Start of second row of header cells | .. "|-\n" -- Start of second row of header cells | ||
.. "! Generic" | .. "! Generic" | ||
| Line 83: | Line 67: | ||
.. string.format("|| %s " , mos.interval_as_string(current_bright_interval)) | .. string.format("|| %s " , mos.interval_as_string(current_bright_interval)) | ||
.. string.format("|| %.1f¢ ", cents) | .. string.format("|| %.1f¢ ", cents) | ||
else | else | ||
-- Calculate the cent values min and max for the current intervals | -- Calculate the cent values min and max for the current intervals | ||
local sm_min_cents = mos.interval_to_cents(current_dark_interval, input_mos, {1,1}) | local sm_min_cents = mos.interval_to_cents(current_dark_interval, input_mos, {1,1}) | ||
| Line 122: | Line 85: | ||
.. string.format("|| %s " , mos.interval_as_string(current_dark_interval)) | .. string.format("|| %s " , mos.interval_as_string(current_dark_interval)) | ||
.. string.format("|| %s " , dark_interval_range) | .. string.format("|| %s " , dark_interval_range) | ||
.. "|-\n" | .. "|-\n" | ||
.. string.format("| %s " , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case", mos_prefix)) | .. string.format("| %s " , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case", mos_prefix)) | ||
| Line 129: | Line 90: | ||
.. string.format("|| %s " , mos.interval_as_string(current_bright_interval)) | .. string.format("|| %s " , mos.interval_as_string(current_bright_interval)) | ||
.. string.format("|| %s " , bright_interval_range) | .. string.format("|| %s " , bright_interval_range) | ||
end | end | ||
result = result .. "\n" | result = result .. "\n" | ||