scamp_extensions.composers.barlicity.calculate_metric_coherence
- scamp_extensions.composers.barlicity.calculate_metric_coherence(rhythmic_strata_1: Sequence[Union[Tuple, int]], bar_tempo_1: float, rhythmic_strata_2: Sequence[Union[Tuple, int]], bar_tempo_2: float, standard_barlow: bool = True) float [source]
Calculates the “metric coherence” of two meters, as described on pages 46-47 of Barlow’s “On Musiquantics”. Essentially this is a (square) correlation between the indispensabilities of the two meters when they are placed side-by-side. Often this will require first subdiving one or both of the meters further so that they share a common basic pulse.
- Parameters:
rhythmic_strata_1 – Metric strata defining the first meter, of the exact same type that would be passed to
get_indispensability_array()
or toget_standard_indispensability_array()
. (Which of these functions it gets passed to depends on the standard_barlow argument.bar_tempo_1 – Number of complete cycles of the first meter per minute.
rhythmic_strata_2 – Metric strata defining the second meter.
bar_tempo_2 – Number of complete cycles of the second meter per minute.
standard_barlow – Whether or not to interpret the rhythmic strata using the standard Barlow version of indispensability, or my slightly broader version that allows additive layers.
- Returns:
the coherence of the two meters as a float between 0 and 1