Module:MOS in EDO allperiods: Difference between revisions

Ganaram inukshuk (talk | contribs)
m Corrected period counts
Ganaram inukshuk (talk | contribs)
Sections now organized under L2 headers (single-period and multi-period), with multiperiod mosses under their own L3 headers
Line 99: Line 99:
-- Temperament names will be entered as a set of key-value pairs instead of an array
-- Temperament names will be entered as a set of key-value pairs instead of an array
show_temperament = false
show_temperament = false
-- Keep track of how many section headers have been written thus far
-- If there are multiperiod mosses, then create an L2 header for multi-
-- period mosses, then for each successive period count, create an L3
-- header.
local multi_period_header_written = false
-- Call a for loop that produces a set of tables for each period count
-- Call a for loop that produces a set of tables for each period count
Line 119: Line 125:
result = result .. string.format("== Single-period MOS scales ==\n")
result = result .. string.format("== Single-period MOS scales ==\n")
else
else
result = result .. string.format("== %i-period MOS scales ==\n", number_of_periods)
-- If the L2 header wasn't written yet, write that, followed by
-- the corresponding L3 header. Otherwise, write only the L3
-- header.
if not multi_period_header_written then
result = result .. string.format("== Multi-period MOS scales ==\n")
result = result .. string.format("=== %i-periods ===\n", number_of_periods)
multi_period_header_written = true
else
result = result .. string.format("=== %i-periods ===\n", number_of_periods)
end
end
end