Module:MOS intervals: Difference between revisions
m Removed old code, fixed bug with ranges being highest to lowest |
Minor function renaming to current coding style; will momentarily break corresponding template |
||
| Line 108: | Line 108: | ||
end | end | ||
function p. | -- Main function; to be called by wrapper | ||
function p._mos_intervals(input_mos, mos_prefix) | |||
-- Default param for input mos is 5L 2s | -- Default param for input mos is 5L 2s | ||
local input_mos = input_mos or mos.new(5, 2, 2) | local input_mos = input_mos or mos.new(5, 2, 2) | ||
| Line 237: | Line 238: | ||
end | end | ||
function p. | -- Wrapper function; to be called by template | ||
function p.mos_intervals(frame) | |||
-- Get input mos | -- Get input mos | ||
local input_mos = mos.parse(frame.args['Scale Signature']) | local input_mos = mos.parse(frame.args['Scale Signature']) | ||
| Line 253: | Line 255: | ||
end | end | ||
local result = p. | local result = p._mos_intervals(input_mos, mos_prefix) | ||
return result | return result | ||