「モジュール:Infobox MOS」の版間の差分
編集の要約なし |
編集の要約なし タグ: 手動差し戻し モバイル編集 モバイルウェブ編集 |
||
| (3人の利用者による、間の14版が非表示) | |||
| 1行目: | 1行目: | ||
local p = {} | local p = {} | ||
local utils = require(' | local utils = require('Module:Utils') | ||
local rat = require(' | local rat = require('Module:Rational') | ||
local mos = require(' | local mos = require('Module:MOS') | ||
local et = require(' | local et = require('Module:ET') | ||
local infobox = require(' | local infobox = require('Module:Infobox') | ||
local kbvis = require(' | local kbvis = require('Module:Keyboard vis') | ||
local tip = require(' | local tip = require('Module:Template input parse') | ||
local tamnams = require(' | local tamnams = require('Module:TAMNAMS') | ||
-- TODO: | -- TODO: | ||
| 45行目: | 45行目: | ||
-- Add to category of abstact mosses | -- Add to category of abstact mosses | ||
local categories = "[[Category: | local categories = "[[Category:抽象MOSパターン]]" | ||
-- Add notecount category if the notecount is greater than 3 | -- Add notecount category if the notecount is greater than 3 | ||
local notecount = input_mos.nL + input_mos.ns | local notecount = input_mos.nL + input_mos.ns | ||
if notecount > 3 then | if notecount > 3 then | ||
categories = categories .. string.format('[[Category:% | categories = categories .. string.format('[[Category:%d音音階]]', notecount) | ||
end | end | ||
| 68行目: | 68行目: | ||
end | end | ||
else | else | ||
categories = categories .. '[[Category: | categories = categories .. '[[Category:非オクターブ]]' | ||
end | end | ||
| 139行目: | 139行目: | ||
end | end | ||
local section_header = " | local section_header = "構造" | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>", section_header)}, | ||
{"[[ | {"[[音程パターン]]", step_pattern}, | ||
{"[[ | {"[[オクターブ]]", string.format("%s (%.1f¢)", equave_as_string, equave_in_cents)}, | ||
{"[[ | {"[[ジェネレーターとピリオド|周期]]", string.format("%s (%.1f¢)", period_as_string, period_in_cents)} | ||
} | } | ||
| 175行目: | 175行目: | ||
local dark_max_in_cents = et.cents(equalized_ed, dark_gen['L'] + dark_gen['s']) | local dark_max_in_cents = et.cents(equalized_ed, dark_gen['L'] + dark_gen['s']) | ||
local section_header = " | local section_header = "ジェネレーター" | ||
local equave_annotation = "" | local equave_annotation = "" | ||
if rat.eq(input_mos.equave, 3) then | if rat.eq(input_mos.equave, 3) then | ||
| 188行目: | 188行目: | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>%s", section_header, equave_annotation)}, | {string.format("<b>%s</b>%s", section_header, equave_annotation)}, | ||
{"[[ | {"[[上方]]", string.format("%s - %s (%.1f¢ - %.1f¢)", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)}, | ||
{"[[ | {"[[下方]]", string.format("%s - %s (%.1f¢ - %.1f¢)", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)}, | ||
} | } | ||
| 218行目: | 218行目: | ||
local large_step_max_in_cents = et.cents(collapsed_ed, 1) | local large_step_max_in_cents = et.cents(collapsed_ed, 1) | ||
local section_header = " | local section_header = "音程" | ||
local equave_annotation = "" | local equave_annotation = "" | ||
if rat.eq(input_mos.equave, 3) then | if rat.eq(input_mos.equave, 3) then | ||
| 231行目: | 231行目: | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>%s", section_header, equave_annotation)}, | {string.format("<b>%s</b>%s", section_header, equave_annotation)}, | ||
{"[[Step pattern | | {"[[Step pattern | 最大]]", string.format("%s to %s (%.1f¢ to %.1f¢)", large_step_min_in_steps, large_step_max_in_steps, large_step_min_in_cents, large_step_max_in_cents)}, | ||
{"[[Step pattern | | {"[[Step pattern | 最小]]", string.format("%s to %s (%.1f¢ to %.1f¢)", small_step_min_in_steps, large_step_min_in_steps, small_step_min_in_cents, large_step_min_in_cents)} | ||
} | } | ||
| 309行目: | 309行目: | ||
local is_root_mos = input_mos.nL == input_mos.ns | local is_root_mos = input_mos.nL == input_mos.ns | ||
local section_header = "TAMNAMS | local section_header = "TAMNAMS" | ||
local section_entries = nil | local section_entries = nil | ||
if is_octave_equivalent then | if is_octave_equivalent then | ||
| 316行目: | 316行目: | ||
section_entries = { | section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>", section_header)}, | ||
{"[[TAMNAMS#Mos_pattern_names | | {"[[TAMNAMS#Mos_pattern_names | 名称]]", tamnams_name}, | ||
{"[[TAMNAMS#Mos_pattern_names | | {"[[TAMNAMS#Mos_pattern_names | 接頭辞]]", tamnams_prefix .. "-"}, | ||
{"[[TAMNAMS#Mos_pattern_names | | {"[[TAMNAMS#Mos_pattern_names | 略記]]", tamnams_abbrev} | ||
} | } | ||
elseif not is_within_named_range and notecount > 10 and not is_root_mos then | elseif not is_within_named_range and notecount > 10 and not is_root_mos then | ||
| 384行目: | 384行目: | ||
section_entries = { | section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>", section_header)}, | ||
{" | {"起源", ancestor_entry}; | ||
{" | {"必須な全音半音比の範囲", string.format("%s", named_range)} | ||
} | } | ||
end | end | ||
| 398行目: | 398行目: | ||
local other_names = other_names or { "p-chromatic", "hard diatonic" } | local other_names = other_names or { "p-chromatic", "hard diatonic" } | ||
local section_header = " | local section_header = "別名" | ||
if #other_names == 0 then | if #other_names == 0 then | ||
| 464行目: | 464行目: | ||
end | end | ||
local section_header = " | local section_header = "近縁の音階" | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<b>%s</b>", section_header)}, | ||
{"[[Operations_on_MOSes#Parent_MOS | | {"[[Operations_on_MOSes#Parent_MOS | 親]]", parent_scalesig}, | ||
{"[[Operations_on_MOSes#Sister_MOS | | {"[[Operations_on_MOSes#Sister_MOS | 姉妹]]", sister_scalesig}, | ||
{"[[Operations_on_MOSes#Daughter_MOS | | {"[[Operations_on_MOSes#Daughter_MOS | 子]]", soft_scalesig .. ", " .. hard_scalesig}, | ||
{"[[Operations_on_MOSes#Neutralization | | {"[[Operations_on_MOSes#Neutralization | 平坦化]]", neutral_scalesig}, | ||
{"[[Flought_scale | | {"[[Flought_scale | 分割]]", soft_floght_scalesig .. ", " .. hard_floght_scalesig} | ||
} | } | ||
| 513行目: | 513行目: | ||
} | } | ||
local section_header = " | local section_header = "平均律による調律" | ||
local equave_annotation = "" | local equave_annotation = "" | ||
if rat.eq(input_mos.equave, 3) then | if rat.eq(input_mos.equave, 3) then | ||
| 626行目: | 626行目: | ||
local entries = { | local entries = { | ||
{" | {"構造"}, | ||
{" | {"最も明るいモード", "LLLsLLs"}, | ||
{" | {"周期", "2\1 (1200¢)"}, | ||
{"Bright generator range", "4\7 (685.7¢) to 3\5 (720¢)"}, | {"Bright generator range", "4\7 (685.7¢) to 3\5 (720¢)"}, | ||
{"Dark generator range", "2\5 (480¢) to 3\7 (514.3¢)"}, | {"Dark generator range", "2\5 (480¢) to 3\7 (514.3¢)"}, | ||
{"TAMNAMS | {"TAMNAMS"}, | ||
{" | {"音階名", "diatonic"}, | ||
{" | {"プレフィックス", "dia-"}, | ||
{" | {"略称", "dia."}, | ||
{" | {"関連する音律"}, | ||
{" | {"親MOS", "2L 3s"}, | ||
{" | {"姉妹MOS", "2L 5s"}, | ||
{" | {"子MOSes", "7L 5s, 5L 7s"}, | ||
{" | {"平滑MOS", "3L 4s"}, | ||
{" | {"2分割MOS", "12L 2s, 5L 9s"}, | ||
{" | {"平均律チューニング"}, | ||
{"Supersoft (L:s = 4:3)", "15\\26 (692.3¢)"}, | {"Supersoft (L:s = 4:3)", "15\\26 (692.3¢)"}, | ||
{"Soft (L:s = 3:2)", "11\\19 (694.7¢)"}, | {"Soft (L:s = 3:2)", "11\\19 (694.7¢)"}, | ||