Class: ChordPatterns

ChordPatterns()

Creates a class to hold state, and defines Patterns for creating and using that state to work with CsoundAC Chords. An instance of this class must be created at module scope and passed to the relevant Patterns.

Some hacks are used to co-ordinate state with triggers:

  • Assume that chord changes happen only once at any given time.
  • In the trigger, apply the input to the Pattern if and only if the input is different from the old input.

Constructor

new ChordPatterns()

Source:

Classes

ChordPatterns

Methods

acC(is_onset, chord_id, hap) → {Hap}

Applies a Chord or chord name to this.

Parameters:
Name Type Description
is_onset boolean

Whether this Hap is the onset of its cycle.

chord_id string

Identifies the chord.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCI(is_onset, center, hap) → {Hap}

Applies an inversion to the Chord of this. The transformation can be patternified with a Pattern of flips (changes in the value of the flip input).

Parameters:
Name Type Description
is_onset boolean

Indicates whether or not this is Hap onset of its cycle.

center number

The center of reflection.

hap Hap

The current Hap.

Source:
Returns:

The new Hap.

Type
Hap

acCK(is_onset, flip, hap) → {Hap}

Applies the interchange by inversion operation of the Generalized Contextual Group of Fiore and Satyendra to the Chord of this. The transformation can be patternified with a Pattern of flips (changes in the value of the flip input).

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

flip number

If this value changes, the transformation is applied.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCO(is_onset, revoicings, hap) → {Hap}

acCO: Transforms the Chord of this by the indicated number of octavewise revoicings: negative means subtract an octave from the highest voice, positive means add an octave to the lowest voice. This corresponds to the musician's notion of "inversion."

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

revoicings number

The number of octavewise revoicings to apply.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCOP(is_onset, hap) → {Hap}

Transforms the Chord of this to its 'OP' form; 'chord' is an extremely flexible and therefore ambiguous term, but the 'OP' form is what most musicians usually mean by 'chord': A chord where the octaves of the pitches do not matter and the order of the voices does not matter. This transformation can be useful for returning chords that have been transformed such that their voices are out of range back to a more normal form.

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCQ(is_onset, semitones, hap) → {Hap}

Applies the contexual transposition operation of the Generalized Contextual Group of Fiore and Satyendra to the Chord of this. The modality is set in the constructor of this class.

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

semitones number

The number of semitones by which this Chord is to be tranposed; may be negative.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCRP(is_onset, range, hap) → {Hap}

Transforms the Chord of this to its 'RP' form; 'chord' is an extremely flexible and therefore ambiguous term, but the 'RP' form is a chord where the octaves are folded within the indicated range, and like 'OP' the order of the voices does not matter. This transformation can be useful for returning chords that have been transformed such that their voices are out of range back to a user- defined range.

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

range number

The range of this chord space.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCT(is_onset, semitones, hap) → {Hap}

Applies a transposition to the Chord of this.

Parameters:
Name Type Description
is_onset boolean

Indicates whether or not this is Hap onset of its cycle.

semitones number

Number of semitones to transpose; may be negative.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCV(is_onset, hap) → {Hap}

Applies the Chord of this to the pitch-class of the Hap, i.e., moves the pitch-class of the Hap to the nearest pitch-class of the Chord.

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCVV(is_onset, bass, voice, hap) → {Hap}

acCVV: Generate a note that represents a particular voice of the Chord.

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

bass number

The MIDI key number of the lowest pitch.

voice number

The number of the voice of the Chord to use.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap

acCVVL(is_onset, bass, range, voice, hap) → {Hap}

acCVVL: Generate a note that represents a particular voice of the Chord, as the closest voice-leading from the prior Chord.

Parameters:
Name Type Description
is_onset boolean

Indicates whether this Hap is the onset of its cycle.

bass number

The MIDI key of the lowest pitch to use.

range number

The range in MIDI keys. Pitches are wrapped back up or down if the revoicing takes them out of this range.

voice number

The number of the voice in the Chord to use.

hap Hap

The current Hap.

Source:
Returns:

A new Hap.

Type
Hap