Module:MOS mode degrees: Difference between revisions
Updated comments; condensed modmos and mos functions back into one since code is near-identical |
m Comments |
||
| Line 91: | Line 91: | ||
local result = "{| class=\"wikitable sortable\"\n" | local result = "{| class=\"wikitable sortable\"\n" | ||
-- Table header | |||
-- If it's for a modmos, add the step pattern | |||
if is_true_mos then | if is_true_mos then | ||
result = result .. string.format("|+ style=\"font-size: 105%%;\" | Scale degree qualities of %s modes\n", scale_sig) | result = result .. string.format("|+ style=\"font-size: 105%%;\" | Scale degree qualities of %s modes\n", scale_sig) | ||
| Line 99: | Line 101: | ||
-- Add table headers for first row | -- Add table headers for first row | ||
result = result | result = result | ||
.. "! rowspan=\"2\" | UDP " .. (is_true_mos and "" or " and alterations ") | .. "! rowspan=\"2\" | UDP " .. (is_true_mos and "" or " and alterations ") -- If modmos, add "and alterations" string | ||
.. "!! rowspan=\"2\" | Rotational Order " | .. "!! rowspan=\"2\" | Rotational Order " | ||
.. "!! rowspan=\"2\" | Step pattern" | .. "!! rowspan=\"2\" | Step pattern" | ||
| Line 138: | Line 140: | ||
-- Add scale degrees with cell coloring | -- Add scale degrees with cell coloring | ||
-- Use "m" for the mos abbrev since some mos abbrevs are too long. | |||
for j = 1, #step_matrices[i] do | for j = 1, #step_matrices[i] do | ||
local current_interval = step_matrices[i][j] | local current_interval = step_matrices[i][j] | ||
local degree_quality = tamnams.decode_quality(current_interval, input_mos, "shortened") | local degree_quality = tamnams.decode_quality(current_interval, input_mos, "shortened", "m") | ||
local cell_color = p.cell_color(current_interval, input_mos) | local cell_color = p.cell_color(current_interval, input_mos) | ||