Module:Scale tree: Difference between revisions
m Headers |
Moved step ratio ranges to hardness column, added back default comment for which step ratios are proper |
||
| Line 77: | Line 77: | ||
equave_suffix = rat.as_ratio(input_mos.equave) | equave_suffix = rat.as_ratio(input_mos.equave) | ||
end | end | ||
-- Create table | -- Create table | ||
| Line 146: | Line 134: | ||
-- Cell for step ratio | -- Cell for step ratio | ||
-- Include appropriate tamnams name for step ratio | |||
local step_ratio_as_text = string.format("%d:%d", step_ratio[1], step_ratio[2]) | |||
if step_ratio_as_text == "1/1" then | |||
result = result .. string.format("| %s (equalized)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "4/3" then | |||
result = result .. string.format("| %s (supersoft)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "3/2" then | |||
result = result .. string.format("| %s (soft)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "5/3" then | |||
result = result .. string.format("| %s (semisoft)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "2/1" then | |||
result = result .. string.format("| %s (basic)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "5/2" then | |||
result = result .. string.format("| %s (semihard)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "3/1" then | |||
result = result .. string.format("| %s (hard)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "4/1" then | |||
result = result .. string.format("| %s (superhard)\n", step_ratio_as_text) | |||
elseif step_ratio_as_text == "1/0" then | |||
result = result .. string.format("| %s (collapsed)\n", step_ratio_as_text) | |||
else | |||
result = result .. string.format("| %s\n", step_ratio_as_text) | |||
end | |||
-- Cell for hardness, with divide-by-zero check | -- Cell for hardness, with divide-by-zero check | ||
| Line 161: | Line 171: | ||
-- Check for comments | -- Check for comments | ||
-- Add default comments for which generators create a proper scale | |||
local | local comment = comments[key] or "" | ||
if step_ratio_as_text == "2/1" and s == n then | |||
comment = "Bright generators smaller than this are proper</br>" .. comment | |||
comment = | |||
end | end | ||
result = result .. string.format("| %s\n", comment) | result = result .. string.format("| %s\n", comment) | ||