「モジュール:MOS intro」の版間の差分

Furcht968 (トーク | 投稿記録)
編集の要約なし
Furcht968 (トーク | 投稿記録)
編集の要約なし
タグ: モバイル編集 モバイルウェブ編集
 
(同じ利用者による、間の8版が非表示)
55行目: 55行目:
-- Construct the sentence
-- Construct the sentence
local sentence = string.format("'''%s'''", scale_sig)
local sentence = string.format("'''%s'''は、", scale_sig)
-- Add names
-- Add names
if tamnams_names_list ~= "" and other_names_list ~= "" then
if tamnams_names_list ~= "" and other_names_list ~= "" then
-- There are both tamnams names and alternate names
-- There are both tamnams names and alternate names
sentence = sentence .. string.format("は、{{En仮リンク|TAMNAMS}}においては%sや、他に%sとも呼ばれ、,", tamnams_names_list, other_names_list)
sentence = sentence .. string.format("{{En仮リンク|TAMNAMS}}においては%sと呼ばれ、他に%sといった呼称が存在する。この音階は", tamnams_names_list, other_names_list)
elseif tamnams_names_list ~= "" and other_names_list == "" then
elseif tamnams_names_list ~= "" and other_names_list == "" then
-- There are only tamnams names
-- There are only tamnams names
sentence = sentence .. string.format("は、{{En仮リンク|TAMNAMS}}において%sと呼ばれ、", tamnams_names_list)
sentence = sentence .. string.format("{{En仮リンク|TAMNAMS}}において%sと呼ばれる。この音階は", tamnams_names_list)
elseif tamnams_names_list == "" and other_names_list ~= "" then
elseif tamnams_names_list == "" and other_names_list ~= "" then
-- There are no tamnams names but there are alternate names
-- There are no tamnams names but there are alternate names
sentence = sentence .. string.format("は、%sと呼ばれ、", other_names_list)
sentence = sentence .. string.format("%sと呼ばれる。この音階は", other_names_list)
end
end
177行目: 177行目:
local descendant_text = ""
local descendant_text = ""
if generations == 1 then
if generations == 1 then
descendant_text = string.format("%s is a child scale of [[%s]]", mos.as_string(input_mos), mos.as_string(ancestor_mos))
descendant_text = string.format("%sは、[[%s]]の親MOSであり", mos.as_string(input_mos), mos.as_string(ancestor_mos))
elseif generations == 2 then
elseif generations == 2 then
descendant_text = string.format("%s is a grandchild scale of [[%s]]", mos.as_string(input_mos), mos.as_string(ancestor_mos))
descendant_text = string.format("%sは、[[%s]]の祖MOSであり", mos.as_string(input_mos), mos.as_string(ancestor_mos))
elseif generations == 3 then
elseif generations == 3 then
descendant_text = string.format("%s is a great-grandchild scale of [[%s]]", mos.as_string(input_mos), mos.as_string(ancestor_mos))
descendant_text = string.format("%sは、[[%s]]の曽祖MOSであり", mos.as_string(input_mos), mos.as_string(ancestor_mos))
else
else
descendant_text = string.format("%s is related to [[%s]]", mos.as_string(input_mos), mos.as_string(ancestor_mos))
descendant_text = string.format("%sは、[[%s]]と近親であり", mos.as_string(input_mos), mos.as_string(ancestor_mos))
end
end
194行目: 194行目:
--end
--end
descendant_text = descendant_text .. string.format(", expanding it by %d tones.", input_mos.nL + input_mos.ns - ancestor_mos.nL - ancestor_mos.ns)
descendant_text = descendant_text .. string.format("%d音分増える。", input_mos.nL + input_mos.ns - ancestor_mos.nL - ancestor_mos.ns)
return descendant_text
return descendant_text
230行目: 230行目:
-- This is done through the aid of a helper function
-- This is done through the aid of a helper function
local intro = p.mos_intro_names(scale_sig, tamnams_pasred, other_parsed)
local intro = p.mos_intro_names(scale_sig, tamnams_pasred, other_parsed)
-- Add repetition
if n == 1 then
intro = intro .. (equave_in_cents == 1200 and "[[オクターブ]]" or string.format("[[%s]] (%.1f{{cent}})の音程", equave_as_ratio, equave_in_cents, round)) .. "の中で"
else
intro = intro .. (equave_in_cents == 1200 and "[[オクターブ]]" or string.format("[[%s]] (%.1f{{cent}})の音程", equave_as_ratio, equave_in_cents, round)) .. string.format("を%d回、", n)
intro = intro .. string.format("%.1f{{cent}}の音程の中で", period_in_cents)
intro = intro .. string.format("%d個の広い音程と", nL/n)
intro = intro .. string.format("%d個の狭い音程の周期と共に", ns/n)
end


