Module:Infobox MOS: Difference between revisions

Inthar (talk | contribs)
No edit summary
Inthar (talk | contribs)
No edit summary
Line 46: Line 46:
['9L 1s'] = 'sinatonic'
['9L 1s'] = 'sinatonic'
}
}
local common_name = {
['3/2'] = 'fifth',
['3/1'] = 'tritave'
}
function gcd(x, y)
function gcd(x, y)
if x < y then
if x < y then
Line 78: Line 84:
['f'] = rat.new(3, 2),
['f'] = rat.new(3, 2),
['o'] = 2,
['o'] = 2,
['t'] = 3
['t'] = 3,
['fifth'] = rat.new(3, 2),
['tritave'] = rat.new(3, 1)
}
}


Line 91: Line 99:
categories = categories .. '[[Category:' .. tuning .. '| ]]'
categories = categories .. '[[Category:' .. tuning .. '| ]]'
local equave = mos.equave
local equave = rat.as_ratio(mos.equave)
local equave_link = ' (' .. rat.as_ratio(equave) .. '-equivalent)'
local equave_link = ' (' .. (common_name[rat.as_ratio(equave)] or rat.as_ratio(equave))  .. '-equivalent)'
local equave_disp = '<' .. rat.as_ratio(equave) .. '>'
local equave_disp = '<' .. rat.as_ratio(equave) .. '>'
if rat.eq(equave, 2) then
if rat.eq(equave, 2) then