Module:Infobox MOS: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 53: | Line 53: | ||
-- Adds categories | -- Adds categories | ||
function p.categorize(input_mos) | function p.categorize(input_mos) | ||
local input_mos = input_mos or mos.new(5,2) | local input_mos = input_mos or mos.new(5, 2) | ||
-- Add to category of abstact mosses | -- Add to category of abstact mosses | ||
local categories = "[[Category:Abstract MOS patterns]]" | local categories = " [[Category:Abstract MOS patterns]]" | ||
-- Add notecount category if the notecount is greater than 3 | -- Add notecount category if the notecount is greater than 3 | ||
local notecount = input_mos.nL + input_mos.ns | local notecount = input_mos.nL + input_mos.ns | ||
if notecount > 3 then | if notecount > 3 then | ||
categories = categories .. string.format("[[Category:%d-tone scales]]", notecount) | categories = categories .. string.format(" [[Category:%d-tone scales]]", notecount) | ||
end | end | ||
| Line 76: | Line 76: | ||
if tamnams_name ~= nil then | if tamnams_name ~= nil then | ||
categories = categories .. string.format("[[Category:%s]]", tamnams_name) | categories = categories .. string.format(" [[Category:%s]]", tamnams_name) | ||
end | end | ||
else | else | ||
categories = categories .. "[[Category:Nonoctave]]" | categories = categories .. " [[Category:Nonoctave]]" | ||
end | end | ||
| Line 316: | Line 316: | ||
function p.equal_tunings(input_mos) | function p.equal_tunings(input_mos) | ||
local input_mos = input_mos or mos.new(5, 2) | local input_mos = input_mos or mos.new(5, 2) | ||
local bright_gen = mos.bright_gen(input_mos) | local bright_gen = mos.bright_gen(input_mos) | ||
local step_ratios = { | local step_ratios = { | ||
{ 1, 1 }, | { 1, 1 }, | ||