Module:MOS tunings: Difference between revisions
m update todo |
Update to reflect changes to ji ratios module |
||
| Line 276: | Line 276: | ||
-- If the unparsed string is an empty string, return nil. (This is so the | -- If the unparsed string is an empty string, return nil. (This is so the | ||
-- wrapper function can go by default search params.) | -- wrapper function can go by default search params.) | ||
function p.parse_ji_ratios(unparsed, | function p.parse_ji_ratios(unparsed, equave) | ||
local ratios = nil | local ratios = nil | ||
local params = nil | local params = nil | ||
if unparsed == "" then | if unparsed == "" then | ||
params = {["Int Limit"] = 30, ["Tenney Height"] = 9 | params = {["Int Limit"] = 30, ["Tenney Height"] = 9} | ||
ratios = jira.search_by_params(params, | ratios = jira.search_by_params(params, equave) -- Default search params, given no other params | ||
elseif unparsed == "NONE" then | elseif unparsed == "NONE" then | ||
params = {} | params = {} | ||
| Line 288: | Line 288: | ||
elseif string.match(unparsed, "Int Limit:") then | elseif string.match(unparsed, "Int Limit:") then | ||
params = jira.parse_search_params(unparsed) -- Search params require at the absolute least an int limit, so see if there's "Int Limit" | params = jira.parse_search_params(unparsed) -- Search params require at the absolute least an int limit, so see if there's "Int Limit" | ||
ratios = jira.search_by_params(params, | ratios = jira.search_by_params(params, equave) | ||
else | else | ||
ratios = jira.parse_ratios(unparsed) | ratios = jira.parse_ratios(unparsed) | ||
| Line 307: | Line 307: | ||
local step_ratios = p.parse_step_ratios(frame.args["Step Ratios"]) | local step_ratios = p.parse_step_ratios(frame.args["Step Ratios"]) | ||
local ji_ratios, footnotes = p.parse_ji_ratios(frame.args["JI Ratios"], input_mos.equave) | |||
local ji_ratios, footnotes = p.parse_ji_ratios(frame.args["JI Ratios"], | |||
return p._mos_tunings(input_mos, mos_prefix, mos_abbrev, step_ratios, ji_ratios, footnotes, is_collapsed) | return p._mos_tunings(input_mos, mos_prefix, mos_abbrev, step_ratios, ji_ratios, footnotes, is_collapsed) | ||