Module:MOS degrees: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 21: Line 21:
-- Parses entries from a semicolon-delimited string and returns them in an array
-- Parses entries from a semicolon-delimited string and returns them in an array
-- TODO: Separate this and related functions (parse_pair and parse_kv_pairs) into its own module, as they're included
-- TODO: Separate this and related functions (parse_pair and parse_kv_pairs) into its own module, as they're included
-- in various modules at this point, such as: scale tree, MOS mdoes
-- in various modules at this point, such as: scale tree, MOS modes
function p.parse_entries(unparsed)
function p.parse_entries(unparsed)
local parsed = {}
local parsed = {}
Line 802: Line 802:
if #frame.args["Notation"] > 0 then
if #frame.args["Notation"] > 0 then
if frame.args["Notation"] == "Default" and scale_sig == "5L 2s" then
if frame.args["Notation"] == "Default" and scale_sig == "5L 2s" then
notation_parsed = { ['Naturals'] = "CDEFGAB", ['Sharp'] = "#", ['Flat'] = "b" }
notation_parsed = { ["Naturals"] = "CDEFGAB", ["Sharp"] = "#", ["Flat"] = "b" }
show_notation = 1
show_notation = 1
elseif frame.args["Notation"] == "Default" and scale_sig ~= "5L 2s" then
elseif frame.args["Notation"] == "Default" and scale_sig ~= "5L 2s" then
local default_nominals = "JKLMNOPQRSTUVWXYZ"
local default_nominals = "JKLMNOPQRSTUVWXYZ"
notation_parsed = { ["Naturals"] = string.sub(default_nominals, 1, mossteps_per_equave), ['Sharp'] = "&", ['Flat'] = "@" }
notation_parsed = { ["Naturals"] = string.sub(default_nominals, 1, mossteps_per_equave), ["Sharp"] = "&", ["Flat"] = "@" }
show_notation = 1
show_notation = 1
else
else