mutwo.converters.symmetrical.metricities module

Calculate metricity of a bar

Classes:

RhythmicalStrataToIndispensabilityConverter()

Builds metrical indispensability for a rhythmical strata.

class RhythmicalStrataToIndispensabilityConverter[source]

Bases: mutwo.converters.abc.Converter

Builds metrical indispensability for a rhythmical strata.

This technique has been described by Clarence Barlow in On the Quantification of Harmony and Metre (1992). The technique aims to model the weight of single beats in a particular metre. It allocates each beat of a metre to a specific value that describes the indispensability of a beat: the higher the assigned value, the more accented the beat.

Methods:

convert(rhythmical_strata_to_convert)

Convert indispensability for each beat of a particular metre.

convert(rhythmical_strata_to_convert)[source]

Convert indispensability for each beat of a particular metre.

Parameters

rhythmical_strata_to_convert (Sequence[int]) – The rhythmical strata defines the metre for which the indispensability shall be calculated. The rhythmical strata is a list of prime numbers which product is the amount of available beats within the particular metre. Earlier prime numbers in the rhythmical strata are considered to be more important than later prime numbers.

Returns

A tuple of a integer for each beat of the respective metre where each integer describes how accented the particular beat is (the higher the number, the more important the beat).

Return type

Tuple[int, …]

Example:

>>> from mutwo.converters import symmetrical
>>> metricity_converter = symmetrical.metricities.RhythmicalStrataToIndispensabilityConverter()
>>> metricity_converter.convert((2, 3))  # time signature 3/4
(5, 0, 3, 1, 4, 2)
>>> metricity_converter.convert((3, 2))  # time signature 6/8
(5, 0, 2, 4, 1, 3)