Module:MOS: Difference between revisions
Bugfixes; added functions to produce step matrices (listings of every mode's listings of interval vectors) |
m mode_from_mos() goes by bright generators going up |
||
| Line 173: | Line 173: | ||
-- Given a mos, return a mode based on how it's ranked by modal brightness. | -- Given a mos, return a mode based on how it's ranked by modal brightness. | ||
-- | -- Brightness counts down from the maximum number of generators going up (one | ||
-- less from the period step count), so p-1 is the brightest mode, p-2 the | |||
-- the | -- second brightest, ... , and 0 the darkest mode. | ||
-- brightest mode | function p.mode_from_mos(mos, bright_gens_going_up) | ||
function p.mode_from_mos(mos, | return p.rotate_mode(p.brightest_mode(mos), -bright_gens_going_up * p.dark_gen_step_count(mos)) | ||
return p.rotate_mode(p.brightest_mode(mos), | |||
end | end | ||
| Line 693: | Line 692: | ||
--return p.mode_to_step_matrix(p.brightest_mode(p.new(5,4))) | --return p.mode_to_step_matrix(p.brightest_mode(p.new(5,4))) | ||
--return p.mode_rotations("LssLLssL") | --return p.mode_rotations("LssLLssL") | ||
return p.mode_rotations_to_step_matrices("LLsLsAs") | --return p.mode_rotations_to_step_matrices("LLsLsAs") | ||
--return p.mode_from_mos(p.new(5,2),1) | |||
local string_return = "" | |||
for i = 1, 7 do | |||
string_return = string_return .. p.mode_from_mos(p.new(5,2), i-1) .. "\n" | |||
end | |||
return string_return | |||
end | end | ||
return p | return p | ||