Module:MOS in EDO: Difference between revisions
Removing use of double-border, as it cluttered up the output |
Rearranged/added columns |
||
| Line 359: | Line 359: | ||
result = result .. string.format('|+ Generators %i\\%i and %i\\%i\n', gen_in_edosteps, edo, comp_in_edosteps, edo) | result = result .. string.format('|+ Generators %i\\%i and %i\\%i\n', gen_in_edosteps, edo, comp_in_edosteps, edo) | ||
result = result .. string.format('|-\n') | result = result .. string.format('|-\n') | ||
result = result .. string.format('! | result = result .. string.format('!MOS (name)\n') -- Scale sig (and name) | ||
result = result .. string.format('! | result = result .. string.format('!Step sizes\n') -- Step sizes | ||
result = result .. string.format('!Step ratio\n') | result = result .. string.format('!Step ratio\n') -- Step ratio | ||
if show_temperament then | if show_temperament then | ||
result = result .. string.format('!Temperament\n') | result = result .. string.format('!Temperament\n') -- Temperament, if given | ||
end | end | ||
result = result .. string.format('! Step visualization\n') | |||
-- Add the step pattern for successive mosses until the pattern becomes that for an edo | -- Add the step pattern for successive mosses until the pattern becomes that for an edo | ||
| Line 374: | Line 375: | ||
local large_step_size = current_step_sizes["L"] | local large_step_size = current_step_sizes["L"] | ||
local small_step_size = current_step_sizes["s"] | local small_step_size = current_step_sizes["s"] | ||
-- Add the scale sig | -- Add the scale sig | ||
-- Also add tamnams name if there is one | |||
local scale_sig = p.mos_step_pattern_to_scale_sig(current_scale) | local scale_sig = p.mos_step_pattern_to_scale_sig(current_scale) | ||
local tamnams_name = mos.tamnams_name[scale_sig] | local tamnams_name = mos.tamnams_name[scale_sig] | ||
local current_step_count = #current_scale | local current_step_count = #current_scale | ||
if large_step_size == small_step_size then | |||
if | |||
result = result .. string.format("| [[%iedo]]\n", edo / step_ratio_gcd) | result = result .. string.format("| [[%iedo]]\n", edo / step_ratio_gcd) | ||
elseif tamnams_name ~= nil and current_step_count > 5 then | elseif tamnams_name ~= nil and current_step_count > 5 then | ||
| Line 403: | Line 389: | ||
end | end | ||
-- Add the step | -- Add the step sizes | ||
result = result .. string.format("| % | result = result .. string.format("| %i\\%i and %i\\%i\n", current_step_sizes["L"], edo, current_step_sizes["s"], edo) | ||
-- Add step ratio | |||
local reduced_large_step_size = large_step_size / step_ratio_gcd | |||
local reduced_small_step_size = small_step_size / step_ratio_gcd | |||
result = result .. string.format("| %s:%s\n", reduced_large_step_size, reduced_small_step_size) | |||
-- Add the temperament name, if there is one | -- Add the temperament name, if there is one | ||
| Line 411: | Line 402: | ||
result = result .. string.format("| %s[%i]\n", temperament, current_step_count) | result = result .. string.format("| %s[%i]\n", temperament, current_step_count) | ||
end | end | ||
-- Add the step visualization | |||
local step_vis = p.step_pattern_to_simple_visualization(current_scale, period_in_edosteps) | |||
result = result .. string.format('|-\n') | |||
result = result .. string.format('| %s\n', step_vis) | |||
-- Produce the next scale in the sequence | -- Produce the next scale in the sequence | ||