music21.meter.tools

MeterTerminalTuple

class music21.meter.tools.MeterTerminalTuple(numerator, denominator, division)

Functions

music21.meter.tools.divisionOptionsAdditiveMultiples(n, d) → Tuple[Tuple[str, ], ]

Additive multiples with the same denominators.

>>> meter.tools.divisionOptionsAdditiveMultiples(4, 16)
(('2/16', '2/16'),)
>>> meter.tools.divisionOptionsAdditiveMultiples(6, 4)
(('3/4', '3/4'),)
music21.meter.tools.divisionOptionsAdditiveMultiplesDownward(n, d) → Tuple[Tuple[str, ], ]
>>> meter.tools.divisionOptionsAdditiveMultiplesDownward(1, 16)
(('1/32', '1/32'), ('1/64', '1/64', '1/64', '1/64'),
 ('1/128', '1/128', '1/128', '1/128', '1/128', '1/128', '1/128', '1/128'))
music21.meter.tools.divisionOptionsAdditiveMultiplesEvenDivision(n, d)
>>> meter.tools.divisionOptionsAdditiveMultiplesEvenDivision(4, 16)
(('1/8', '1/8'),)
>>> meter.tools.divisionOptionsAdditiveMultiplesEvenDivision(4, 4)
(('1/2', '1/2'),)
>>> meter.tools.divisionOptionsAdditiveMultiplesEvenDivision(3, 4)
()
music21.meter.tools.divisionOptionsAdditiveMultiplesUpward(n, d) → Tuple[Tuple[str, ], ]
>>> meter.tools.divisionOptionsAdditiveMultiplesUpward(4, 16)
(('1/16', '1/16', '1/16', '1/16'),
 ('1/32', '1/32', '1/32', '1/32', '1/32', '1/32', '1/32', '1/32'),
 ('1/64', '1/64', '1/64', '1/64', '1/64', '1/64', '1/64', '1/64',
  '1/64', '1/64', '1/64', '1/64', '1/64', '1/64', '1/64', '1/64'))
>>> meter.tools.divisionOptionsAdditiveMultiplesUpward(3, 4)
(('1/4', '1/4', '1/4'),
 ('1/8', '1/8', '1/8', '1/8', '1/8', '1/8'),
 ('1/16', '1/16', '1/16', '1/16', '1/16', '1/16',
  '1/16', '1/16', '1/16', '1/16', '1/16', '1/16'))
music21.meter.tools.divisionOptionsFractionsDownward(n, d) → Tuple[str, ]

Get restatements of the same fraction in larger units

>>> meter.tools.divisionOptionsFractionsDownward(2, 4)
('1/2',)
>>> meter.tools.divisionOptionsFractionsDownward(12, 16)
('6/8', '3/4')

Note that this returns a tuple of strings not MeterOptions

music21.meter.tools.divisionOptionsFractionsUpward(n, d) → Tuple[str, ]

This simply gets restatements of the same fraction in smaller units, up to the largest valid denominator.

>>> meter.tools.divisionOptionsFractionsUpward(2, 4)
('4/8', '8/16', '16/32', '32/64', '64/128')
>>> meter.tools.divisionOptionsFractionsUpward(3, 4)
('6/8', '12/16', '24/32', '48/64', '96/128')

Note that this returns a tuple of strings not MeterOptions