Module:MOS tunings: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
Update todo, modify footnote code |
||
| Line 12: | Line 12: | ||
-- TODO: | -- TODO: | ||
-- - Diatonic interval category lookup? | -- - Diatonic interval category lookup? | ||
| Line 135: | Line 134: | ||
-- Main function | -- Main function | ||
function p._mos_tunings(input_mos, mos_prefix, mos_abbrev, step_ratios, ji_ratios, is_collapsed) | function p._mos_tunings(input_mos, mos_prefix, mos_abbrev, step_ratios, ji_ratios, footnotes, is_collapsed) | ||
local input_mos = input_mos or mos.new(5,2) | local input_mos = input_mos or mos.new(5,2) | ||
local mos_prefix = mos_prefix or "mos" | local mos_prefix = mos_prefix or "mos" | ||
| Line 142: | Line 141: | ||
local ji_ratios = ji_ratios or {} | local ji_ratios = ji_ratios or {} | ||
local is_collapsed = is_collapsed == true | local is_collapsed = is_collapsed == true | ||
local footnotes = footnotes or "(footnotes here)" | |||
-- Scalesig | -- Scalesig | ||
| Line 224: | Line 224: | ||
end | end | ||
-- End of table | -- End of table, plus footnotes | ||
result = result .. "|}" | result = result | ||
.. "|}\n" | |||
.. string.format("<span style=\"font-size: 0.75em;\">%s</span>", footnotes) | |||
return result | return result | ||
| Line 290: | Line 292: | ||
end | end | ||
return ratios, | return ratios, jira.search_param_footnotes(search_params) | ||
end | end | ||
| Line 298: | Line 300: | ||
local scalesig = frame.args["Scale Signature"] | local scalesig = frame.args["Scale Signature"] | ||
local input_mos = mos.parse(scalesig) | local input_mos = mos.parse(scalesig) | ||
local mos_prefix = tamnams.verify_prefix(input_mos, frame.args["MOS Prefix"]) | local mos_prefix = tamnams.verify_prefix(input_mos, frame.args["MOS Prefix"]) | ||
local mos_abbrev = tamnams.verify_abbrev(input_mos, frame.args["MOS Abbrev"]) | local mos_abbrev = tamnams.verify_abbrev(input_mos, frame.args["MOS Abbrev"]) | ||
local is_collapsed = yesno(frame.args["Collapsed"], false) | local is_collapsed = yesno(frame.args["Collapsed"], false) | ||
local step_ratios = p.parse_step_ratios(frame.args["Step Ratios"]) | local step_ratios = p.parse_step_ratios(frame.args["Step Ratios"]) | ||
local | local equave_in_cents = mos.equave_to_cents(input_mos) | ||
local ji_ratios, footnotes = p.parse_ji_ratios(frame.args["JI Ratios"], equave_in_cents) | |||
return p._mos_tunings(input_mos, mos_prefix, mos_abbrev, step_ratios, ji_ratios, is_collapsed) .. search_params_footnote | return p._mos_tunings(input_mos, mos_prefix, mos_abbrev, step_ratios, ji_ratios, footnotes, is_collapsed) .. search_params_footnote | ||
end | end | ||