Module:MOS tuning spectrum: Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 21: | Line 21: | ||
local equave = input_mos.equave | local equave = input_mos.equave | ||
local | local large_steps = input_mos.nL -- Large steps in mos | ||
local | local small_steps = input_mos.ns -- Small steps in mos | ||
local | local periods = mos.period_count(input_mos) -- Number of periods | ||
-- What is the | -- What is the et suffix (edo, edt, edf, ed-p/q)? | ||
local | local et_suffix = mos.mos_to_et_suffix(input_mos) | ||
-- Default comments for TAMNAMS-named step ratios | -- Default comments for TAMNAMS-named step ratios | ||
| Line 53: | Line 44: | ||
-- Monosmall mosses and knL ns mosses are always proper, but all other mosses | -- Monosmall mosses and knL ns mosses are always proper, but all other mosses | ||
-- are proper if the step ratio is within the soft-of-basic range | -- are proper if the step ratio is within the soft-of-basic range | ||
if | if periods < small_steps then | ||
default_comments["2/1"] = default_comments["2/1"] .. "<br />Scales with tunings softer than this are proper" | default_comments["2/1"] = default_comments["2/1"] .. "<br />Scales with tunings softer than this are proper" | ||
end | end | ||
| Line 59: | Line 50: | ||
-- Produce table header for the comments | -- Produce table header for the comments | ||
local comments_header_text = "Comments" | local comments_header_text = "Comments" | ||
if | if small_steps == 1 then | ||
comments_header_text = comments_header_text .. "<sup><abbr title=\"Every tuning produces a proper scale.\">(always proper)</abbr></sup>" | comments_header_text = comments_header_text .. "<sup><abbr title=\"Every tuning produces a proper scale.\">(always proper)</abbr></sup>" | ||
elseif | elseif small_steps == periods and periods > 1 then | ||
comments_header_text = comments_header_text .. "<sup><abbr title=\"Every true-mos tuning produces a proper scale.\">(always proper)</abbr></sup>" | comments_header_text = comments_header_text .. "<sup><abbr title=\"Every true-mos tuning produces a proper scale.\">(always proper)</abbr></sup>" | ||
end | end | ||
| Line 74: | Line 65: | ||
.. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("Scale tree and tuning spectrum of %s\n", mos_as_string) | .. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("Scale tree and tuning spectrum of %s\n", mos_as_string) | ||
.. "|-\n" | .. "|-\n" | ||
.. string.format("! rowspan=\"2\" colspan=\"%d\" | Generator<sup><abbr title=\"In steps of | .. string.format("! rowspan=\"2\" colspan=\"%d\" | Generator<sup><abbr title=\"In steps of %s.\">(%s)</abbr></sup>\n", depth + 1, et_suffix, et_suffix) | ||
.. "! colspan=\"2\" | Cents\n" | .. "! colspan=\"2\" | Cents\n" | ||
.. "! colspan=\"2\" | Step ratio\n" | .. "! colspan=\"2\" | Step ratio\n" | ||