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

Furcht968 (トーク | 投稿記録)
ページの作成:「local p = {} local et = require("Module:ET") local mos = require("Module:MOS") local rat = require("Module:Rational") local tamnams = require("Module:TAMNAMS") local tip = require("Module:Template input parse") local utils = require("Module:Utils") local yesno = require("Module:Yesno") -- TODO: -- - Possible cleanup/rewording -- - Possible official deprecation of other names; focus should be on what a mos -- is, not what it's called. -- Helper function -- Lists…」
 
Furcht968 (トーク | 投稿記録)
編集の要約なし
60行目: 60行目:
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(", named %s in [[TAMNAMS]] (also known as %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(", named %s in [[TAMNAMS]],", 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(", also called %s,", other_names_list)
sentence = sentence .. string.format("は、%sと呼ばれ、", other_names_list)
end
end
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 step counts
if nL >= 10 then
intro = intro .. string.format("%d個の広い音程と", nL)
else
intro = intro .. string.format("%dつの広い音程と", nL)
end
if ns >= 10 then
intro = intro .. string.format("%d個の狭い音程を有し、", ns)
else
intro = intro .. string.format("%dつの狭い音程を有し、", ns)
end
 
-- 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 .. " is a 2/1-equivalent ([[octave equivalence|octave-equivalent]]) [[moment of symmetry]] scale"
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 .. " is a 3/1-equivalent ([[tritave]]-equivalent) [[moment of symmetry]] scale"
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 .. " is a 3/2-equivalent (fifth-equivalent) [[moment of symmetry]] scale"
intro = intro .. "[[3/2]]を周期とする[[MOS]]スケールである。"
else
else
intro = intro .. string.format(" is a %s-equivalent ([[nonoctave|non-octave]]) [[moment of symmetry]] scale", equave_as_ratio)
intro = intro .. string.format("%sを周期とする[[MOS]]である。", equave_as_ratio)
end
end
-- Add step counts
intro = intro .. string.format(" containing %d large %s", nL, (nL == 1 and "step" or "steps"))
intro = intro .. string.format(" and %d small %s", ns, (ns == 1 and "step" or "steps"))
-- Add repetition
-- Add repetition
283行目: 293行目:
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(" [[Generator]]s that produce this scale range from %s{{cent}} to %s{{cent}}, or from %s{{cent}} to %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