「モジュール:MOS intro」の版間の差分
ページの作成:「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…」 |
編集の要約なし |
||
| 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(" | 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(" | 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(" | 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 .. " | 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 .. " | 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 .. " | intro = intro .. "[[3/2]]を周期とする[[MOS]]スケールである。" | ||
else | else | ||
intro = intro .. string.format(" | intro = intro .. string.format("%sを周期とする[[MOS]]である。", equave_as_ratio) | ||
end | end | ||
-- 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(" | 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 | ||