Module:Infobox MOS: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 129: | Line 129: | ||
local section_header = "Scale structure" | local section_header = "Scale structure" | ||
local section_entries = { | local section_entries = { | ||
{string.format("< | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b></div>", section_header)}, | ||
{"[[Step pattern]]", step_pattern}, | {"[[Step pattern]]", step_pattern}, | ||
{"[[Equave]]", string.format("%s (%.1f{{c}})", equave_as_string, equave_in_cents)}, | {"[[Equave]]", string.format("%s (%.1f{{c}})", equave_as_string, equave_in_cents)}, | ||
| Line 175: | Line 175: | ||
local section_entries = { | local section_entries = { | ||
{string.format("< | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b>%s</div>", section_header, equave_annotation)}, | ||
{"[[Bright]]", string.format("%s to %s (%.1f{{c}} to %.1f{{c}})", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)}, | {"[[Bright]]", string.format("%s to %s (%.1f{{c}} to %.1f{{c}})", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)}, | ||
{"[[Dark]]", string.format("%s to %s (%.1f{{c}} to %.1f{{c}})", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)}, | {"[[Dark]]", string.format("%s to %s (%.1f{{c}} to %.1f{{c}})", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)}, | ||
| Line 216: | Line 216: | ||
-- Mos has a tamnams name | -- Mos has a tamnams name | ||
section_entries = { | section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b></div>", section_header)}, | ||
{"[[TAMNAMS#Mos_pattern_names | Name]]", tamnams_name}, | {"[[TAMNAMS#Mos_pattern_names | Name]]", tamnams_name}, | ||
{"[[TAMNAMS#Mos_pattern_names | Prefix]]", tamnams_prefix .. "-"}, | {"[[TAMNAMS#Mos_pattern_names | Prefix]]", tamnams_prefix .. "-"}, | ||
| Line 240: | Line 240: | ||
section_entries = { | section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b></div>", section_header)}, | ||
{"Descends from", ancestor_entry}; | {"Descends from", ancestor_entry}; | ||
{"Ancestor's step ratio range", string.format("%s", step_ratio_range_entry)} | {"Ancestor's step ratio range", string.format("%s", step_ratio_range_entry)} | ||
| Line 269: | Line 269: | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b></div>", section_header)}, | ||
{"Name(s)", scale_names} | {"Name(s)", scale_names} | ||
} | } | ||
| Line 291: | Line 291: | ||
local hard_floght_mos = mos.new(input_mos.nL, input_mos.ns*2+input_mos.nL, input_mos.equave) | local hard_floght_mos = mos.new(input_mos.nL, input_mos.ns*2+input_mos.nL, input_mos.equave) | ||
local parent_scalesig = string.format("[[%s | %s]]", mos.as_long_string(parent_mos), mos.as_string(parent_mos)) | local parent_scalesig = string.format("[[%s|%s]]", mos.as_long_string(parent_mos), mos.as_string(parent_mos)) | ||
local sister_scalesig = string.format("[[%s | %s]]", mos.as_long_string(sister_mos), mos.as_string(sister_mos)) | local sister_scalesig = string.format("[[%s|%s]]", mos.as_long_string(sister_mos), mos.as_string(sister_mos)) | ||
local soft_scalesig = string.format("[[%s | %s]]", mos.as_long_string(soft_child_mos), mos.as_string(soft_child_mos)) | local soft_scalesig = string.format("[[%s|%s]]", mos.as_long_string(soft_child_mos), mos.as_string(soft_child_mos)) | ||
local hard_scalesig = string.format("[[%s | %s]]", mos.as_long_string(hard_child_mos), mos.as_string(hard_child_mos)) | local hard_scalesig = string.format("[[%s|%s]]", mos.as_long_string(hard_child_mos), mos.as_string(hard_child_mos)) | ||
local neutral_scalesig = string.format("[[%s | %s]]", mos.as_long_string(neutral_mos), mos.as_string(neutral_mos)) | local neutral_scalesig = string.format("[[%s|%s]]", mos.as_long_string(neutral_mos), mos.as_string(neutral_mos)) | ||
local soft_floght_scalesig = string.format("[[%s | %s]]", mos.as_long_string(soft_floght_mos), mos.as_string(soft_floght_mos)) | local soft_floght_scalesig = string.format("[[%s|%s]]", mos.as_long_string(soft_floght_mos), mos.as_string(soft_floght_mos)) | ||
local hard_floght_scalesig = string.format("[[%s | %s]]", mos.as_long_string(hard_floght_mos), mos.as_string(hard_floght_mos)) | local hard_floght_scalesig = string.format("[[%s|%s]]", mos.as_long_string(hard_floght_mos), mos.as_string(hard_floght_mos)) | ||
local number_of_periods = mos.period_step_count(input_mos) | local number_of_periods = mos.period_step_count(input_mos) | ||
| Line 323: | Line 323: | ||
local section_header = "Related MOS scales" | local section_header = "Related MOS scales" | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>", section_header)}, | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b></div>", section_header)}, | ||
{"[[Operations_on_MOSes#Parent_MOS | Parent]]", parent_scalesig}, | {"[[Operations_on_MOSes#Parent_MOS | Parent]]", parent_scalesig}, | ||
{"[[Operations_on_MOSes#Sister_MOS | Sister]]", sister_scalesig}, | {"[[Operations_on_MOSes#Sister_MOS | Sister]]", sister_scalesig}, | ||
| Line 366: | Line 366: | ||
local section_entries = { | local section_entries = { | ||
{string.format("<b>%s</b>%s", section_header, equave_annotation)}, | {string.format("<div style=\"margin-top: calc(1em / 3);\"><b>%s</b>%s</div>", section_header, equave_annotation)}, | ||
} | } | ||
for i = 1, #step_ratios do | for i = 1, #step_ratios do | ||
| Line 381: | Line 381: | ||
local xenpaper_link = xp.mosstep_pattern_to_xenpaper_link(mos.brightest_mode(input_mos), step_ratios[i], input_mos.equave) | local xenpaper_link = xp.mosstep_pattern_to_xenpaper_link(mos.brightest_mode(input_mos), step_ratios[i], input_mos.equave) | ||
local caption = string.format("[[%s]] [%s (L:s = %d:%d)]", step_ratio_name, xenpaper_link, step_ratio[1], step_ratio[2]) | local caption = string.format("[[%s]] [%s (<span style=\"white-space: nowrap;\">L:s = %d:%d</span>)]", step_ratio_name, xenpaper_link, step_ratio[1], step_ratio[2]) | ||
local text = string.format("[[%s | %s]] (%.1f{{c}})", ed_as_string, gen_in_steps, gen_in_cents) | local text = string.format("[[%s|%s]] (%.1f{{c}})", ed_as_string, gen_in_steps, gen_in_cents) | ||
table.insert(section_entries, { caption, text }) | table.insert(section_entries, { caption, text }) | ||