Module:MOS: Difference between revisions

Ganaram inukshuk (talk | contribs)
add is_octave_equivalent function
Ganaram inukshuk (talk | contribs)
added is_root_mos, under the reasoning that this came up enough times to justify adding it
Line 90: Line 90:
function p.is_octave_equivalent(mos)
function p.is_octave_equivalent(mos)
return rat.eq(mos.equave, rat.new(2))
return rat.eq(mos.equave, rat.new(2))
end
-- Is the mos nL ns? (Root mos, with root in the sense of being the root of
-- the scale tree.)
function p.is_root_mos(mos)
return mos.nL == mos.ns
end
end