scamp_extensions.composers.barlicity.get_indispensability_array

scamp_extensions.composers.barlicity.get_indispensability_array(rhythmic_strata: Sequence[Union[Tuple, int]], normalize: bool = False) Sequence[IntOrFloat][source]

A slightly more general approach to indispensability than the one proposed by Barlow. In this version, each rhythmic layer can be a tuple representing an additive grouping. Thus a 3+2+3 layer would be represented by (3, 2, 3). Rhythmic layers can also simply be numbers, in which case their indispensabilities are treated as increasing monotonically towards the downbeat.

Parameters:
  • rhythmic_strata – List of tuples representing rhythmic strata, or simple numbers

  • normalize – if True, scale indispensabilities to go from 0 to 1

Returns:

a list of ints or floats representing the indispensabilities or normalized indispensabilities, respectively