scamp_extensions.rhythm.indispensability.indispensability_array_from_strata
- scamp_extensions.rhythm.indispensability.indispensability_array_from_strata(*rhythmic_strata: Union[int, Sequence[int]], normalize: bool = False, break_up_large_numbers: bool = False, upbeats_before_group_length: bool = True) List[INT_OR_FLOAT] [source]
Alternate implementation of
get_indispensability_array()
, leveraging theMetricStructure
class to do the calculations.- Parameters:
rhythmic_strata – can be either tuples, representing additive metric layers, or integers, representing simple metric layers.
normalize – if True, indispensabilities range from 0 to 1. If false, they count up from 0.
break_up_large_numbers – if True, numbers greater than 3 are broken up into a sum of 2’s followed by one 3 if odd. This is the Barlow approach.
upbeats_before_group_length – see description in
metric_structure.flatten_beat_groups()
. Affects the result when there are groups of uneven length at some level of metric structure. To achieve the standard Barlowian result, set this to False. I think it works better as True, though.
- Returns:
a list of indispensabilities for the pulses of the given meter.