Module:MOS tuning spectrum: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
comments; possible todo |
||
| Line 4: | Line 4: | ||
local getArgs = require("Module:Arguments").getArgs | local getArgs = require("Module:Arguments").getArgs | ||
local p = {} | local p = {} | ||
-- TODO (low-ish priority?): | |||
-- - Comments outside of the search depth are added to the table regardless | |||
-- Re-re-rewrite of tuning spectrum | -- Re-re-rewrite of tuning spectrum | ||
| Line 12: | Line 15: | ||
local input_mos = args["Input MOS"] or mos.new(5, 2) | local input_mos = args["Input MOS"] or mos.new(5, 2) | ||
local depth = args["Depth"] | local depth = args["Depth"] or default_depth | ||
local comments = args["Comments"] or {} | local comments = args["Comments"] or {} | ||
local step_ratios = args["Step Ratios"] or default_ratios | local step_ratios = args["Step Ratios"] or default_ratios | ||
| Line 136: | Line 139: | ||
end | end | ||
-- Wrapper function; to be called by template | -- Wrapper function; to be called by template; preprocesses args | ||
-- Unprocessed args: | |||
-- - Scale Signature (textual scalesig) | |||
-- - Depth (how deep to search for mediants) | |||
-- - Int Limit (if present, overrides depth-based search for int-limit search) | |||
-- - X/Y (comments for individual step ratios) | |||
-- - First/Last Step Ratio (initial ratios for mediant search; default is | |||
-- 1/1 and 1/0 respectively) | |||
-- Processed args: | |||
-- - Input MOS (processed from textual scalesig) | |||
-- - Depth (how deep the search for step ratios was; unchanged by default, | |||
-- overridden by int-limit search if that search was used) | |||
-- - Step Ratios (table of step ratios found) | |||
-- - Depths (table of how deep each step ratio was found at) | |||
-- - Comments (step ratio comments placed in their own table) | |||
function p.mos_tuning_spectrum(frame) | function p.mos_tuning_spectrum(frame) | ||
local args = getArgs(frame) | local args = getArgs(frame) | ||
| Line 197: | Line 214: | ||
return frame:preprocess(result) | return frame:preprocess(result) | ||
end | |||
function p.tester() | |||
local args = {} | |||
return p._mos_tuning_spectrum(args) | |||
end | end | ||
return p | return p | ||