Module:MOS mode degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
mNo edit summary
Ganaram inukshuk (talk | contribs)
m Moved default name assignment to _frame function
Line 514: Line 514:
local input_mode = mos.brightest_mode(input_mos)
local input_mode = mos.brightest_mode(input_mos)
local modes = p.calculate_step_pattern_rotations(input_mos, input_mode, true)
local modes = p.calculate_step_pattern_rotations(input_mos, input_mode, true)
-- Default names for 5L 2s is the seven names of Lydian ... Locrian
if input_mos.nL == 5 and input_mos.ns == 2 and input_mos.equave == 2 then
mode_names = { "Lydian", "Ionian (major)", "Mixolydian", "Dorian", "Aeolian (minor)", "Phrygian", "Locrian" }
end
-- Get the number of mossteps per period and equave, and periods per equave
-- Get the number of mossteps per period and equave, and periods per equave
Line 592: Line 587:
-- Get the modes
-- Get the modes
local modes = p.calculate_step_pattern_rotations(input_mos, step_pattern, false)
local modes = p.calculate_step_pattern_rotations(input_mos, step_pattern, false)
-- Default names for 5L 2s modmosses is the seven names of Lydian ... Locrian, modified accordingly
if input_mos.nL == 5 and input_mos.ns == 2 and input_mos.equave == 2 and step_pattern == "LsLLsAs" then
mode_names = { "Harmonic minor", "Locrian #6", "Ionian augmented", "Dorian #4", "Phrygian dominant", "Lydian #2", "Locrian b4 bb7" }
end
-- Get the number of mossteps per period and equave, and periods per equave
-- Get the number of mossteps per period and equave, and periods per equave
Line 687: Line 677:
mos_prefix = frame.args['MOS Prefix']
mos_prefix = frame.args['MOS Prefix']
end
end
-- Get the step pattern
local step_pattern = frame.args['MODMOS Step Pattern']
-- Get the mode names
-- Get the mode names
local mode_names = nil
local mode_names = nil
-- Default names for 5L 2s modes
if scale_sig == "5L 2s" and step_pattern == "LsLLsAs" then
mode_names = { "Harmonic minor", "Locrian #6", "Ionian augmented", "Dorian #4", "Phrygian dominant", "Lydian #2", "Locrian b4 bb7" }
elseif scale_sign == "5L 2s" and #step_pattern == 0 then
mode_names { "Lydian", "Ionian (major)", "Mixolydian", "Dorian", "Aeolian (minor)", "Phrygian", "Locrian" }
end
-- If mode names are given, use those instead
if #frame.args['Mode Names'] ~= 0 then
if #frame.args['Mode Names'] ~= 0 then
mode_names = p.parse_entries(frame.args['Mode Names'])
mode_names = p.parse_entries(frame.args['Mode Names'])
end
end
-- Get the step pattern
local step_pattern = frame.args['MODMOS Step Pattern']
-- If a modmos step pattern was never provided, call the function mos_mode_degrees
-- If a modmos step pattern was never provided, call the function mos_mode_degrees