scamp_extensions.rhythm package

Subpackage containing rhythm-related extensions. These include abstractions for representing metric structures and a more flexible implementation of Clarence Barlow’s concept of indispensability.

Modules:

scamp_extensions.rhythm.boolean_streamer(func)

Decorator that converts a boolean-yielding generator function into a BooleanStreamer object

scamp_extensions.rhythm.indispensability

Re-implementation and extension of Clarence Barlow's concept of rhythmic indispensability such that it works for additive meters (even nested additive meters).

scamp_extensions.rhythm.metric_structure

Contains the MetricStructure class, which provides a highly flexible representation of metric hierarchy.

Public-Facing API (result of import *):

FreqStreamer(freq_func)

A phase-accumulation based BooleanStreamer that yields True values with a frequency given by the frequency function.

RandStreamer(true_prob)

A BooleanStreamer that yields True values with the given probability.

SieveStreamer(modulo[, shift])

A Xenakis-sieve-style BooleanStreamer that yields patterns of True/False based on a modulo, which defines the cycle length; and a shift, which defines which remainder (or remainders) yielding True values.

boolean_streamer(func)

Decorator that converts a boolean-yielding generator function into a BooleanStreamer object

barlow_style_indispensability_array(...[, ...])

Alternate implementation of get_standard_indispensability_array(), leveraging the MetricStructure class to do the calculations.

indispensability_array_from_expression(...)

Generates an array of indispensability values for a meter and subdivision, as expressed by a meter arithmetic expression.

indispensability_array_from_strata(...[, ...])

Alternate implementation of get_indispensability_array(), leveraging the MetricStructure class to do the calculations.

MeterArithmeticGroup(elements, operation)

This class exists as an aid to parsing arithmetic expressions into MetricStructures.

MetricStructure(*groups[, ...])

A highly flexible representation of a metric hierarchy, capable of describing both additive, multiplicative, and hybrid additive/multiplicative meters.