-- Add step counts
-- Add step counts
256行目: 246行目:
-- Add equave equivalence
-- Add equave equivalence
if rat.eq(input_mos.equave, rat.new(2)) then
if rat.eq(input_mos.equave, rat.new(2)) then
intro = intro .. "[[オクターブ]]を周期とする[[MOS]]スケールである。"
intro = intro .. "[[オクターブ]]を周期とする[[MOSスケール]]である。"
elseif rat.eq(input_mos.equave, rat.new(3)) then
elseif rat.eq(input_mos.equave, rat.new(3)) then
intro = intro .. "[[トリターブ]]を周期とする[MOS]]スケールである。"
intro = intro .. "[[トリターブ]]を周期とする[MOSスケール]]である。"
elseif rat.eq(input_mos.equave, rat.new(3,2)) then
elseif rat.eq(input_mos.equave, rat.new(3,2)) then
intro = intro .. "[[3/2]]を周期とする[[MOS]]スケールである。"
intro = intro .. "[[3/2]]を周期とする[[MOSスケール]]である。"
else
else
intro = intro .. string.format("%sを周期とする[[MOS]]である。", equave_as_ratio)
intro = intro .. string.format("%sを周期とする[[MOSスケール]]である。", equave_as_ratio)
end
-- Add repetition
if n == 1 then
intro = intro .. (equave_in_cents == 1200 and "[[オクターブ]]" or string.format("[[%s]] (%.1f{{cent}})の音程", equave_as_ratio, equave_in_cents, round)) .. "の中で"
else
intro = intro .. string.format("この音階は、%d個の広い音程と%d個の狭い音程からなる繰り返しが", nL/n, ns/n)
intro = intro .. string.format("%.1f{{cent}}ごとに、つまり", period_in_cents)
intro = intro .. (equave_in_cents == 1200 and "[[オクターブ]]" or string.format("[[%s]] (%.1f{{cent}})の音程", equave_as_ratio, equave_in_cents, round)) .. string.format("につき%d回繰り返される。", n)
 
end
end
292行目: 292行目:
local dark_gen_max_r = tostring(utils._round_dec(dark_gen_max, round))
local dark_gen_max_r = tostring(utils._round_dec(dark_gen_max, round))
intro = intro .. string.format("この音階は、%s{{cent}}から%s{{cent}}、あるいは%s{{cent}}から%s{{cent}}までの[[ジェネレーター]]を用いて作られる。", bright_gen_min_r, bright_gen_max_r, dark_gen_min_r, dark_gen_max_r)
intro = intro .. string.format("%s{{cent}}から%s{{cent}}、あるいは%s{{cent}}から%s{{cent}}までの[[ジェネレーター]]を用いて作られる。", bright_gen_min_r, bright_gen_max_r, dark_gen_min_r, dark_gen_max_r)
-- Rothenberg propriety (rothenprop) info
-- Rothenberg propriety (rothenprop) info
if ns == 1 then
if ns == 1 then
intro = intro .. " Scales of this form are always [[proper]] because there is only one small step."
intro = intro .. "この形式の音階は、狭い音程が1つしかないため、常に{{En仮リンク|厳密に適正|Rothenberg propriety}}となる。"
elseif ns / n == 1 then
elseif ns / n == 1 then
intro = intro .. " Scales of the true MOS form, where every period is the same, are [[proper]] because there is only one small step per period."
intro = intro .. "全ての周期が等しく、真にMOSである場合は、1周期につき狭い音程が1つしかないため、{{En仮リンク|厳密に適正|Rothenberg propriety}}である。"
end
end