Module:MOS degrees: Difference between revisions
Undo revision 145418 by Ganaram inukshuk (talk) Undo to investigate errors with infobox Tag: Undo |
Adopt tamnams module for lookup (again) |
||
| Line 5: | Line 5: | ||
local et = require('Module:ET') | local et = require('Module:ET') | ||
--local jiraf = require('Module:JI ratio finder') | --local jiraf = require('Module:JI ratio finder') | ||
local tamnams = require('Module:TAMNAMS') | |||
local p = {} | local p = {} | ||
| Line 11: | Line 12: | ||
-- and doesn't depend on genchains (except for note names) to calculate cent values or degree names. | -- and doesn't depend on genchains (except for note names) to calculate cent values or degree names. | ||
-- Current TODO list: | -- Current TODO list: | ||
-- - Rewrite "main function" into a underscore-prefixed function to be called | |||
-- by lua code and a wrapper to be called by templates. (HIGH PRIORITY!!!) | |||
-- - Adopt mos arithmetic function (MEDIUM-PRIORITY!!!) | |||
-- - Add support for double accidentals (low-priority) | -- - Add support for double accidentals (low-priority) | ||
-- - Move certain helper functions to helper modules (low-priority) | -- - Move certain helper functions to helper modules (low-priority) | ||
| Line 118: | Line 122: | ||
function p.interval_to_etsteps(mosstep_vector, step_ratios) | function p.interval_to_etsteps(mosstep_vector, step_ratios) | ||
return mosstep_vector['L'] * step_ratios[1] + mosstep_vector['s'] * step_ratios[2] | return mosstep_vector['L'] * step_ratios[1] + mosstep_vector['s'] * step_ratios[2] | ||
end | end | ||
| Line 767: | Line 752: | ||
mos_prefix = "" | mos_prefix = "" | ||
elseif string.len(frame.args['MOS Prefix']) == 0 then | elseif string.len(frame.args['MOS Prefix']) == 0 then | ||
mos_prefix_lookup = | mos_prefix_lookup = tamnams.lookup_prefix(scale_sig) | ||
if string.len(mos_prefix_lookup) ~= 0 then | if string.len(mos_prefix_lookup) ~= 0 then | ||
mos_prefix = mos_prefix_lookup | mos_prefix = mos_prefix_lookup | ||