Module:Lumatone mapping intro: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
local p = {}
local p = {}
local ET = require("Module:ET")
local ET = require("Module:ET")
local rat = require("Module:Rational")
local gcd = require("Module:Utils")._gcd
local gcd = require("Module:Utils")._gcd
local rat = require("Module:Rational")
local yesno = require("Module:Yesno")
local yesno = require("Module:Yesno")


Line 8: Line 8:
local tuning = frame.args["edo"]
local tuning = frame.args["edo"]
local et = ET.parse(tuning) or ET.parse(tuning .. "edo") or ET.parse("12edo")
local et = ET.parse(tuning) or ET.parse(tuning .. "edo") or ET.parse("12edo")
local debug_mode = yesno(frame.args["debug"])
local debugg = yesno(frame.args["debug"])
local octave = ET.approximate(et, 2)
local octave = ET.approximate(et, 2)
Line 40: Line 40:
end
end
return frame:preprocess(debug_mode == true and "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>" or result)
-- Debugger option
if debugg == true then
result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>"
end
return frame:preprocess(result)
end
end


return p
return p