core

The core subpackage contains the core classes of the auxjad package. The include random selectors, loopers, phasers, and other classes for algorithmic manipulation of material.

Note

These classes are imported directly into the auxjad namespace. Therefore, to use a class such as auxjad.CartographySelector you only need to import auxjad and instantiate the class from its namespace:

>>> import auxjad
>>> selector = auxjad.CartographySelector(pitch_list)

Below is the full list of classes included in core. Click on their names for their individual documentation.

CartographySelector(contents, *, decay_rate)

A selector used to store, manipulate, and select objects using a weighted function constructed with a fixed decay rate.

CrossFader(fade_out_contents, …)

Takes two abjad.Container’s’ (or child class) and gradually crossfades from one into the other, by fading out the first while fading in the second.

Echoer(contents, *, min_dynamic, str] =, …)

Takes an abjad.Container (or child class) as input and, using it as reference, gradually lowers all dynamics, removing notes that are below a given threshold, returning the output as an abjad.Selection.

Fader(contents, *, mode, max_steps, …)

Takes an abjad.Container (or child class) as input and, using it as reference, gradually removes or adds notes one by one to an output abjad.Selection.

GeneticAlgorithm(*, target, genes, …)

An implementation of a genetic algorithm.

Hocketer(contents, *, n_voices, …)

A hocket generator that takes an abjad.Container (or child class) as input and randomly distributes its logical ties among different staves.

LeafLooper(contents, *, window_size, …)

Outputs slices of an abjad.Container (or child class) using the metaphor of a looping window of a constant number of elements.

ListLooper(contents, *, window_size, …)

Outputs slices of a list using the metaphor of a looping window of a constant number of elements.

Phaser(contents, *, step_size, float, str, …)

Takes an abjad.Container (or child class) as input and outputs an abjad.Selection with leaves shifted by a fixed amount.

PitchRandomiser(contents, pitches, tuple, …)

Takes an input abjad.Container (or child class) together with a list of pitches and randomises the container’s pitch content using the list of pitches.

Repeater(contents, *, omit_time_signatures, …)

Takes an abjad.Container (or child class) as input and outputs an abjad.Selection with n repetitions.

Shuffler(contents, *, pitch_only, …)

Takes an abjad.Container (or child class) and shuffles or rotates its logical ties or pitches.

TenneySelector(contents, *, weights, curvature)

An implementation of the Dissonant Counterpoint Algorithm by James Tenney.

WindowLooper(contents, *, window_size, …)

Outputs slices of an abjad.Container (or child class) using the metaphor of a looping window of a constant size (given by an abjad.Duration).