「モジュール:Harmonics in equal」の版間の差分

Tessyrrh1016 (トーク | 投稿記録)
 
Tessyrrh1016 (トーク | 投稿記録)
編集の要約なし
 
(同じ利用者による、間の1版が非表示)
26行目: 26行目:
thead = "{| class=\"wikitable center-all\"\n"
thead = "{| class=\"wikitable center-all\"\n"
end
end
local tpri = {"! colspan=\"2\" | Harmonic "}
local tpri = {"! colspan=\"2\" | 倍音 "}
local tabs = {"! rowspan=\"2\" | Error \n! Absolute ([[cent|¢]]) "}
local tabs = {"! rowspan=\"2\" | 誤差 \n! 絶対 ([[セント|¢]]) "}
local trel = {"! [[Relative interval error|Relative]] ([[relative cent|%]]) "}
local trel = {"! [[相対音程誤差|相対]] ([[相対セント|%]]) "}
local tdeg
local tdeg
if reduction then
if reduction then
tdeg = {"! colspan=\"2\" | Steps<br>([[octave reduction|reduced]])"}
tdeg = {"! colspan=\"2\" | ステップ<br>([[octave reduction|reduced]])"}
else
else
tdeg = {"! colspan=\"2\" | Step"}
tdeg = {"! colspan=\"2\" | ステップ"}
end
end
local fmt_abs = string.format(" %%+.%df", prec)
local fmt_abs = string.format(" %%+.%df", prec)
109行目: 109行目:
local select_intervals = "integer"
local select_intervals = "integer"


local name = steps .. "ed" .. num .. "/" .. denom
local name = steps .. "ED" .. num .. "/" .. denom
if denom == 1 then
if denom == 1 then
if num == 2 then
if num == 2 then
name = steps .. "edo"
name = steps .. "EDO"
select_intervals = "odd"
select_intervals = "odd"
if check_consistency(steps, num, denom) then
if check_consistency(steps, num, denom) then
119行目: 119行目:
end
end
elseif num == 3 then
elseif num == 3 then
name = steps .. "edt"
name = steps .. "EDT"
else
else
name = steps .. "ed" .. num
name = steps .. "ED" .. num
end
end
end
end
if num == 3 and denom == 2 then
if num == 3 and denom == 2 then
name = steps .. "edf"
name = steps .. "EDf"
end
end
135行目: 135行目:
if select_intervals == "odd" then
if select_intervals == "odd" then
title_intervals = "odd harmonics"
title_intervals = "奇数倍音"
elseif select_intervals == "integer" then
elseif select_intervals == "integer" then
title_intervals = "harmonics"
title_intervals = "倍音"
else
else
title_intervals = "prime harmonics"
title_intervals = "素数倍音"
end
end
local title = frame.args["title"]
local title = frame.args["title"]
if title == nil or string.len(title) == 0 then
if title == nil or string.len(title) == 0 then
title = "Approximation of ".. title_intervals .. " in " .. name
title = name .. "における" .. title_intervals .. "の近似"
end
end
-- optional precision for abs error, default about 3 digits
-- optional precision for abs error, default about 3 digits