Module:MOS degrees: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
local p = {}
local et = require("Module:ET")
--local jiraf = require("Module:JI ratio finder")
local mos = require("Module:MOS")
local mos = require("Module:MOS")
local mosnot = require("Module:MOS notation")
local rat = require("Module:Rational")
local rat = require("Module:Rational")
local tamnams = require("Module:TAMNAMS")
local utils = require("Module:Utils")
local utils = require("Module:Utils")
local mosnot = require("Module:MOS notation")
local yesno = require("Module:Yesno")
local et = require("Module:ET")
--local jiraf = require('Module:JI ratio finder')
local tamnams = require("Module:TAMNAMS")
local p = {}


-- Version 2 of the MOS degrees moudle (by ganaraminukshuk)
-- TODO:
-- This is based more off of the MOS intervals module and older, non-tempalte tables that feature JI ratios,
-- Rewrite "main function" into a underscore-prefixed function to be called by Lua code and a wrapper to be called by templates. (HIGH PRIORITY!!!)
-- and doesn't depend on genchains (except for note names) to calculate cent values or degree names.
-- Adopt MOS arithmetic function (MEDIUM-PRIORITY!!!)
-- Current TODO list:
-- Add support for double accidentals (low-priority)
-- - Rewrite "main function" into a underscore-prefixed function to be called
-- Move certain helper functions to helper modules (low-priority)
--  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)
-- - Move certain helper functions to helper modules (low-priority)


-- Helper function
-- Helper function
Line 819: Line 817:
result = p.mos_degrees(input_mos, step_ratios, mos_prefix, show_abbreviations, number_of_alterations, ji_ratios_parsed, udp_parsed, notation_parsed, show_notation)
result = p.mos_degrees(input_mos, step_ratios, mos_prefix, show_abbreviations, number_of_alterations, ji_ratios_parsed, udp_parsed, notation_parsed, show_notation)
 
return result
-- Debugger
local debugg = yesno(frame.args["debug"])
if debugg == true then
result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>"
end
return frame:preprocess(result)
end
end


return p
return p