「モジュール:Infobox ET」の版間の差分
ページの作成:「local p = {} local utils = require("Module:Utils") local rat = require("Module:Rational") local limits = require("Module:Limits") local ET = require("Module:ET") local in…」 |
Tessyrrh1016 (トーク | 投稿記録) 翻訳 |
||
| (他の1人の利用者による、間の1版が非表示) | |||
| 58行目: | 58行目: | ||
if rat.eq(et.equave, 2) then | if rat.eq(et.equave, 2) then | ||
categories = categories | categories = categories | ||
.. "[[Category: | .. "[[Category:オクターブ平均律|" | ||
.. string.rep("#", string.len(et.size)) | .. string.rep("#", string.len(et.size)) | ||
.. "]]" | .. "]]" | ||
| 71行目: | 71行目: | ||
prime_factorization = utils._prime_factorization(et.size) | prime_factorization = utils._prime_factorization(et.size) | ||
if utils.is_prime(et.size) then | if utils.is_prime(et.size) then | ||
prime_factorization = prime_factorization .. " | prime_factorization = prime_factorization .. "(素数)" | ||
if rat.eq(et.equave, 2) then | if rat.eq(et.equave, 2) then | ||
categories = categories .. "[[Category: | categories = categories .. "[[Category:素数平均律|" .. string.rep("#", string.len(et.size)) .. "]]" | ||
end | end | ||
end | end | ||
| 124行目: | 124行目: | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "素因数分解", | ||
prime_factorization, | prime_factorization, | ||
}) | }) | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "音程", | ||
utils._round(step_size, 6) .. "¢" .. note_12edo .. " ", | utils._round(step_size, 6) .. "¢" .. note_12edo .. " ", | ||
}) | }) | ||
| 135行目: | 135行目: | ||
if not rat.eq(et.equave, 2) then | if not rat.eq(et.equave, 2) then | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "オクターブ", | ||
approximation(et, 2), | approximation(et, 2), | ||
}) | }) | ||
if not rat.eq(et.equave, 3) then | if not rat.eq(et.equave, 3) then | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "トリターブ", | ||
approximation(et, 3), | approximation(et, 3), | ||
}) | }) | ||
| 146行目: | 146行目: | ||
else | else | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "完全五度", | ||
approximation(et, 3 / 2), | approximation(et, 3 / 2), | ||
}) | }) | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "半音比 (A1:m2)", | ||
A1 .. ":" .. m2 .. " (" .. A1_cents .. "¢ : " .. m2_cents .. "¢)", | A1 .. ":" .. m2 .. " (" .. A1_cents .. "¢ : " .. m2_cents .. "¢)", | ||
}) | }) | ||
if dual_fifth and et.size > 0 then | if dual_fifth and et.size > 0 then | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "シャープ五度", | ||
approximation(et, 3 / 2, 1), | approximation(et, 3 / 2, 1), | ||
}) | }) | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "フラット五度", | ||
approximation(et, 3 / 2, -1), | approximation(et, 3 / 2, -1), | ||
}) | }) | ||
| 165行目: | 165行目: | ||
local flat = ET.approximate(et, 3 / 2, -1) | local flat = ET.approximate(et, 3 / 2, -1) | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "長二度", | ||
approximation(et, 9 / 8, 0, sharp + flat - octave), | approximation(et, 9 / 8, 0, sharp + flat - octave), | ||
}) | }) | ||
categories = categories | categories = categories | ||
.. "[[Category: | .. "[[Category:デュアル5度音律|" | ||
.. string.rep("#", string.len(et.size)) | .. string.rep("#", string.len(et.size)) | ||
.. "]]" | .. "]]" | ||
| 180行目: | 180行目: | ||
end | end | ||
if consistency == nil then | if consistency == nil then | ||
consistency = " | consistency = "43以上" | ||
end | end | ||
if consistency ~= nil then | if consistency ~= nil then | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "一貫限度", | ||
consistency, | consistency, | ||
}) | }) | ||
| 193行目: | 193行目: | ||
end | end | ||
if distinct_consistency == nil then | if distinct_consistency == nil then | ||
distinct_consistency = " | distinct_consistency = "43以上" | ||
end | end | ||
if distinct_consistency ~= nil then | if distinct_consistency ~= nil then | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "厳密一貫限度", | ||
distinct_consistency, | distinct_consistency, | ||
}) | }) | ||
| 206行目: | 206行目: | ||
local text = "" | local text = "" | ||
if ET.is_highly_composite(et) then | if ET.is_highly_composite(et) then | ||
text = text .. "[[ | text = text .. "[[高度合成数平均律|高度合成数]]" | ||
if rat.eq(et.equave, 2) then | if rat.eq(et.equave, 2) then | ||
categories = categories | categories = categories | ||
.. "[[Category: | .. "[[Category:高度合成数平均律|" | ||
.. string.rep("#", string.len(et.size)) | .. string.rep("#", string.len(et.size)) | ||
.. "]]" | .. "]]" | ||
| 226行目: | 226行目: | ||
end | end | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
" | "特異性", | ||
'<div style="max-width: 300px;">' .. text .. "</div>", | '<div style="max-width: 300px;">' .. text .. "</div>", | ||
}) | }) | ||