Module:MOS modes: Difference between revisions
Capitalized 5L 2s mode names |
Renamed params per guidance of fredg999 |
||
Line 34: | Line 34: | ||
for i = 1, period_size - 1 do | for i = 1, period_size - 1 do | ||
-- Move the first g | -- Move the first g characters from the beginning to the end | ||
local first_substr = string.sub(current_mode, 1, gen_in_mossteps) | local first_substr = string.sub(current_mode, 1, gen_in_mossteps) | ||
local second_substr = string.sub(current_mode, gen_in_mossteps + 1, period_size) | local second_substr = string.sub(current_mode, gen_in_mossteps + 1, period_size) | ||
Line 61: | Line 61: | ||
-- - Expand this (possibly as a separate template) for mos intervals | -- - Expand this (possibly as a separate template) for mos intervals | ||
function p.modes_table(frame) | function p.modes_table(frame) | ||
-- Mos is entered as "xL ys" or "xL ys<p/q>" since the mos module can parse that format | -- Mos is entered as a scale signature "xL ys" or "xL ys<p/q>" since the mos module can parse that format | ||
local mosstring = frame.args[' | local mosstring = frame.args['Scale Signature'] or "5L 2s" | ||
local input_mos = mos.parse(mosstring) | local input_mos = mos.parse(mosstring) | ||
Line 72: | Line 72: | ||
mode_names = p.parse_mode_names(mode_names_unparsed) | mode_names = p.parse_mode_names(mode_names_unparsed) | ||
else | else | ||
mode_names_unparsed = frame.args[' | mode_names_unparsed = frame.args['Mode Names'] | ||
mode_names = p.parse_mode_names(mode_names_unparsed) | mode_names = p.parse_mode_names(mode_names_unparsed) | ||
end | end |