Module:MOS tuning spectrum: Difference between revisions

Ganaram inukshuk (talk | contribs)
add default depth
Ganaram inukshuk (talk | contribs)
m comments; rearrange code
Line 148: Line 148:
args["Scale Signature"] = nil
args["Scale Signature"] = nil
-- Parse depth
-- Parse depth; default is 5
local depth = tonumber(args["Depth"]) or 5
local depth = tonumber(args["Depth"]) or 5
args["Depth"] = depth
args["Depth"] = depth
-- Parse initial ratios
local first_ratio = args["First Step Ratio"] or {1,1}
local last_ratio  = args["Last Step Ratio" ] or {1,0}
-- If int limit is present, use that over searching for ratios by depth
-- If int limit is present, use that over searching for ratios by depth
Line 156: Line 160:
args["Int Limit"] = int_limit
args["Int Limit"] = int_limit
local use_int_limit = args["Int Limit"] ~= nil
local use_int_limit = args["Int Limit"] ~= nil
-- Parse initial ratios
local first_ratio = args["First Step Ratio"] or {1,1}
local last_ratio  = args["Last Step Ratio" ] or {1,0}
-- Then generate mediants and depths
-- Then generate mediants and depths