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

編集の要約なし
Furcht968 (トーク | 投稿記録)
編集の要約なし
タグ: 手動差し戻し モバイル編集 モバイルウェブ編集
 
(3人の利用者による、間の14版が非表示)
1行目: 1行目:
local p = {}
local p = {}
local utils = require('モジュール:Utils')
local utils = require('Module:Utils')
local rat = require('モジュール:Rational')
local rat = require('Module:Rational')
local mos = require('モジュール:MOS')
local mos = require('Module:MOS')
local et = require('モジュール:ET')
local et = require('Module:ET')
local infobox = require('モジュール:Infobox')
local infobox = require('Module:Infobox')
local kbvis = require('モジュール:Keyboard vis')
local kbvis = require('Module:Keyboard vis')
local tip = require('モジュール:Template input parse')
local tip = require('Module:Template input parse')
local tamnams = require('モジュール:TAMNAMS')
local tamnams = require('Module:TAMNAMS')


-- TODO:
-- TODO:
45行目: 45行目:
-- Add to category of abstact mosses
-- Add to category of abstact mosses
local categories = "[[Category:Abstract MOS patterns]]"
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:%d-tone scales]]', notecount)
categories = categories .. string.format('[[Category:%d音音階]]', notecount)
end
end
68行目: 68行目:
end
end
else
else
categories = categories .. '[[Category:Nonoctave]]'
categories = categories .. '[[Category:非オクターブ]]'
end
end
139行目: 139行目:
end
end
local section_header = "Scale structure"
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]]", step_pattern},
{"[[音程パターン]]", step_pattern},
{"[[Equave]]", string.format("%s (%.1f¢)", equave_as_string, equave_in_cents)},
{"[[オクターブ]]", string.format("%s (%.1f¢)", equave_as_string, equave_in_cents)},
{"[[Period]]", string.format("%s (%.1f¢)", period_as_string, period_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 = "Generator size"
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)},
{"[[Bright]]", string.format("%s to %s (%.1f¢ to %.1f¢)", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)},
{"[[上方]]", string.format("%s - %s (%.1f¢ - %.1f¢)", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)},
{"[[Dark]]", string.format("%s to %s (%.1f¢ to %.1f¢)", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_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 = "Step size"
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 | Large]]", 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 | 最大]]", 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 | Small]]", 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)}
{"[[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 information"
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 | Name]]", tamnams_name},
{"[[TAMNAMS#Mos_pattern_names | 名称]]", tamnams_name},
{"[[TAMNAMS#Mos_pattern_names | Prefix]]", tamnams_prefix .. "-"},
{"[[TAMNAMS#Mos_pattern_names | 接頭辞]]", tamnams_prefix .. "-"},
{"[[TAMNAMS#Mos_pattern_names | Abbrev.]]", tamnams_abbrev}
{"[[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)},
{"Descends from", ancestor_entry};
{"起源", ancestor_entry};
{"Required step ratio range", string.format("%s", named_range)}
{"必須な全音半音比の範囲", 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 = "Other names"
local section_header = "別名"
if #other_names == 0 then
if #other_names == 0 then
464行目: 464行目:
end
end
local section_header = "Related MOS scales"
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 | Parent]]", parent_scalesig},
{"[[Operations_on_MOSes#Parent_MOS | ]]", parent_scalesig},
{"[[Operations_on_MOSes#Sister_MOS | Sister]]", sister_scalesig},
{"[[Operations_on_MOSes#Sister_MOS | 姉妹]]", sister_scalesig},
{"[[Operations_on_MOSes#Daughter_MOS | Daughters]]", soft_scalesig .. ", " .. hard_scalesig},
{"[[Operations_on_MOSes#Daughter_MOS | ]]", soft_scalesig .. ", " .. hard_scalesig},
{"[[Operations_on_MOSes#Neutralization | Neutralized]]", neutral_scalesig},
{"[[Operations_on_MOSes#Neutralization | 平坦化]]", neutral_scalesig},
{"[[Flought_scale | 2-Flought]]", soft_floght_scalesig .. ", " .. hard_floght_scalesig}
{"[[Flought_scale | 分割]]", soft_floght_scalesig .. ", " .. hard_floght_scalesig}
}
}
513行目: 513行目:
}
}
local section_header = "Equal tunings"
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 = {
{"Scale structure"},
{"構造"},
{"Brightest mode", "LLLsLLs"},
{"最も明るいモード", "LLLsLLs"},
{"Period (cents)", "2\1 (1200¢)"},
{"周期", "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 information"},
{"TAMNAMS"},
{"Name", "diatonic"},
{"音階名", "diatonic"},
{"Prefix", "dia-"},
{"プレフィックス", "dia-"},
{"Abbrev.", "dia."},
{"略称", "dia."},


{"Related scales"},
{"関連する音律"},
{"Parent MOS", "2L 3s"},
{"親MOS", "2L 3s"},
{"Sister MOS", "2L 5s"},
{"姉妹MOS", "2L 5s"},
{"Daughter MOSes", "7L 5s, 5L 7s"},
{"子MOSes", "7L 5s, 5L 7s"},
{"Neutralized MOS", "3L 4s"},
{"平滑MOS", "3L 4s"},
{"2-Flought MOS", "12L 2s, 5L 9s"},
{"2分割MOS", "12L 2s, 5L 9s"},


{"Equal tunings"},
{"平均律チューニング"},
{"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¢)"},