Efficient rhythms settings

The many settings below control the behavior of this script. The recommended way of using the script is to store the desired settings as a Python dictionary in a file and then pass the file into the script with the --settings flag. For examples, see the files in the docs/examples/ directory. For a high-level overview of the script, see docs/general.html

Note on “per-voice sequences” and other “looping sequences”

Many arguments below can take “per-voice sequences” as arguments. These are sequences (e.g., tuples or lists) that assign a different setting to each voice. Importantly, however, it is possible to provide a sequence that is shorter than the number of voices. In this case, the sequence will be looped through as many times as is necessary. For example, if num_voices == 5, but len(pattern_len) == 2, voices 0, 2, and 4 will be assigned the first value in pattern_len, while voices 1 and 3 will be assigned the second value. (The voices are zero-indexed.)

There are also a number of arguments that take sequences that, if necessary, will be looped through in a similar manner, but where the items of the sequence are not applied to voices, but to something else. An example is harmony_len. I refer to these as “looping sequences”.

Note on specifying pitches and intervals

For most use cases, it will be most convenient to specify pitch materials using strings denoting constants which are provided in efficient_rhythms/er_constants.py and documented in docs/constants.md and [docs/constants.html](constants.html). A few examples: "PERFECT_4TH", "C# * OCTAVE4", "F * PHRYGIAN", etc.

Otherwise, pitch materials can be specified either as integers, or as other numeric types (e.g., floats). If you don’t care about tuning or temperament, you can just specify all intervals and pitches as integers (e.g., one semitone = 1, “middle C” = 60). If you do care about tuning and temperament, read on:

“Generic” and “specific” intervals

In the settings below, I sometimes use the terms “generic” or “specific” in reference to intervals. These terms come from academic music theory (e.g., Clough and Myerson 1985).

A “generic” interval defines an interval with respect to some reference scale, by counting the number of scale steps the interval contains. They might also be called “scalar” intervals (using “scalar” in a completely different sense from its linear algebra meaning). “Specific” intervals define intervals “absolutely”, by simply counting the number of semitones the interval comprises, irrespective of any reference scale.

In typical musical usage, “thirds”, “fifths”, and the like refer to generic intervals: a third is the distance between any pitch in a scale and the pitch two steps above or below it. (It would be more practical to call a “third” a “second” but, unfortunately, this usage has now been established for many centuries!) Depending on the structure of the scale, and the location of the interval within it, the exact pitch distance connoted by one and the same generic interval may vary. For instance, in the C major scale, the third from C to E is 4 semitones, but the third from D to F is 3 semitones. To distinguish these cases, music theory has developed an armory of interval “qualities” like “major”, “minor”, “diminished”, and so on. A generic interval together with a quality, like “minor third”, is somewhat like a specific interval, but it is not quite the same thing, because there can be more than one generic interval + quality that correspond to one specific interval. For example, both “minor thirds” and “augmented seconds” comprise 3 semitones. (Thus, the mapping from generic intervals with qualities to specific intervals is onto but not one-to-one.)

General settings

Less often used general settings are under “Miscellaneous settings” below.

Scale and chord settings

Midi settings

Tuning settings

Voice-leading settings

Chord-tone settings

Most chord tone settings only have an effect if chord_tone_selection is True. Only force_chord_tone applies irrespective of chord_tone_selection.

Melody settings

Consonance and dissonance settings

Rhythm settings

All rhythm settings use rhythm_len above.

Choir settings

Tempo settings

Transposition settings

Existing voices settings

Miscellaneous settings