Module:Infobox ET: Difference between revisions

Fredg999 (talk | contribs)
First draft, includes prime factorization, step size and fifth
 
Fredg999 (talk | contribs)
m Bug fixing
Line 6: Line 6:
local tuning = frame.args['tuning']
local tuning = frame.args['tuning']
local size, equave = i.parse_ET(tuning)
local size, equave = i.parse_ET(tuning)
if tuning:match("edo$") then
if equave == 2 then
tuning = size
tuning = size
end
end
Line 22: Line 22:
'">\n' ..
'">\n' ..
'{| width="100%" style="border-collapse: collapse;"\n' ..
'{| width="100%" style="border-collapse: collapse;"\n' ..
'|+ ' .. frame.args['tuning'] .. '\n' ..
'|+ style="font-weight: bold" | ' .. frame.args['tuning'] .. '\n' ..
'|-\n' ..
'|-\n' ..
'| style="text-align:right; padding-right: 0.25em" | Prime factorization\n' ..
'| style="text-align:right; padding-right: 0.25em" | Prime factorization\n' ..
Line 31: Line 31:
'|-\n' ..
'|-\n' ..
'| style="text-align:right; padding-right: 0.25em" | Fifth\n' ..
'| style="text-align:right; padding-right: 0.25em" | Fifth\n' ..
'| style="background-color: white; padding-left: 0.25em; font-weight: bold" | ' .. fifth .. '\\' .. tuning .. ' (' .. i._to_cents(fifth, 6) .. '{{cent}})\n' ..
'| style="background-color: white; padding-left: 0.25em; font-weight: bold" | ' .. u._round(fifth, 0) .. '\\' .. tuning .. ' (' .. i._to_cents(fifth, 6) .. '{{cent}})\n' ..
'|}</div>'
'|}</div>'
end
end


return p
return p