「モジュール: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:Equal divisions of the octave|"
.. "[[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)"
prime_factorization = prime_factorization .. "(素数)"
if rat.eq(et.equave, 2) then
if rat.eq(et.equave, 2) then
categories = categories .. "[[Category:Prime EDO|" .. string.rep("#", string.len(et.size)) .. "]]"
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,
prime_factorization,
})
})


table.insert(infobox_data, {
table.insert(infobox_data, {
"Step size",
"音程",
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, {
"Octave",
"オクターブ",
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, {
"Twelfth",
"トリターブ",
approximation(et, 3),
approximation(et, 3),
})
})
146行目: 146行目:
else
else
table.insert(infobox_data, {
table.insert(infobox_data, {
"Fifth",
"完全五度",
approximation(et, 3 / 2),
approximation(et, 3 / 2),
})
})
table.insert(infobox_data, {
table.insert(infobox_data, {
"Semitones (A1:m2)",
"半音比 (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, {
"Dual sharp fifth",
"シャープ五度",
approximation(et, 3 / 2, 1),
approximation(et, 3 / 2, 1),
})
})
table.insert(infobox_data, {
table.insert(infobox_data, {
"Dual flat fifth",
"フラット五度",
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, {
"Dual major 2nd",
"長二度",
approximation(et, 9 / 8, 0, sharp + flat - octave),
approximation(et, 9 / 8, 0, sharp + flat - octave),
})
})
categories = categories
categories = categories
.. "[[Category:Dual-fifth temperaments|"
.. "[[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 = "at least 43"
consistency = "43以上"
end
end
if consistency ~= nil then
if consistency ~= nil then
table.insert(infobox_data, {
table.insert(infobox_data, {
"Consistency limit",
"一貫限度",
consistency,
consistency,
})
})
193行目: 193行目:
end
end
if distinct_consistency == nil then
if distinct_consistency == nil then
distinct_consistency = "at least 43"
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 limit",
"厳密一貫限度",
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 .. "[[Highly composite equal division|Highly composite]]"
text = text .. "[[高度合成数平均律|高度合成数]]"
if rat.eq(et.equave, 2) then
if rat.eq(et.equave, 2) then
categories = categories
categories = categories
.. "[[Category:Highly composite EDO|"
.. "[[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, {
"Special properties",
"特異性",
'<div style="max-width: 300px;">' .. text .. "</div>",
'<div style="max-width: 300px;">' .. text .. "</div>",
})
})