Module:MOS mode degrees: Difference between revisions
double-flats |
Adopt verify function |
||
| Line 192: | Line 192: | ||
-- Function to be called as part of a template | -- Function to be called as part of a template | ||
function p.mos_mode_degrees(frame) | function p.mos_mode_degrees(frame) | ||
-- | -- Get args | ||
local input_mos = mos.parse(frame.args["Scale Signature"]) | local input_mos = mos.parse(frame.args["Scale Signature"]) | ||
local mos_prefix = frame.args["MOS Prefix"] | |||
local step_pattern = frame.args["MODMOS Step Pattern"] | |||
local mode_names_unparsed = frame.args["Mode Names"] | |||
-- Get the scale sig; for calculating the mos prefix | -- Get the scale sig; for calculating the mos prefix | ||
local scale_sig = mos.as_string(input_mos) | local scale_sig = mos.as_string(input_mos) | ||
-- | -- Verify mosprefix | ||
mos_prefix = tamnams.verify_prefix(input_mos, mos_prefix) | |||
-- Get the mode names | -- Get the mode names | ||
| Line 315: | Line 302: | ||
-- If using default mode names (scalesig+udp), those names are auto-added by the relevant function | -- If using default mode names (scalesig+udp), those names are auto-added by the relevant function | ||
local use_default_names = false | local use_default_names = false | ||
if # | if #mode_names_unparsed ~= 0 then | ||
if | if mode_names_unparsed == "Default" then | ||
use_default_names = true | use_default_names = true | ||
else | else | ||
mode_names = tip.parse_entries( | mode_names = tip.parse_entries(mode_names_unparsed) | ||
end | end | ||
end | end | ||