Module:TAMNAMS: Difference between revisions

Ganaram inukshuk (talk | contribs)
m Bugfix to ancestor lookup
Ganaram inukshuk (talk | contribs)
m Fixed dark gen small size being major when it should be perfect
Line 457: Line 457:
-- Is perfectable? This is for intervals for which maj/min does not apply.
-- Is perfectable? This is for intervals for which maj/min does not apply.
local is_perfectable = is_period or (is_bright_gen and not is_root_mos) or (is_bright_gen and not is_root_mos)
local is_perfectable = is_period or (is_bright_gen and not is_root_mos) or (is_dark_gen and not is_root_mos)
-- Get chroma count and adjust as needed
-- Get chroma count and adjust as needed
Line 582: Line 582:


function p.tester()
function p.tester()
local input_mos = mos.new(4,4)
local input_mos = mos.new(4,3)
local brightest_mode = mos.brightest_mode(input_mos)
local brightest_mode = mos.brightest_mode(input_mos)
local interval_qualities = {}
local interval_qualities = {}
 
for i = 1, #brightest_mode + 1 do
local step_matrices = mos.modes_to_step_matrices(input_mos)
local substring = string.sub(brightest_mode, 0, i - 1)
for i = 1, mos.equave_step_count(input_mos) do
local interval_vector = mos.interval_from_step_sequence(substring)
local qualities = ""
local interval_quality = p.interval_quality(interval_vector, input_mos, "abbrev")
for j = 1, #step_matrices[i] do
table.insert(interval_qualities, interval_quality)
qualities = qualities .. p.decode_quality(step_matrices[i][j], input_mos, "shortened") .. " "
--qualities = qualities .. (step_matrices[i][j] ~= nil and "Y" or "N") .. " "
end
table.insert(interval_qualities, qualities)
end
end
return interval_qualities
return interval_qualities