← cloud-5 JSDoc

CsoundAC API Reference

Algorithmic composition library for JavaScript (WebAssembly Embind build of csound-ac). This page lists only symbols exported to JavaScript and documents them with the C++ Doxygen comments from the source headers.

const CsoundAC = await createCsoundAC();
globalThis.CsoundAC = CsoundAC;

Chord-space theory: CHORDSPACE.md

createCsoundAC()

Emscripten factory defined in CsoundAC.js. Returns a Promise that resolves to the CsoundAC module namespace described below.

Module functions

Free functions on the object returned by createCsoundAC().

create

identity

add

subtract

scalar_multiply

scalar_divide

matrix_multiply

norm

create_rotation

allOfEquivalenceClass (csound::allOfEquivalenceClass)

ParameterDescription
voice_count
equivalence_class
range
g
sector
printme

Returns: SILENCE_PUBLIC const std::vector< Chord > &

chord_space_version (csound::chord_space_version)

Returns: std::string

euclidean (csound::euclidean)

Returns the Euclidean distance between the two chords.
ParameterDescription
a
b

Returns: SILENCE_PUBLIC double

factorial (csound::factorial)

ParameterDescription
n

Returns: SILENCE_PUBLIC double

midpoint (csound::midpoint)

Returns the chord that is the midpoint between two chords, which must have the same number of voices.
ParameterDescription
a
b

Returns: SILENCE_PUBLIC Chord

eq_tolerance (csound::eq_tolerance)

This is the basis of all other numeric comparisons that take floating-point limits into account.

It is a "close enough" comparison. If a or b equals 0, the indicated number of machine epsilons is used as the tolerance; if neither a nor b equals 0, the indicated number of units in the last place (ULPs) is used as the tolerance. These tolerances should be set to appropriate values based on the use case.

ParameterDescription
a
b
epsilons
ulps

Returns: SILENCE_PUBLIC bool

gt_tolerance (csound::gt_tolerance)

ParameterDescription
a
b
epsilons
ulps

Returns: SILENCE_PUBLIC bool

lt_tolerance (csound::lt_tolerance)

ParameterDescription
a
b
epsilons
ulps

Returns: SILENCE_PUBLIC bool

ge_tolerance (csound::ge_tolerance)

ParameterDescription
a
b
epsilons
ulps

Returns: SILENCE_PUBLIC bool

le_tolerance (csound::le_tolerance)

ParameterDescription
a
b
epsilons
ulps

Returns: SILENCE_PUBLIC bool

OCTAVE (csound::OCTAVE)

The size of the octave, defined to be consistent with 12 tone equal temperament and MIDI.

Returns: SILENCE_PUBLIC double

MIDDLE_C (csound::MIDDLE_C)

Returns: SILENCE_PUBLIC double

C4 (csound::C4)

Returns: SILENCE_PUBLIC double

T (csound::T)

Returns the pitch transposed by semitones, which may be any scalar.

NOTE: Does NOT return an equivalent under any requivalence relation.

ParameterDescription
pitch
semitones

Returns: SILENCE_PUBLIC double

I (csound::I)

Returns the pitch reflected in the center, which may be any pitch.

NOTE: Does NOT return an equivalent under any requivalence relation.

ParameterDescription
pitch
center

Returns: SILENCE_PUBLIC double

modulo (csound::modulo)

Returns the remainder of the dividend divided by the divisor, according to the Euclidean definition.
ParameterDescription
dividend
divisor

Returns: SILENCE_PUBLIC double

epc (csound::epc)

Returns the equivalent of the pitch under pitch-class equivalence, i.e.

the pitch is in the interval [0, OCTAVE). Implemented using the Euclidean definition.

ParameterDescription
pitch

Returns: SILENCE_PUBLIC double

pitchClassForName (csound::pitchClassForName)

ParameterDescription
name

Returns: SILENCE_PUBLIC double

nameForPitchClass (csound::nameForPitchClass)

Returns the name of the pitch-class of the pitch.

The first of enharmonic names is always used, sorry. If there is no matching name, an empty string is returned.

ParameterDescription
pitch

Returns: SILENCE_PUBLIC std::string

nameForChord (csound::nameForChord)

Returns the first valid name for the Chord .

If none exists, an empty result is returned.

ParameterDescription
chord

Returns: SILENCE_PUBLIC std::string

chordForName (csound::chordForName)

ParameterDescription
name

Returns: SILENCE_PUBLIC const Chord &

nameForScale (csound::nameForScale)

Returns the first valid name for the Scale .
ParameterDescription
scale

Returns: SILENCE_PUBLIC std::string

scaleForName (csound::scaleForName)

ParameterDescription
name

Returns: SILENCE_PUBLIC const Scale &

add_chord (csound::add_chord)

ParameterDescription
name
chord

Returns: SILENCE_PUBLIC void

add_scale (csound::add_scale)

ParameterDescription
name
scale

Returns: SILENCE_PUBLIC void

iterator (csound::iterator)

Returns a chord with the specified number of voices all set to a first pitch, useful as an iterator.
ParameterDescription
voiceN
first

Returns: SILENCE_PUBLIC Chord

next (csound::next)

Increment a chord voicewise through chord space, from a low point on the unison diagonal through a high point on the unison diagonal.

g is the generator of transposition. Before iterating the iterator must be set to the low point of iteration.

ParameterDescription
iterator_
minimum
range
g

Returns: SILENCE_PUBLIC bool

note (csound::note)

Creates a complete "note on" Event for the indicated voice of the chord.

If the optional duration, channel, velocity, and pan parameters are not passed, then the Chord 's own values for these are used.

ParameterDescription
chord
voice
time_
duration_
channel_
velocity_
pan_

Returns: Event

notes (csound::notes)

Returns an individual note for each voice of the chord.

If the optional duration, channel, velocity, and pan parameters are not passed, then the Chord 's own values for these are used.

ParameterDescription
chord
time_
duration_
channel_
velocity_
pan_

Returns: Score

numerics_information (csound::numerics_information)

ParameterDescription
a
b
epsilons
ulps

Returns: SILENCE_PUBLIC void

operator== (C++ csound::operator)

chord_lt (C++ csound::operator)

scale_lt (C++ csound::operator)

harmony_point_2_lt (C++ csound::operator)

operator<= (C++ csound::operator)

operator> (C++ csound::operator)

operator>= (C++ csound::operator)

voiceleading (csound::voiceleading)

Returns the voice-leading between chords a and b, i.e.

what you have to add to a to get b, as a chord of directed intervals.

ParameterDescription
a
b

Returns: SILENCE_PUBLIC Chord

parallelFifth (csound::parallelFifth)

Returns whether the voiceleading between chords a and b contains a parallel fifth.
ParameterDescription
a
b

Returns: SILENCE_PUBLIC bool

toScore (csound::toScore)

ParameterDescription
chord
score
time_
voiceIsInstrument

Returns: SILENCE_PUBLIC void

voiceleadingSmoothness (csound::voiceleadingSmoothness)

Returns the smoothness of the voiceleading between chords a and b by L1 norm.
ParameterDescription
a
b

Returns: SILENCE_PUBLIC double

voiceleadingSmoother (csound::voiceleadingSmoother)

Returns which of the voiceleadings (source to d1, source to d2) is the smoother (shortest moves), optionally avoiding parallel fifths.
ParameterDescription
source
d1
d2
avoidParallels
range

Returns: SILENCE_PUBLIC Chord

voiceleadingSimpler (csound::voiceleadingSimpler)

Returns which of the voiceleadings (source to d1, source to d2) is the simpler (fewest moves), optionally avoiding parallel fifths.
ParameterDescription
source
d1
d2
avoidParallels

Returns: SILENCE_PUBLIC Chord

voiceleadingCloser (csound::voiceleadingCloser)

Returns which of the voiceleadings (source to d1, source to d2) is the closer (first smoother, then simpler), optionally avoiding parallel fifths.
ParameterDescription
source
d1
d2
avoidParallels

Returns: SILENCE_PUBLIC Chord

voiceleadingClosestRange (csound::voiceleadingClosestRange)

Returns the voicing of the destination which has the closest voice-leading from the source within the range, optionally avoiding parallel fifths.
ParameterDescription
source
destination
range
avoidParallels

Returns: SILENCE_PUBLIC Chord

closestPitch (csound::closestPitch)

Returns the pitch in the chord that is closest to the indicated pitch.
ParameterDescription
pitch
chord

Returns: SILENCE_PUBLIC double

conformToPitchClassSet (csound::conformToPitchClassSet)

Conforms the pitch to the pitch-class set, but in its original register.
ParameterDescription
pitch
pcs

Returns: SILENCE_PUBLIC double

conformToChord (csound::conformToChord)

ParameterDescription
event
chord

Returns: SILENCE_PUBLIC void

conformToChord_equivalence (csound::conformToChord_equivalence)

If the Event is a note, moves its pitch to the closest pitch of the chord.

If octaveEquivalence is true (the default), the pitch-class of the note is moved to the closest pitch-class of the chord, i.e. keeping the note more or less in its original register; otherwise, the pitch of the note is moved to the closest absolute pitch of the chord.

ParameterDescription
event
chord
octaveEquivalence

Returns: SILENCE_PUBLIC void

insert (csound::insert)

Inserts the notes of the chord into the score at the specified time.
ParameterDescription
score
chord
time_
voice_is_instrument

Returns: SILENCE_PUBLIC void

slice (csound::slice)

Returns a slice of the Score starting at the start time and extending up to but not including the end time.

The slice contains pointers to the Events in the Score .

ParameterDescription
score
startTime
endTime

Returns: SILENCE_PUBLIC std::vector< Event * >

apply (csound::apply)

ParameterDescription
score
chord
startTime
endTime
octaveEquivalence

Returns: SILENCE_PUBLIC void

gather (csound::gather)

Returns a chord containing all the pitches of the score beginning at or later than the start time, and up to but not including the end time.
ParameterDescription
score
startTime
endTime

Returns: SILENCE_PUBLIC Chord

octavewiseRevoicings (csound::octavewiseRevoicings)

Returns the full set of octavewise revoicings of the chord within the indicated range.
ParameterDescription
chord
range

Returns: SILENCE_PUBLIC int

octavewiseRevoicing (csound::octavewiseRevoicing)

Returns the nth octavewise revoicing of the chord that is generated by iterating revoicings within the indicated range.
ParameterDescription
chord
revoicingNumber_
range

Returns: SILENCE_PUBLIC Chord

indexForOctavewiseRevoicing (csound::indexForOctavewiseRevoicing)

Returns the index of the octavewise revoicing that this chord is, counting up from the origin, within the indicated range.

Returns -1 if there is no such chord within the range.

ParameterDescription
origin
chord
range

Returns: SILENCE_PUBLIC int

scale (csound::scale)

Returns the named chord as a scale, that is, starting with the chord in OP, and sorting it from the tonic pitch-class on up.

This enables transformations in tonal harmony such as transposing by scale degree. If no Chord exists for the name, an empty Chord is returned.

ParameterDescription
name

Returns: SILENCE_PUBLIC Chord

chord (csound::chord)

Returns the chord, in scale order, for the specified degree of the scale.

The chord can be composed of seconds, thirds, or larger intervals, and can have two or more voices. The scale can have any number of pitch-classes

and any interval content; it simply has to consists of pitch-classes sorted from the tonic pitch-class on up.

PLEASE NOTE: Scale degree is 1-based. A "third" is denoted "3" but is two scale degrees, and so on.

ParameterDescription
scale
scale_degree
chord_voices
interval

Returns: SILENCE_PUBLIC Chord

transpose_degrees (csound::transpose_degrees)

Returns the chord, in scale order, transposed within the scale by the indicated number of scale degrees, which can be positive or negative.

The original chord may be in any order or voicing. By default, chords are generated by thirds, but they can be at any interval in scale degrees. If the original chord does not belong to the scale, an empty Chord is returned.

ParameterDescription
scale
original_chord
transposition_degrees
interval

Returns: SILENCE_PUBLIC Chord

SET_CHORD_SPACE_DEBUGGING (csound::SET_CHORD_SPACE_DEBUGGING)

ParameterDescription
enabled

Returns: bool

SET_SCOPED_DEBUGGING (csound::SET_SCOPED_DEBUGGING)

ParameterDescription
enabled

Returns: bool

event_lt (C++ csound::operator)

getCorrectNegativeDurations (csound::getCorrectNegativeDurations)

Returns: bool

setCorrectNegativeDurations (csound::setCorrectNegativeDurations)

ParameterDescription
do_correct

Returns: void

hello

Classes

PitvIndices

C++ PitvIndices

Properties

P (PitvIndices::P)

I (PitvIndices::I)

T (PitvIndices::T)

V (PitvIndices::V)

Cell

C++ csound::Cell

Extends: ScoreNode

Score node that simplifies building up structures of motivic cells, and incrementally transforming them, as in Minimalism.

Properties

durationSeconds (C++ csound::Cell::getDurationSeconds)

Returns: double

importFilename (C++ csound::Cell::getImportFilename)

Returns: std::string

relativeDuration (C++ csound::Cell::getRelativeDuration)

Returns: bool

repeatCount (C++ csound::Cell::getRepeatCount)

Returns: int

CellAdd

C++ csound::CellAdd

Extends: Node

The indicated factor is added to the indicated dimension of each note produced by the child nodes of this, beginning at the start index and proceeding up to but not including the end index, at the specified stride.

Each dimension may have its own factor.

Methods

add (csound::CellAdd::add)

ParameterDescription
dimension
value
start
end
stride

Returns: void

CellChord

C++ csound::CellChord

Extends: Node

Notes produced by the child nodes of this are conformed to the chord, starting at the indicated start index, up to but not including the end index, at the indicated stride.

Methods

chord (csound::CellChord::chord)

ParameterDescription
chord
start
end
stride

Returns: void

CellMultiply

C++ csound::CellMultiply

Extends: Node

The indicated dimension of each note produced by the child nodes of this, beginning at the start index and proceeding up to but not including the end index, at the specified stride, is multiplied by the indicated factor.

Each dimension may have its own factor.

Methods

multiply (csound::CellMultiply::multiply)

ParameterDescription
dimension
value
start
end
stride

Returns: void

CellRandom

C++ csound::CellRandom

Extends: Random

Notes produced by the child nodes of this, starting at the indicated start index, up to but not including the indicated end index, at the indicated stride, have added to them a random variable from the indicated distribution, rescaled to the indicated minimum and range.

Parameters for the random variable are set as for the base Random node.

Methods

random (csound::CellRandom::random)

ParameterDescription
distribution
dimension
start
end
stride

Returns: void

CellRemove

C++ csound::CellRemove

Extends: Node

Notes are removed from the notes produced by the child nodes of this, beginning at the indicated start index, up to but not including the end index, at the indicated stride.

The times of the child notes are adjusted to close the gap, i.e. the times of the child notes are rescaled to close gaps resulting from the deleted notes.

Methods

remove (csound::CellRemove::remove)

ParameterDescription
start
end
stride

Returns: void

CellRepeat

C++ csound::CellRepeat

Extends: Node

All notes produced by child nodes are repeated for the specified number of iterations, beginning at the start index and proceeding up to but not including the end index, at the specified stride.

If absolute_duration is true, then the next repetition occurs after that duration; if false, then the indicated duration is added to the total duration of the repeated notes.

Methods

repeat (csound::CellRepeat::repeat)

ParameterDescription
iterations
duration
absolute_duration
start
end
stride

Returns: void

CellSelect

C++ csound::CellSelect

Extends: Node

The notes produced by the child nodes of this are returned as sampled from the indicated start index, up to but not including the indicated end index, at the indicated stride.

Methods

select (csound::CellSelect::select)

ParameterDescription
start
end
stride

Returns: void

CellShuffle

C++ csound::CellShuffle

Extends: Random

Notes produced by the child nodes of this, starting at the indicated start index, up to but not including the indicated end index, at the indicated stride, are randomly shuffled as to time.

Methods

shuffle (csound::CellShuffle::shuffle)

ParameterDescription
start
end
stride

Returns: void

Chord

C++ csound::Chord

Chords consist of simultaneously sounding pitches.

The pitches are represented as semitones with 0 at the origin and middle C as 60. Each voice also has a duration, velocity, channel, and pan. Eigen matrices are accessed (row, column) and stored as column vectors, so a Chord is accessed (voice (same as row), attribute).

Methods

ceiling (csound::Chord::ceiling)

Returns a new chord whose pitches are the ceilings of this chord's pitches, with respect to the generator of transposition g, which defaults to 1 semitone.
ParameterDescription
g

Returns: Chord

contains (csound::Chord::contains)

Returns whether or not the chord contains the pitch.
ParameterDescription
pitch_

Returns: bool

eET (csound::Chord::eET)

Returns a new Chord with the pitches in this chord rounded to the nearest integer multiple of g, the generator of transposition.

This is valid only if g goes evenly into 12 (the octave), i.e. in 12/g tone equal temperament.

ParameterDescription
g

Returns: Chord

iseET (csound::Chord::iseET)

Returns whether or not the chord lies on the g-lattice.
ParameterDescription
g

Returns: bool

count (csound::Chord::count)

Returns the number of voices in this chord, the same as the number of dimensions in this chord space.
ParameterDescription
pitch

Returns: size_t

cycle (csound::Chord::cycle)

Returns a copy of the chord cyclically permuted by a stride, by default 1.

The direction of rotation is by default the same as musicians' first inversion, second inversion, and so on; but negative sign will reverse the direction of rotation.

1 is pop the front and push it on the back, shifting the middle down. 0 1 2 3 4 => 1 2 3 4 0

1 is pop the back and push it on the front, shifting the middle up. 0 1 2 3 4 => 4 0 1 2 3

ParameterDescription
stride

Returns: Chord

distanceToOrigin (csound::Chord::distanceToOrigin)

Returns the Euclidean distance of this chord from its space's origin.

Returns: double

distanceToUnisonDiagonal (csound::Chord::distanceToUnisonDiagonal)

Returns the Euclidean distance from this chord to the unison diagonal of its chord space.

Returns: double

eI (csound::Chord::eI)

Returns the equivalent of the chord within a fundamental domain of inversional equivalence.
ParameterDescription
opt_sector

Returns: Chord

eIg (csound::Chord::eIg)

Returns the equivalent of the chord within a fundamental domain of inversional equivalence in the equal temperament generated by g.
ParameterDescription
range
g
opt_sector

Returns: Chord

eO (csound::Chord::eO)

Returns the equivalent of the chord within the representative fundamental domain of octave equivalence.

Returns: Chord

eOP (csound::Chord::eOP)

Returns the equivalent of the chord within the representative fundamental domain of octave and permutational equivalence.

Returns: Chord

eOPI (csound::Chord::eOPI)

Returns the equivalent of the chord within a fundamental domain of octave, permutational, and inversional equivalence.
ParameterDescription
opt_sector

Returns: Chord

eOPT (csound::Chord::eOPT)

Returns the equivalent of the chord within a fundamental domain of octave, permutational, and transpositional equivalence.
ParameterDescription
opt_sector

Returns: Chord

eOPTI (csound::Chord::eOPTI)

Returns the equivalent of the chord within a fundamental domain of range, permutational, transpositional, and inversional equivalence.
ParameterDescription
opt_sector

Returns: Chord

eOPTT (C++ csound::Chord::eOPTg)

Returns the equivalent of the chord within a fundamental domain of octave, permutational, and transpositional equivalence but in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: Chord

eOPTg (csound::Chord::eOPTg)

Returns the equivalent of the chord within a fundamental domain of octave, permutational, and transpositional equivalence but in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: Chord

eOPTIg (csound::Chord::eOPTIg)

Returns the equivalent of the chord within a fundamental domain of range, permutational, transpositional, and inversional equivalence but in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: Chord

eOPTgI (C++ csound::Chord::eOPTIg)

Returns the equivalent of the chord within a fundamental domain of range, permutational, transpositional, and inversional equivalence but in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: Chord

eP (csound::Chord::eP)

Returns the equivalent of the chord within the representative fundamental domain of permutational equivalence.

Returns: Chord

epcs (csound::Chord::epcs)

Returns the equivalent of the chord under pitch-class equivalence, i.e.

the pitch-class set of the chord.

Returns: Chord

equals (csound::Chord::equals)

Returns whether the voices of this chord equal the voices of the other.
ParameterDescription
other

Returns: bool

eR (csound::Chord::eR)

Returns the equivalent of the chord within the representative fundamental domain of a range equivalence.
ParameterDescription
range

Returns: Chord

eRP (csound::Chord::eRP)

Returns the equivalent of the chord within the representative fundamental domain of range and permutational equivalence.
ParameterDescription
range

Returns: Chord

eRPI (csound::Chord::eRPI)

Returns the equivalent of the chord within a fundamental domain of range, permutational, and inversional equivalence.
ParameterDescription
range
opt_sector

Returns: Chord

eRPT (csound::Chord::eRPT)

Returns the equivalent of the chord within a fundamental domain of range, permutational, and transpositional equivalence.
ParameterDescription
range
opt_sector

Returns: Chord

eRPTI (csound::Chord::eRPTI)

Returns the equivalent of the chord within the representative fundamental domain of range, permutational, transpositional, and inversional equivalence.
ParameterDescription
range
opt_sector

Returns: Chord

eRPTT (C++ csound::Chord::eRPTg)

Returns the equivalent of the chord within a fundamental domain of range, permutational, and transpositional equivalence, in the equal temperament generated by g; the same as chord type.
ParameterDescription
range
g
opt_sector

Returns: Chord

eRPTg (csound::Chord::eRPTg)

Returns the equivalent of the chord within a fundamental domain of range, permutational, and transpositional equivalence, in the equal temperament generated by g; the same as chord type.
ParameterDescription
range
g
opt_sector

Returns: Chord

eRPTIg (csound::Chord::eRPTIg)

Returns the equivalent of the chord within a fundamental domain of range, permutational, transpositional, and inversional equivalence.
ParameterDescription
range
g
opt_sector

Returns: Chord

et (csound::Chord::et)

Returns the equivalent of the chord within the fundamental domain of transposition to 0.

Returns: Chord

eT (csound::Chord::eT)

Returns the equivalent of the chord within a fundamental domain of range, permutational, transpositional, and inversional equivalence in the equal temperament generated by g; the same as set class.

Returns: Chord

eTT (C++ csound::Chord::eTg)

Returns the equivalent of the chord within the representative fundamental domain of transpositonal equivalence and the equal temperament generated by g, i.e., returns the chord transposed such that its layer is 0 or, under transposition, the positive layer closest to 0.

NOTE: Does NOT return the result under any other equivalence class.

ParameterDescription
g

Returns: Chord

eTg (csound::Chord::eTg)

Returns the equivalent of the chord within the representative fundamental domain of transpositonal equivalence and the equal temperament generated by g, i.e., returns the chord transposed such that its layer is 0 or, under transposition, the positive layer closest to 0.

NOTE: Does NOT return the result under any other equivalence class.

ParameterDescription
g

Returns: Chord

floor (csound::Chord::floor)

Returns a new chord whose pitches are the floors of this chord's pitches.

Returns: Chord

fromString (csound::Chord::fromString)

Rebuilds the chord's pitches (only) from a line of text.
ParameterDescription
text

Returns: void

getDuration (csound::Chord::getDuration)

ParameterDescription
voice

Returns: double

getInstrument (csound::Chord::getInstrument)

ParameterDescription
voice

Returns: double

getLoudness (csound::Chord::getLoudness)

ParameterDescription
voice

Returns: double

getPan (csound::Chord::getPan)

ParameterDescription
voice

Returns: double

getPitch (csound::Chord::getPitch)

ParameterDescription
voice

Returns: double

greater (csound::Chord::greater)

Returns whether the voices of this chord are greater than the voices of the other.
ParameterDescription
other

Returns: bool

greater_equals (csound::Chord::greater_equals)

Returns whether the voices of this chord are greater than or equal to the voices of the other.
ParameterDescription
other

Returns: bool

I (csound::Chord::I)

Inverts the chord by another chord that is on the unison diagonal, by default the origin.

NOTE: Does NOT return an equivalent under any requivalence relation; not to be confused with reflection in the inversion flat.

ParameterDescription
center

Returns: Chord

Iform (csound::Chord::Iform)

Returns whether the chord is an inversional form of Y with interval size g.

Only works in equal temperament.

ParameterDescription
Y
g

Returns: bool

information (csound::Chord::information)

Print much information about the chord including whether it is within important equivalence classes, or what its equivalents would be.

Returns: std::string

information_debug (csound::Chord::information_debug)

Print much information about the chord including whether it is within important equivalence classes, or what its equivalents would be.

The printout first enables then restores debugging diagnostics.

ParameterDescription
opt_sector

Returns: std::string

information_sector (csound::Chord::information_sector)

Print much information about the chord including whether it is within important equivalence classes, or what its equivalents would be.
ParameterDescription
opt_sector

Returns: std::string

is_in_rpt_sector (csound::Chord::is_in_rpt_sector)

Returns whether or not this chord lies within the indicated sector of the cyclical region of the OPT (or RPT) fundamental domain.

To identify the sector to which a chord in RP belongs, we project the chord onto RPT.

Then we measure the Euclidean distance of the midpoint of each sector's base face to the chord, and the closest midpoint belongs to that chord's sector. A chord may belong to more than one sector if it is equidistant from two or more midpoints. This is numerically tricky.

ParameterDescription
opt_sector
range

Returns: bool

is_in_rpt_sector_g (csound::Chord::is_in_rpt_sector_g)

ParameterDescription
opt_sector
range
g

Returns: bool

is_minor (csound::Chord::is_minor)

Returns whether this chord is "minor" in the sense of having the smallest "wrapround interval" of all its voicings.

Returns: bool

iseI (csound::Chord::iseI)

ParameterDescription
opt_sector

Returns: bool

iseI_chord (csound::Chord::iseI_chord)

Returns whether the chord is within the fundamental domain of inversional equivalence.
ParameterDescription
inverse
opt_sector

Returns: bool

iseOP (csound::Chord::iseOP)

Returns whether the chord is within the representative fundamental domain of octave and permutational equivalence.

Returns: bool

iseOPI (csound::Chord::iseOPI)

Returns whether the chord is within a fundamental domain of octave, permutational, and inversional equivalence.
ParameterDescription
opt_sector

Returns: bool

iseOPT (csound::Chord::iseOPT)

Returns whether the chord is within a fundamental domainof octave, permutational, and transpositional equivalence.
ParameterDescription
opt_sector

Returns: bool

iseOPTI (csound::Chord::iseOPTI)

Returns whether the chord is within a fundamental domain of octave, permutational, transpositional, and inversional equivalence.
ParameterDescription
opt_sector

Returns: bool

iseOPTT (C++ csound::Chord::iseOPTg)

Returns whether the chord is within a fundamental domain of octave, permutational, and transpositional equivalence in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: bool

iseOPTg (csound::Chord::iseOPTg)

Returns whether the chord is within a fundamental domain of octave, permutational, and transpositional equivalence in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: bool

iseOPTTI (C++ csound::Chord::iseOPTIg)

Returns whether the chord is within a fundamental domain of octave, permutational, transpositional, and inversional equivalence in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: bool

iseOPTIg (csound::Chord::iseOPTIg)

Returns whether the chord is within a fundamental domain of octave, permutational, transpositional, and inversional equivalence in the equal temperament generated by g.
ParameterDescription
g
opt_sector

Returns: bool

iseP (csound::Chord::iseP)

Returns whether the chord is within the representative fundamental domain of permutational equivalence.

Returns: bool

isepcs (csound::Chord::isepcs)

Returns whether the chord is within the fundamental domain of pitch-class equivalence, i.e.

is a pitch-class set.

Returns: bool

iseR (csound::Chord::iseR)

Returns whether the chord is within the representative fundamental domain of the indicated range equivalence.
ParameterDescription
range_

Returns: bool

iseRP (csound::Chord::iseRP)

Returns whether the chord is within the representative fundamental domain of range and permutational equivalence.
ParameterDescription
range

Returns: bool

iseRPI (csound::Chord::iseRPI)

Returns whether the chord is within a fundamental domain of range, permutational, and inversional equivalence.
ParameterDescription
range
opt_sector

Returns: bool

iseRPT (csound::Chord::iseRPT)

Returns whether the chord is within a fundamental domain of range, permutational, and transpositional equivalence.
ParameterDescription
range
opt_sector

Returns: bool

iseRPTI (csound::Chord::iseRPTI)

Returns whether the chord is within a fundamental domain of range, permutational, transpositional, and inversional equivalence.
ParameterDescription
range
opt_sector

Returns: bool

iseRPTT (C++ csound::Chord::iseRPTg)

Returns whether the chord is within a fundamental domain of range, permutational, and transpositional equivalence in the equal temperament generated by g.
ParameterDescription
range
g
opt_sector

Returns: bool

iseRPTg (csound::Chord::iseRPTg)

Returns whether the chord is within a fundamental domain of range, permutational, and transpositional equivalence in the equal temperament generated by g.
ParameterDescription
range
g
opt_sector

Returns: bool

iseRPTTI (C++ csound::Chord::iseRPTIg)

Returns whether the chord is within a fundamental domain of range, permutational, transpositional, and inversional equivalence in the ' equal temperament generated by g.
ParameterDescription
range
g
opt_sector

Returns: bool

iseRPTIg (csound::Chord::iseRPTIg)

Returns whether the chord is within a fundamental domain of range, permutational, transpositional, and inversional equivalence in the ' equal temperament generated by g.
ParameterDescription
range
g
opt_sector

Returns: bool

iset (csound::Chord::iset)

Returns whether the chord is within the fundamental domain of transposition to 0.

Returns: bool

iseT (csound::Chord::iseT)

Returns whether the chord is within the representative fundamental domain of transpositional equivalence.

Returns: bool

iseTT (C++ csound::Chord::iseTg)

Returns whether the chord is within the representative fundamental domain of transpositional equivalence in the equal temperament generated by g.
ParameterDescription
g

Returns: bool

iseTg (csound::Chord::iseTg)

Returns whether the chord is within the representative fundamental domain of transpositional equivalence in the equal temperament generated by g.
ParameterDescription
g

Returns: bool

K (csound::Chord::K)

Returns the chord inverted by the sum of its first two voices.

Returns: Chord

K_range (csound::Chord::K_range)

ParameterDescription
range

Returns: Chord

layer (csound::Chord::layer)

Returns the sum of the pitches in the chord.

Returns: double

lesser (csound::Chord::lesser)

Returns whether the voices of this chord are less than the voices of the other.
ParameterDescription
other

Returns: bool

lesser_equals (csound::Chord::lesser_equals)

Returns whether the voices of this chord are less than or equal to the voices of the other.
ParameterDescription
other

Returns: bool

max (csound::Chord::max)

Returns the highest pitch in the chord, and also the voice index of that pitch.

Returns: std::vector< double >

center (csound::Chord::center)

Returns the maximally even chord in the chord's space, e.g.

the augmented triad for 3 dimensions.

Returns: Chord

maximumInterval (csound::Chord::maximumInterval)

Returns the maximum interval within the chord.

Returns: double

min (csound::Chord::min)

Returns the lowest pitch in the chord, and also the voice index of that pitch.

Returns: std::vector< double >

minimumInterval (csound::Chord::minimumInterval)

Returns the minimum interval within the chord.

Returns: double

move (csound::Chord::move)

Move 1 voice of the chord.

NOTE: Does NOT return an equivalent under any requivalence relation.

ParameterDescription
voice
interval

Returns: Chord

name (csound::Chord::name)

Return the jazz-style name of the chord, if possible, or else a human-readable list of the voices in the chord.

Returns: std::string

normal_form (csound::Chord::normal_form)

Returns this chord as its standard "normal form.".

NOTE: The code here does NOT remove duplicate pitch-classes.

Returns: Chord

normal_order (csound::Chord::normal_order)

Returns this chord in standard "normal order." For a very clear explanation, see: https://www.mta.ca/pc-set/pc-set_new/pages/page04/page04.html and http://openmusictheory.com/normalOrder.html/ .

NOTE: The code here does NOT remove duplicate pitch-classes. "Normal order" is the most compact ordering to the left of pitch-classes in a chord, measured by pitch-class interval.

Returns: Chord

nrD (csound::Chord::nrD)

Performs the dominant transformation (which is not a neo-Reimannian transformation).

The result is returned in OP.

Returns: Chord

nrH (csound::Chord::nrH)

Performs the neo-Riemannian hexatonic pole transformation.

The result is returned in OP.

Returns: Chord

nrL (csound::Chord::nrL)

Performs the neo-Riemannian Lettonwechsel transformation.

The result is returned in OP.

Returns: Chord

nrN (csound::Chord::nrN)

Performs the neo-Riemannian Nebenverwandt transformation.

The result is returned in NP.

Returns: Chord

nrP (csound::Chord::nrP)

Performs the neo-Riemannian parallel transformation.

The result is returned in OP.

Returns: Chord

nrR (csound::Chord::nrR)

Performs the neo-Riemannian parallel transformation.

Returns: Chord

nrS (csound::Chord::nrS)

Performs the neo-Riemannian Slide transformation.

The result is returned in OP.

Returns: Chord

operator= (C++ csound::Chord::operator)

opt_domain_sectors (csound::Chord::opt_domain_sectors)

Returns the zero-based index(s) of the sector(s) within the cyclical region of OPT fundamental domains to which the chord belongs.

A chord on a vertex, edge, or facet shared by more than one sector belongs to each of them; the center of the cyclical region belongs to all of the sectors. Sectors are generated by rotation of a fundamental domain around the central axis (equivalently, by the octavewise revoicing of chords) and correspond to "chord inversion" in the musician's sense.

Returns: std::vector< int >

origin (csound::Chord::origin)

Returns the origin of the chord's space.

Returns: Chord

permutations (csound::Chord::permutations)

Returns the permutations of the pitches in a chord.

The permutations are always returned in the same order.

Returns: std::vector< Chord >

prime_form (csound::Chord::prime_form)

Returns this chord as its standard "prime form.".

NOTE: The code here does NOT remove duplicate pitch-classes.

Returns: Chord

Q (csound::Chord::Q)

Returns the contextual transposition of the chord by x with respect to m with minimum interval size g.

NOTE: Does NOT return an equivalent under any requivalence relation.

ParameterDescription
x
m
g

Returns: Chord

R (csound::Chord::R)

Reflects the chord in the inversion flat of the indicated OPT sector.
ParameterDescription
opt_sector

Returns: Chord

Rg (csound::Chord::Rg)

Reflects the chord in the inversion flat of the indicated OPT sector, on the g-lattice.
ParameterDescription
opt_sector
g

Returns: Chord

resize (csound::Chord::resize)

ParameterDescription
voiceN

Returns: void

setDuration (csound::Chord::setDuration)

ParameterDescription
value
voice

Returns: void

setInstrument (csound::Chord::setInstrument)

ParameterDescription
value
voice

Returns: void

setLoudness (csound::Chord::setLoudness)

ParameterDescription
value
voice

Returns: void

setPan (csound::Chord::setPan)

ParameterDescription
value
voice

Returns: void

setPitch (csound::Chord::setPitch)

ParameterDescription
voice
value

Returns: void

T (csound::Chord::T)

Transposes the chord by the indicated interval (may be a fraction).

NOTE: Does NOT return an equivalent under any requivalence relation.

ParameterDescription
interval

Returns: Chord

T_voiceleading (csound::Chord::T_voiceleading)

Transposes the chord by the indicated voiceleading (passed as a Chord of directed intervals).

NOTE: Does NOT return an equivalent under any equivalence relation.

ParameterDescription
voiceleading

Returns: Chord

Tform (csound::Chord::Tform)

Returns whether the chord is a transpositional form of Y with interval size g.

Only works in equal temperament.

ParameterDescription
Y
g

Returns: bool

toString (csound::Chord::toString)

Returns a string representation of the chord's pitches (only).

Quadratic complexity, but short enough not to matter.

Returns: std::string

v (csound::Chord::v)

Returns a copy of the chord 'inverted' in the musician's sense, i.e.

revoiced by cyclically permuting the chord and adding (or subtracting) an octave (or other interval) to the highest (or lowest) voice. The revoicing will move the chord up or down in pitch. A positive direction is the same as a musician's first inversion, second inversion, etc.

ParameterDescription
direction
interval

Returns: Chord

voiceleading (csound::Chord::voiceleading)

Returns the transpositions (as a Chord of directed intervals) that takes this chord to the destination chord.

NOTE: Makes no assumption that both chords are in the same equivalence class.

ParameterDescription
destination

Returns: Chord

voices (csound::Chord::voices)

Returns the number of voices in this chord; that is, the number of dimensions in the chord space for this chord.

Returns: size_t

copy

voicings

Returns all the 'inversions' (in the musician's sense) of this chord.

The first voice is transposed up (or down) by an interval (defaulting to the octave), and all voices are then rotated "left" so the transposed voice becomes the last voice. This procedure is iterated until all 'inversions' have been generated.

ParameterDescription
direction
interval

Returns: std::vector< Chord >

voicings_with

J

ChordLindenmayer

C++ csound::ChordLindenmayer

Extends: VoiceleadingNode

A Lindenmayer system consists of a turtle representing a position in musical space, that is, a note; commands for moving the turtle or writing its state into a musical score; an axiom or initial set of commands; and zero or more rules for replacing commands with arbitrary sequences of commands.

The turtle T represents the current state of the Lindenmayer system: a note vector N that represents a position in score space, a step size S, an orientation O, a chord C, a chord that defines modality M, an octavewise chord revoicing V, a scale Sc, a scale degree Sd, and a range Ra. Vectors are given as {el0,el2,...} without any spaces .

The turtle commands are defined (operation target ...) or (operation target[dimension] ...) , as follows: ([ T ) Push the current turtle state on a stack (start a branch).
(] T ) Pop the current turtle state from the stack ( return to start).
(W N e) Write the current turtle note N into the score under
equivalence class e.
(F N x e) Move the turtle position N "forward" x steps S along its
current orientation O) under equivalence class e.
(o N[d] x e) Apply arithmetic operation o to dimension d of the turtle
position N with parameter x under equivalence class e.
(o S[d] x e) Apply arithmetic operation o to dimension d of the turtle
step size S with parameter x under equivalence class e.
(R O a b w) Rotate the turtle orientation O in the plane of dimensions
a and b by angle w radians.
(W C e) Write the current turtle chord C with octavewise revoicing
from OP order V to the score under equivalence class e. Chord
voices default to the same time and other dimensions as the
current turtle note N.
(o C v e) Apply arithmetic operation o to the turtle chord C as a whole
with parameter v (a vector or chord name) under equivalence
class e.
(o C [i] x e) Apply arithmetic operation o to voice i of the turtle chord C
with parameter x under equivalence class e.
( T C x) Transpose the turtle chord C by x under equivalence class e.
( I C x) Invert the turtle chord C by reflecting around pitch-class x.
( K C ) Apply Neo-Riemannian inversion by exchange to the turtle
chord C .
( Q C x) Apply Neo-Riemannian contextual transposition by x
(by reference to the turtle 's modality M) to turtle chord C .
(++ C ) Add a voice (doubling the first pitch in OP order) to the
turtle chord C .
(-- C ) Remove a voice (the uppermost pitch in OP order) from the
turtle chord C .
(o M v e) Apply arithmetic operation o to the turtle modality M as a
whole with parameter v (a vector or chord name) under
equivalence class e.
(o M[i] x e) Apply arithmetic operation o to voice i of the turtle modality
M with parameter x under equivalence class e.
(o V x) Apply arithmetic operation o to the voicing index of the
turtle chord with parameter x. Of necessity the
equivalence class is the range of the score .
(= Sc n v) Assign the vector of pitches v to the turtle scale Sc with
name n.
(C Sc n m) Obtain the turtle chord C with m voices at the nth degree
of the current turtle scale Sc.
(M Sc n k) Modulate the turtle scale Sc to a new scale Sc with the the
current turtle chord C as the common chord but with n voices;
if more than one scale exists with that common chord ,
choose the kth scale .
(o Sd x) Apply arithmetic operation o to the turtle scale degree Sd,
with parameter x.
(C Sd m) Obtain the turtle chord C of m voices as the current scale
degree Sd of the turtle scale Sc.
(C P) Apply the current turtle chord C to the score , starting at
the current time and continuing until the next application.
(Cl P) Apply the current turtle chord C to the score , using the
closest voice-leading from the previous chord ( if any),
starting at the current time and continuing to the next
application.
(Sc P) Apply the current turtle scale Sc to the score , starting
at the current time and continuing until the next application.
(0 P) End the scope of the previous application of a chord or scale .
(= P n) Assign the range n to the size of the score , i.e. define
range equivalence .
(seed P x) Seed the static random generator used by all random
distributions with x.
An arithmetic operation may also consist of sampling a random distribution, e.g. (u N[k] minimum maximum) ; all parameters of the distribution must be given. The complete set of operations is: Assignment = x e
Addition + x e
Subtraction - x e
Multiplication * x e
Division / x e
Uniform uni min max
Normal (Gaussian) nor mean sigma
Binomial bin p k
Negative binomial nbi p k
Poisson poi mean
Exponential exp lambda
Gamma gam alpha beta
Weibull wei a b
Extreme value ext a b
Log normal log mean sigma
Chi squared chi n
Cauchy cau a b
Fisher fis m n
Student stu n
Dimensions are: Time t
Duration d
MIDI status s
Instrument i
MIDI key k
MIDI velocity v
Phase in radians p
Pan x
Depth y
Height z
Pitch- class set m
Equivalence classes are: None 0
The octave O
Range of the score R
PLEASE NOTE: Scale commands take precedence over chord commands. Not all commands are implemented. Unimplemented commands silently perform no operation, but may still be used to define replacement rules.

Methods

addRule (csound::ChordLindenmayer::addRule)

ParameterDescription
command
replacement

Returns: void

clear (csound::ChordLindenmayer::clear)

Recursively clears all child Nodes of this.

Returns: void

generateLocally (csound::ChordLindenmayer::generateLocally)

Scores are generated as follows:

The initial value of the turtle is set by the Lindenmayer system.<

>

The Lindenmayer system is rewritten by taking the axiom, parsing it into words, and replacing each word with the product of a rewriting rule, if one exists, or itself, if there is no rule. This procedure is iterated for a specified number of times.

The finished, rewritten Lindenmayer system is interpreted as a series of commands for moving a turtle around in various music spaces to write a score.

Notes (N operations) are written directly into the score.

Chords (C operations) are written into the score as notes.

Score operations are written into the score as voice-leading operations, to be applied after all notes have been generated.

Overlapping and directly abutting notes in the score are joined.

The chord and scale operations are actually applied to the score.

Overlapping and abutting notes in the score are again joined.

Returns: void

getAngle (csound::ChordLindenmayer::getAngle)

Returns: double

getAxiom (csound::ChordLindenmayer::getAxiom)

Returns: std::string

getIterationCount (csound::ChordLindenmayer::getIterationCount)

Returns: int

getReplacement (csound::ChordLindenmayer::getReplacement)

ParameterDescription
command

Returns: std::string

getTurtleChord (csound::ChordLindenmayer::getTurtleChord)

Returns: Chord

getTurtleModality (csound::ChordLindenmayer::getTurtleModality)

Returns: Chord

getTurtleScale (csound::ChordLindenmayer::getTurtleScale)

Returns: Scale

getTurtleScaleDegree (csound::ChordLindenmayer::getTurtleScaleDegree)

Returns: int

initialize (csound::ChordLindenmayer::initialize)

Returns: void

setAngle (csound::ChordLindenmayer::setAngle)

ParameterDescription
angle

Returns: void

setAxiom (csound::ChordLindenmayer::setAxiom)

ParameterDescription
axiom

Returns: void

setIterationCount (csound::ChordLindenmayer::setIterationCount)

ParameterDescription
count

Returns: void

setTurtleChord (csound::ChordLindenmayer::setTurtleChord)

ParameterDescription
chord

Returns: void

setTurtleModality (csound::ChordLindenmayer::setTurtleModality)

ParameterDescription
chord

Returns: void

setTurtleScale (csound::ChordLindenmayer::setTurtleScale)

ParameterDescription
scale

Returns: void

setTurtleScaleDegree (csound::ChordLindenmayer::setTurtleScaleDegree)

ParameterDescription
degree

Returns: void

PITV

C++ csound::PITV

This class implements a cyclic additive group for all chords under cardinality, permutational, and range equivalence.

It is formed by the direct product of prime form equivalence or P, inversional equivalence or I, transpositional equivalence or T, and equivalence under octavewise revoicing within range R or V. The group is thus PITV = P x I x T x V. Therefore, operations on the P, I, T, or V subgroups may be used to independently and orthogonally transform the respective symmetry of any chord. Some of these operations will reflect in RP.

NOTE: Prime form rather than OPTI is used because prime form abstracts from voicings (i.e. from the sectors of the OPT cyclical region).

Properties

countI (C++ csound::PITV::getCountI)

Returns: int

countP (C++ csound::PITV::getCountP)

Returns: int

countT (C++ csound::PITV::getCountT)

Returns: int

countV (C++ csound::PITV::getCountV)

Returns: int

g (C++ csound::PITV::getG)

Returns: int

N (C++ csound::PITV::getN)

Returns: int

range (C++ csound::PITV::getRange)

Returns: int

Methods

fromChord (csound::PITV::fromChord)

Returns the indices of prime form, inversion, transposition, and voicing for a chord, as the first 4 elements, respectively, of a homogeneous vector.

NOTE: Where there are singularities in the quotient spaces for chords, there may be several chords that belong to the same equivalence class. In such cases, any of several chords at a singular point of the fundamental domain will return the same P.

ParameterDescription
chord
printme

Returns: Eigen::VectorXi

initialize (csound::PITV::initialize)

ParameterDescription
N_
range_
g_
printme

Returns: void

list (csound::PITV::list)

ParameterDescription
listheader
listps
listvoicings

Returns: void

preinitialize (csound::PITV::preinitialize)

ParameterDescription
N_
range_
g_

Returns: void

toChord (csound::PITV::toChord)

Returns the chord for the indices of prime form, inversion, transposition, and voicing.

The chord is not in RP; rather, each voice of the chord's OP may have zero or more octaves added to it.

ParameterDescription
P
I
T
V
printme

Returns: std::vector< Chord >

toChord_vector

ParameterDescription
pitv
printme

Returns: std::vector< Chord >

toChordFromIndices

fromChordAsVector

fromChordIndices

Composition

C++ csound::Composition

Base class for user-defined musical compositions.

Contains a Score object for collecting generated Events such as notes and control messages.

Methods

clear (csound::Composition::clear)

Clear all contents of this.

Probably should be overridden in derived classes.

Returns: void

clearOutputSoundfileName (csound::Composition::clearOutputSoundfileName)

Returns: void

generate (csound::Composition::generate)

Generate performance events and store them in the score.

Must be overidden in derived classes.

Returns: int

generateAllNames (csound::Composition::generateAllNames)

Generates all filenames and other text based on required stem, output_directory, filename extension, and metadata.

std::snprintf(buffer, 0x200, "%s, %s", author.c_str(), stem.c_str());

Returns: void

getAlbum (csound::Composition::getAlbum)

Returns: std::string

getArtist (csound::Composition::getArtist)

Returns: std::string

getAuthor (csound::Composition::getAuthor)

Returns: std::string

getBasename (csound::Composition::getBasename)

Returns the complete basename of the file, i.e., the output directory plus the stem.

Returns: std::string

getCdSoundfileFilepath (csound::Composition::getCdSoundfileFilepath)

Returns a soundfile name for a CD audio track based on the filename of this, by appending ".cd.wav" to the filename.

Returns: std::string

getConformPitches (csound::Composition::getConformPitches)

Returns whether or not the pitches in generated scores will be conformed to the nearest equally tempered pitch.

Returns: bool

getCopyright (csound::Composition::getCopyright)

Returns: std::string

getDuration (csound::Composition::getDuration)

Returns the duration to which all times and durations of all events will be rescaled.

If the duration is 0, no rescaling is performed.

Returns: double

getFileFilepath (csound::Composition::getFileFilepath)

Returns the complete basename of the file, i.e., the output directory plus the filename.

Returns: std::string

getFilename (csound::Composition::getFilename)

Returns the stem of this, which is used as a base for derived filenames (soundfile, MIDI file, etc.).

Returns: std::string

getFomusfileFilepath (csound::Composition::getFomusfileFilepath)

Returns a MusicXML filename based on the filename of this, by appending ".fms" to the filename.

Returns: std::string

getLicense (csound::Composition::getLicense)

Returns: std::string

getLilypondfileFilepath (csound::Composition::getLilypondfileFilepath)

Returns a MusicXML filename based on the filename of this, by appending ".ly" to the filename.

Returns: std::string

getMidifileFilepath (csound::Composition::getMidifileFilepath)

Returns a MIDI filename based on the filename of this, by appending ".mid" to the filename.

Returns: std::string

getMp3SoundfileFilepath (csound::Composition::getMp3SoundfileFilepath)

Returns a soundfile name for an MP3 file based on the filename of this, by appending ".mp3" to the filename.

Returns: std::string

getMusicXmlfileFilepath (csound::Composition::getMusicXmlfileFilepath)

Returns a MusicXML filename based on the filename of this, by appending ".xml" to the filename.

Returns: std::string

getNormalizedSoundfileFilepath (csound::Composition::getNormalizedSoundfileFilepath)

Returns a soundfile name based on the filename of this, by appending ".norm.wav" to the filename.

Returns: std::string

getOutputDirectory (csound::Composition::getOutputDirectory)

Returns the directory in which to place the output files of this.

Returns: std::string

getOutputSoundfileFilepath (csound::Composition::getOutputSoundfileFilepath)

Returns a soundfile name based on the filename of this, by appending ".wav" to the filename, which is the default, or a non-default ouput name which need not be a file but must be set using setOutputSoundfileName() .

Returns: std::string

getPerformanceRightsOrganization (csound::Composition::getPerformanceRightsOrganization)

Returns: std::string

getScore (csound::Composition::getScore)

Return the self-contained Score .

Returns: Score &

getTieOverlappingNotes (csound::Composition::getTieOverlappingNotes)

Returns whether or not overlapping notes in generated scores are replaced by one note.

Returns: bool

getTimestamp (csound::Composition::getTimestamp)

Returns the time the score was generated.

Returns: std::string

getTitle (csound::Composition::getTitle)

Returns: std::string

getTonesPerOctave (csound::Composition::getTonesPerOctave)

Returns the number of equally tempered intervals per octave (the default is 12, 0 means non-equally tempered).

Returns: double

getYear (csound::Composition::getYear)

Returns: std::string

normalizeOutputSoundfile (csound::Composition::normalizeOutputSoundfile)

Assuming the score has been rendered, uses sox to translate the output soundfile to a normalized soundfile.
ParameterDescription
levelDb

Returns: int

perform (csound::Composition::perform)

Performs the current score to create an output soundfile, which should be tagged with author, timestamp, copyright, title, and optionally album.

The default implementation does nothing. Must be overridden in derived classes.

Returns: int

performAll (csound::Composition::performAll)

Convenience function that calls performMaster() , and translateMaster() .

Returns: int

performMaster (csound::Composition::performMaster)

Convenience function that calls saveMidi(), saveMusicXML(), and perform() .

Returns: int

processArgs (csound::Composition::processArgs)

Pass the invoking program's command-line arguments to processArgs() and it will perform with possibly back-end-dependent options.

Additional arguments can be added to the args before the call. Default implementation calls renderAll() .

ParameterDescription
args

Returns: int

processArgv (csound::Composition::processArgv)

Pass the invoking program's command-line arguments to processArgs() and it will perform with possibly back-end-dependent options.

Default implementation calls the std::string overload.

ParameterDescription
argc
argv

Returns: int

render (csound::Composition::render)

Convenience function that calls clear() , generate() , perform() .

timestamp = makeTimestamp() ;

Returns: int

renderAll (csound::Composition::renderAll)

Convenience function that calls clear() , generate() , performAll() .

Returns: int

setAlbum (csound::Composition::setAlbum)

ParameterDescription
value

Returns: void

setArtist (csound::Composition::setArtist)

ParameterDescription
value

Returns: void

setAuthor (csound::Composition::setAuthor)

ParameterDescription
value

Returns: void

setConformPitches (csound::Composition::setConformPitches)

Sets whether or not the pitches in generated scores will be conformed to the nearest equally tempered pitch.
ParameterDescription
conformPitches

Returns: void

setCopyright (csound::Composition::setCopyright)

ParameterDescription
value

Returns: void

setDuration (csound::Composition::setDuration)

At the end of processing, if the defined duration is not zero, the times and durations of all events are rescaled to the defined duration.
ParameterDescription
seconds

Returns: void

setFilename (csound::Composition::setFilename)

Sets the filename of this basically, the title of the composition.
ParameterDescription
filename

Returns: void

setLicense (csound::Composition::setLicense)

ParameterDescription
value

Returns: void

setOutputDirectory (csound::Composition::setOutputDirectory)

Sets the directory in which to place the output files of this.

The directory name must end with a directory separator.

ParameterDescription
directory

Returns: void

setOutputSoundfileName (csound::Composition::setOutputSoundfileName)

Sets a non-default output name (could be an audio device not a file).
ParameterDescription
name

Returns: void

setPerformanceRightsOrganization (csound::Composition::setPerformanceRightsOrganization)

ParameterDescription
value

Returns: void

setScore (csound::Composition::setScore)

Sets the score in this to the indicated score.
ParameterDescription
score

Returns: void

setTieOverlappingNotes (csound::Composition::setTieOverlappingNotes)

Sets whether or not overlapping notes in generated scores are replaced by one note.
ParameterDescription
tieOverlappingNotes

Returns: void

setTitle (csound::Composition::setTitle)

ParameterDescription
value

Returns: void

setTonesPerOctave (csound::Composition::setTonesPerOctave)

Sets the number of equally tempered intervals per octave (the default is 12, 0 means non-equally tempered).
ParameterDescription
tonesPerOctave

Returns: void

setYear (csound::Composition::setYear)

ParameterDescription
value

Returns: void

tagFile (csound::Composition::tagFile)

ParameterDescription
filename

Returns: int

translateMaster (csound::Composition::translateMaster)

Convenience function that calls rescaleOutputSoundfile(), translateToCdAudio() , and translateToMp3() .

Returns: int

translateToCdAudio (csound::Composition::translateToCdAudio)

Assuming the score has been rendered, uses sox to translate the output soundfile to normalized CD-audio format.
ParameterDescription
levelDb

Returns: int

translateToMp3 (csound::Composition::translateToMp3)

Assuming the score has been rendered, uses sox and LAME to translate the output soundfile to normalized MP3 format.
ParameterDescription
bitrate
levelDb

Returns: int

translateToMp4 (csound::Composition::translateToMp4)

Assuming the score has been rendered, uses sox and ffmpeg to translate the output soundfile to a normalized mp4 video suitable for uploading to YouTube.

Returns: int

translateToNotation (csound::Composition::translateToNotation)

Saves the generated score in Fomus format and uses Fomus and Lilypond to translate that to a PDF of music notation.

A meter of 4/4 and a tempo of MM 120 is assumed. A vector of part names may be supplied.

ParameterDescription
partNames
header

Returns: int

write (csound::Composition::write)

Write as if to stderr.
ParameterDescription
text

Returns: void

Conversions

C++ csound::Conversions

Conversions to and from various music and signal processing units.

Note that: silence::Event represents loudness in MIDI units (0 to 127). silence::Orchestra represents loudness in gain (0 to 1). silence::WaveSoundfileOut represents loudness in amplitude (0 to 1 for float samples, 0 to 32767 for short samples). Loudness can also be represented in positive decibels (0 to 84 for short samples, 0 to whatever for float samples). For float samples, decibels are assumed to be equivalent to MIDI velocity; otherwise, MIDI velocity is rescaled according to the maximum dynamic range supported by the sample size. All loudness conversions are driven by sample word size, which must be set before use; the default is 4 (float samples).

Counterpoint

Methods

ABS

AddInterval

ADissonance

AnOctave

AnySpecies

ARRBLT

ASeventh

ASkip

AStep

ATenth

AThird

BadMelody

Bass

Beat8

BestFitFirst

Cantus

Check

CleanRhy

clear

ConsecutiveSkipsInSameDirection

counterpoint

CurRhy

DirectMotionToPerfectConsonance

Doubled

DownBeat

ExtremeRange

fillCantus

FillRhyPat

FirstNote

GoodRhy

initialize

InMode

LastNote

Look

MAX

MIN

MotionType

NextToLastNote

Other

OtherVoiceCheck

OutOfRange

PitchRepeats

RANDOM

SaveIndx

SaveResults

SetUs

Size

SpecialSpeciesCheck

toCsoundScore

TooMuchOfInterval

TotalRange

UpBeat

Us

UsedRhy

VIndex

winners

CounterpointNode

C++ csound::CounterpointNode

Extends: Node

Uses Bill Schottstaedt's species counterpoint generator code to either (a) generate a counterpoint in species 1, 2, or 3 for a cantus firmus selected from notes generated by child nodes, or (b) attempt to correct the voice leading for species 1, 2, or 3 counterpoint in notes generated by child nodes.

Properties

generationMode (C++ csound::CounterpointNode::getGenerationMode)

Returns: int

musicMode (C++ csound::CounterpointNode::getMusicMode)

Returns: int

species (C++ csound::CounterpointNode::getSpecies)

Returns: int

voices (C++ csound::CounterpointNode::getVoices)

Returns: size_t

secondsPerPulse (C++ csound::CounterpointNode::getSecondsPerPulse)

Returns: double

Event

C++ csound::Event

Extends: EigenVectorXd

Methods

clearProperties (csound::Event::clearProperties)

Returns: void

conformToPitchClassSet (csound::Event::conformToPitchClassSet)

Returns: void

createNoteOffEvent (csound::Event::createNoteOffEvent)

ParameterDescription
event

Returns: void

dump (csound::Event::dump)

ParameterDescription
stream

Returns: void

get (csound::Event::get)

ParameterDescription
index

Returns: double &

getAmplitude (csound::Event::getAmplitude)

Returns: double

getChannel (csound::Event::getChannel)

MIDI channel numbers are 0-based, Csound instrument numbers are 1-based.

Returns the Csound instrument number minus 1.

Returns: int

getDepth (csound::Event::getDepth)

Returns: double

getDuration (csound::Event::getDuration)

Returns: double

getFrequency (csound::Event::getFrequency)

Returns: double

getGain (csound::Event::getGain)

Returns: double

getHeight (csound::Event::getHeight)

Returns: double

getInstrument (csound::Event::getInstrument)

MIDI channel numbers are 0-based, Csound instrument numbers are 1-based.

Returns the Csound instrument number.

Returns: double

getKey (csound::Event::getKey)

Returns: double

getKey_tempered (csound::Event::getKey_tempered)

ParameterDescription
tonesPerOctave

Returns: double

getKeyNumber (csound::Event::getKeyNumber)

Returns: int

getLeftGain (csound::Event::getLeftGain)

Returns: double

getMidiStatus (csound::Event::getMidiStatus)

Returns: int

getOffTime (csound::Event::getOffTime)

Returns: double

getPan (csound::Event::getPan)

Returns: double

getPhase (csound::Event::getPhase)

Returns: double

getPitches (csound::Event::getPitches)

Returns: double

getProperties (csound::Event::getProperties)

Returns any properties of this as a string consisting of "key"="value" pairs in CSV format.

Returns: std::string

getProperty (csound::Event::getProperty)

ParameterDescription
name

Returns: std::string

getRightGain (csound::Event::getRightGain)

Returns: double

getStatus (csound::Event::getStatus)

Returns: double

getStatusNumber (csound::Event::getStatusNumber)

Returns: int

getTime (csound::Event::getTime)

Returns: double

getVelocity (csound::Event::getVelocity)

Returns: double

getVelocityNumber (csound::Event::getVelocityNumber)

Returns: int

initialize (csound::Event::initialize)

Returns: void

isMatchingEvent (csound::Event::isMatchingEvent)

ParameterDescription
event

Returns: bool

isMatchingNoteOff (csound::Event::isMatchingNoteOff)

ParameterDescription
event

Returns: bool

isMidiEvent (csound::Event::isMidiEvent)

Returns: bool

isNote (csound::Event::isNote)

Returns: bool

isNoteOff (csound::Event::isNoteOff)

Returns: bool

isNoteOn (csound::Event::isNoteOn)

Returns: bool

operator= (C++ csound::Event::operator)

removeProperty (csound::Event::removeProperty)

ParameterDescription
nameO

Returns: void

set (csound::Event::set)

ParameterDescription
time
duration
status
instrument
key
velocity
phase
pan
depth
height
pitches

Returns: void

setAmplitude (csound::Event::setAmplitude)

ParameterDescription
amplitude

Returns: void

setDepth (csound::Event::setDepth)

ParameterDescription
depth

Returns: void

setDuration (csound::Event::setDuration)

ParameterDescription
duration

Returns: void

setFrequency (csound::Event::setFrequency)

ParameterDescription
frequency

Returns: void

setHeight (csound::Event::setHeight)

ParameterDescription
height

Returns: void

setInstrument (csound::Event::setInstrument)

MIDI channel numbers are 0-based, Csound instrument numbers are 1-based.

Sets the Csound instrument number.

ParameterDescription
instrument

Returns: void

setKey (csound::Event::setKey)

ParameterDescription
key

Returns: void

setOffTime (csound::Event::setOffTime)

ParameterDescription
offTime

Returns: void

setPan (csound::Event::setPan)

ParameterDescription
pan

Returns: void

setPhase (csound::Event::setPhase)

ParameterDescription
phase

Returns: void

setPitches (csound::Event::setPitches)

ParameterDescription
pitches

Returns: void

setProperty (csound::Event::setProperty)

ParameterDescription
name
value

Returns: void

setStatus (csound::Event::setStatus)

ParameterDescription
status

Returns: void

setTime (csound::Event::setTime)

ParameterDescription
time

Returns: void

setVelocity (csound::Event::setVelocity)

ParameterDescription
velocity

Returns: void

temper (csound::Event::temper)

ParameterDescription
divisionsPerOctave

Returns: void

toCsoundIStatement (csound::Event::toCsoundIStatement)

Csound dimensions now are: i_instrument = p1 i_time = p2 i_duration = p3 i_midi_key = p4 i_midi_velocity = p5 k_space_front_to_back = p6 ; Ambisonic X k_space_left_to_right = p7 ; Ambisonic Y k_space_bottom_to_top = p8; Ambisonic Z i_phase = p9 i_pitches = p10 i_homogeneity = p11

optional properties = p12, printed as a string ("'name'='value', ['name'='value']")

ParameterDescription
tempering

Returns: std::string

toCsoundIStatementHeld (csound::Event::toCsoundIStatementHeld)

ParameterDescription
tag
tempering

Returns: std::string

toCsoundIStatementRelease (csound::Event::toCsoundIStatementRelease)

ParameterDescription
tag
tempering

Returns: std::string

toString (csound::Event::toString)

Returns: std::string

copy

Intercut

C++ csound::Intercut

Extends: ScoreNode

The notes produced by each child node are intercut to produce the notes produced by this; e.g.

if there are 3 child nodes, then the notes produced by this are node 0 note 0, node 1 note 0, node 2 note 0; node 0 note 1, node 1 note 1, node node 2 note 1; node 0 note 2, node 1 note 2, node 2 note 2, and so on. If the child nodes do not each produce the same number of notes, then production stops with the last note of the longest child.

HarmonyPoint2

C++ csound::HarmonyPoint2

Extends: EigenVectorXd

Represents a point on a time line in a score space that has a time- harmony subspace.

The point consists of a homogeneous column vector with dimensions:
t Time.
P Set class (or prime form).
I Inversion (or reflection in the origin of pitch space).
T Transposition (or translation in pitch space modulo the octave).
V Permutation of octavewise revoicings within range R.
1 Homogeneity.
At rendering time, the point will be translated to that pitch which most closely matches a pitch-class in that chord defined by P, I, and T.

Properties

t (C++ csound::HarmonyPoint2::get_t)

Returns: double

P (C++ csound::HarmonyPoint2::get_P)

Returns: double

I (C++ csound::HarmonyPoint2::get_I)

Returns: double

T (C++ csound::HarmonyPoint2::get_T)

Returns: double

V (C++ csound::HarmonyPoint2::get_V)

Returns: double

homogeneity (C++ csound::HarmonyPoint2::get_homogeneity)

Returns: double

Methods

operator= (C++ csound::HarmonyPoint2::operator)

initialize (csound::HarmonyPoint2::initialize)

Returns: void

toString (csound::HarmonyPoint2::toString)

Returns: std::string

HarmonyInterpolationPoint2

C++ csound::HarmonyInterpolationPoint2

Represents an interpolation point with scaling factors for a fractal interpolation function in the time-harmony subspace of the score space.

Methods

toString (csound::HarmonyInterpolationPoint2::toString)

Returns: std::string

HarmonyIFS2

C++ csound::HarmonyIFS2

Extends: ScoreNode

HarmonyIFS is a class for doing algorithmic music composition by means of fractal interpolation functions.

Scores are generated as the attractors of iterated function systems (IFS) in a score space that has a harmony subspace, in which time is subdivided such that harmony is a linear progression of time.

Usage:

Call add_interpolation_point several times or more to define the harmony by setting interpolation points for a harmony as a fractal function of time.

Call initialize_hutchinson_operator to mathematically translate the interpolation points to affine transformation matrices in a Hutchinson operator.

Call set_transformation as desired to add additional structure to the IFS that generates the score. Do not set matrix elements that will cause harmony to overlap time other than as specified by the interpolation points. However, pitch, time, instrument, and other dimensions may be transformed as desired.

Call generate_score_attractor with a desired depth of iteration actually generate the score. The HarmonyIFS object may then be included in a music graph, or used as a standalone score generator.

Methods

add_interpolation_point (csound::HarmonyIFS2::add_interpolation_point)

Adds an interpolation point to the graph of the fractal interpolation function.
ParameterDescription
t
P
I
T
V
s_PP
s_PI
s_PT
s_PV
s_IP
s_II
s_IT
s_IV
s_TP
s_TI
s_TT
s_TV
s_VP
s_VI
s_VT
s_VV

Returns: HarmonyInterpolationPoint2

add_interpolation_point_as_chord (csound::HarmonyIFS2::add_interpolation_point_as_chord)

Adds an interpolation point to the graph of the fractal interpolation function.
ParameterDescription
t_
chord
s_PP_
s_PI_
s_PT_
s_PV_
s_IP_
s_II_
s_IT_
s_IV_
s_TP_
s_TI_
s_TT_
s_TV_
s_VP_
s_VI_
s_VT_
s_VV_

Returns: HarmonyInterpolationPoint2

generate_score_attractor (csound::HarmonyIFS2::generate_score_attractor)

Recursively computes the score graph, translates the points to notes, adds them to the score, ties overlapping notes in the score, and rescales the score.

This function should be called before rendering a music graph that contains this node.

ParameterDescription
depth

Returns: void

add_transformation (csound::HarmonyIFS2::add_transformation)

Adds a new affine transformation matrix to the Hutchinson operator.

The value of this matrix is initially the identity matrix.

Returns: Eigen::MatrixXd &

transformation_count (csound::HarmonyIFS2::transformation_count)

Returns the number of affine transformation matrices in the Hutchinson operator of the function system that generates the score.

Returns: int

initialize (csound::HarmonyIFS2::initialize)

Initialize the HarmonyIFS for N voices in a range of MIDI keys for a note duration in seconds.

g is the generator of transposition.

ParameterDescription
voices_
range_
bass_
note_duration_
tie_overlapping_notes
remove_duplicate_notes
g_

Returns: void

initialize_hutchinson_operator (csound::HarmonyIFS2::initialize_hutchinson_operator)

Interpolation points are sorted by time and the corresponding shear transformations for a Hutchinson operator are computed, according to Polychronis Manousopoulos, Vasileios Drakopoulos, and Theoharis Theoharis, "Curve Fitting by Fractal Interpolation.

" In: Transactions on Computational Science 1 (Jan. 2008), pp. 85-103. doi: 10.1007/978-3-540-79299-4_4.

Once this function has been called, the non-shear elements of the transformation matrices may be modified. A warning is issued if the modulus of the scaling submatrix of any transformation is >= 0, indicating it is not contractive.

Returns: void

iterate (csound::HarmonyIFS2::iterate)

Actually computes the score attractor.
ParameterDescription
depth
iteration
index
point

Returns: void

remove_duplicate_notes (csound::HarmonyIFS2::remove_duplicate_notes)

Removes duplicate notes from the generated score.

Returns: void

set_transformation (csound::HarmonyIFS2::set_transformation)

Sets the value of a single matrix element in one of the affine transformation matrices of the Hutchinson operator.

The matrices are homeogenous transformations with 7 dimensions, in column major order. The transformation is by default the identity matrix.

ParameterDescription
transformation
row
column
value

Returns: void

post_process_score (csound::HarmonyIFS2::post_process_score)

Processes the score attractor (the raw notes in the score) to quantize and rescale certain dimensions, and to remove duplicate notes.

Returns: void

KMeansMCRM

C++ csound::KMeansMCRM

Extends: MCRM

Uses k-means clustering to translate the accumulated samples that approximate the measure on the iterated function system implemented by the multiple copy reducing machine algorithm into a specified number of notes.

Methods

deterministic_algorithm (csound::KMeansMCRM::deterministic_algorithm)

Returns: void

iterate (csound::KMeansMCRM::iterate)

ParameterDescription
depth
p
event
weight

Returns: void

means_to_notes (csound::KMeansMCRM::means_to_notes)

Returns: void

random_algorithm (csound::KMeansMCRM::random_algorithm)

Returns: void

Koch

C++ csound::Koch

Extends: ScoreNode

All notes produced by child[N - 1] are rescaled and stacked on top of each note produced by child[N - 2], and so on.

Methods

setPitchOffsetForLayer (csound::Koch::setPitchOffsetForLayer)

ParameterDescription
layer
pitch

Returns: void

Lindenmayer

C++ csound::Lindenmayer

Extends: ScoreNode

This class implements a Lindenmayer system in music space for a turtle that writes either notes into a score, or Jones-Parks grains into a memory soundfile.

The Z dimension of note space is used for chirp rate. The actions of the turtle are rescaled to fit the specified bounding hypercube. The turtle commands are represented by letters (all n default to 1):

G = Write the current state of the turtle into the soundfile as a grain.

Mn = Translate the turtle by adding to its state its step times its orientation times n.

Rabn = Rotate the turtle from dimension a to dimension b by angle 2 pi / (angleCount * n)

Uan = Vary the turtle state on dimension a by a normalized (-1 through +1) uniformly distributed random variable times n.

Gan = Vary the turtle state on dimension a by a normalized (-1 through +1) Gaussian random variable times n.

T=an = Assign to dimension a of the turtle state the value n.

T*an = Multiply dimension a of the turtle state by n.

T/an = Divide dimension a of the turtle state by n.

T+an = Add to dimension a of the turtle state the value n.

T-an = Subtract from dimension a of the turtle state the value n.

S=an = Assign to dimension a of the turtle step the value n.

S*an = Multiply dimension a of the turtle step by n.

S/an = Divide dimension a of the turtle step by n.

S+an = Add to dimension a of the turtle step the value n.

S-an = Subtract from dimension a of the turtle step the value n.

[ = Push the current state of the turtle state onto a stack.

] = Pop the current state of the turtle from the stack.

The abbreviations for the dimensions are:

i = instrument

t = time

d = duration

k = MIDI key number

v = MIDI velocity number

p = phase

x = pan

y = height

z = depth

s = pitch-class set as Mason number

Methods

addRule (csound::Lindenmayer::addRule)

ParameterDescription
command
replacement

Returns: void

generateLocally (csound::Lindenmayer::generateLocally)

Returns: void

getAngle (csound::Lindenmayer::getAngle)

Returns: double

getAxiom (csound::Lindenmayer::getAxiom)

Returns: std::string

getIterationCount (csound::Lindenmayer::getIterationCount)

Returns: int

setAngle (csound::Lindenmayer::setAngle)

ParameterDescription
angle

Returns: void

setAxiom (csound::Lindenmayer::setAxiom)

ParameterDescription
axiom

Returns: void

setIterationCount (csound::Lindenmayer::setIterationCount)

ParameterDescription
count

Returns: void

LispGenerator

C++ csound::LispGenerator

Extends: LispNode

Node that uses Lisp code to generate Events.

LispNode

C++ csound::LispNode

Extends: Node

Base class for Nodes that can use embedded Lisp code to generate or transform Events.

In order to use the Common Music or nudruz packages to do this, first execute the following sequence of calls: csound::initialize_ecl (argc, ( char **)argv);
csound::evaluate_form ( "(require :asdf)" );
csound::evaluate_form ( "(require :nudruz)" );
csound::evaluate_form ( "(in-package :cm)" );

Methods

appendTopLevelForm (csound::LispNode::appendTopLevelForm)

Sets the Lisp code that will generate or transform a Silence score.

Please note, each top-level form must be appended in sequence, e.g. require and in-package should be added before a progn containing score generating forms.

ParameterDescription
code

Returns: void

getStringFromForm (csound::LispNode::getStringFromForm)

ParameterDescription
form

Returns: std::string

getTopLevelForms (csound::LispNode::getTopLevelForms)

Returns: std::vector< std::string > &

LispTransformer

C++ csound::LispTransformer

Extends: LispNode

Node that uses Lisp code to transform Events produced by child Nodes.

MCRM

C++ csound::MCRM

Extends: ScoreNode

Methods

generateLocally (csound::MCRM::generateLocally)

Returns: void

resize (csound::MCRM::resize)

ParameterDescription
transformations

Returns: void

setDepth (csound::MCRM::setDepth)

ParameterDescription
depth

Returns: void

setTransformationElement (csound::MCRM::setTransformationElement)

ParameterDescription
index
row
column
value

Returns: void

setWeight (csound::MCRM::setWeight)

ParameterDescription
precursor
successor
weight

Returns: void

Node

C++ csound::Node

Base class for all music graph nodes in the Silence system.

A music graph consists of a root Node , with any number of child Nodes, which in turn may have any number of child Nodes. To render the music graph, the root Node::traverse function is called, which performs a depth-first recursive traversal of the music graph.

Nodes can transform silence::Events produced by child nodes. Nodes can generate silence::Events.

Nodes can also perform score generation and processing outside of a music graph.

Nodes follow the pattern of initalization with controlling parameters, and then invocation either within a music graph, or by calling Node::generate or Node::transform outside of a music graph.

Methods

addChild (csound::Node::addChild)

Adds an immediate child Node to this.
ParameterDescription
node

Returns: void

childCount (csound::Node::childCount)

Returns the number of immediate children of this.

Returns: size_t

clear (csound::Node::clear)

Recursively clears all child Nodes of this.

Returns: void

createTransform (csound::Node::createTransform)

Returns the identity matrix for score space.

Returns: Eigen::MatrixXd

element (csound::Node::element)

Returns a reference to the indicated element of the local transformation of coordinate system.
ParameterDescription
row
column

Returns: double &

generate (csound::Node::generate)

Optionally generate notes into the score.

The notes must be produced at the coordinate system with origin at zero, and are automatically transformed to the global coordinate system.

ParameterDescription
score_from_this

Returns: void

getChild (csound::Node::getChild)

Returns the immediate child of this at the index.
ParameterDescription
index

Returns: Node *

getLocalCoordinates (csound::Node::getLocalCoordinates)

Returns the local transformation of coordinate system.

Returns: Eigen::MatrixXd

setElement (csound::Node::setElement)

Sets the indicated element of the local transformation of coordinate system.
ParameterDescription
row
column
value

Returns: void

transform (csound::Node::transform)

Optionally transform any or all notes produced by child nodes of this, which are in the score and in the global coordinate system.

The default implementation does nothing. Additional notes may also be generated.

ParameterDescription
score_from_children

Returns: void

traverse (csound::Node::traverse)

The default implementation postconcatenates its own local coordinate system with the global coordinates, then passes the score and the product of coordinate systems to each child, thus performing a depth-first traversal of the music graph.

In case a derived class needs to apply a different local transformation to each child node's notes, this method must be overridden. After child nodes have been traversed, notes generated by the child nodes are passed to the transform method of this, and the resulting notes appended to the gobal score; then an empty score is passed to the generate method of this, and the resulting notes appended to the global score.

ParameterDescription
global_coordinates
global_score

Returns: void

Random

C++ csound::Random

Extends: Node

A random value will be sampled from the specified distribution, translated and scaled as specified, and set in the specified row and column of the local coordinates.

The resulting matrix will be used in place of the local coordinates when traversing the music graph. If eventCount is greater than zero, a new event will be created for each of eventCount samples, which will be transformed by the newly sampled local coordinates.

Methods

createDistribution (csound::Random::createDistribution)

ParameterDescription
distribution

Returns: void

getRandomCoordinates (csound::Random::getRandomCoordinates)

Returns: Eigen::MatrixXd

sample (csound::Random::sample)

Returns: double

RemoveDuplicates

C++ csound::RemoveDuplicates

Extends: Node

Removes all duplicate events produced by the child nodes of this.

Rescale

C++ csound::Rescale

Extends: Node

Rescales all child events to fit a bounding hypercube in music space.

No, some, or all dimensions may be rescaled to fit the minimum alone, the range alone, or both the minimum and the range.

Methods

initialize (csound::Rescale::initialize)

Returns: void

setRescale (csound::Rescale::setRescale)

ParameterDescription
dimension
rescaleMinimum
rescaleRange
targetMinimum
targetRange

Returns: void

Scale

C++ csound::Scale

Extends: Chord

Scale as a class; must be created with the name of the scale.

Inherits from Chord . Note that inherited Chord member functions such as T and I return Chords, not Scales.

Methods

conform_with_alteration (csound::Scale::conform_with_alteration)

Moves the pitch (MIDI key number in 12TET) of the event to the nearest pitch-class of the chord implied by the scale degree, number of voices, and interval in chord steps between chord tones (defaulting to 3).

If the alteration parameter is used, the pitch of the event is first moved to the nearest pitch-class of the chord implied by the scale degree, number of voices, and interval; this tone is then altered (plus or minus) by the number of semitones specified by the alteration parameter (default 0). All operations are performed under octave equivalence.

ParameterDescription
event
scale_degree
voices
interval
alteration

Returns: void

conform_with_interval (csound::Scale::conform_with_interval)

ParameterDescription
event
scale_degree
voices
interval

Returns: void

conform (csound::Scale::conform)

ParameterDescription
event
scale_degree
voices

Returns: void

chord (csound::Scale::chord)

Returns the chord for the indicated scale degree, number of voices in the chord, and interval in scale degrees of the chord (defaults to thirds, or 3; the actual number of scale steps between chord pitches is interval - 1).
ParameterDescription
scale_degree
voices
interval

Returns: Chord

degree (csound::Scale::degree)

Returns the scale degree of the Chord in this Scale ; if the Chord does not belong to this Scale , -1 is returned.
ParameterDescription
chord_
interval

Returns: int

set_ratio (csound::Scale::set_ratio)

Sets the pitch of the specified voice of this as a (possibly fractional) MIDI key number, derived from the specified frequency ratio.

The Scale must first have enough voices to hold all pitches set in this way.

ParameterDescription
voice
numerator
denominator

Returns: void

from_scala (csound::Scale::from_scala)

Recreates this Scale with a new name as a set of pitches from the text of a Scala file.

Note that the tonic of the scale is always MIDI key 0 (C-1)! Thus to have, e.g., a D-1 just intonation scale, one would create the default C-1 just intonation scale, then add 2 to each pitch.

ParameterDescription
name
scala

Returns: void

getTypeName (csound::Scale::getTypeName)

Returns the type name, e.g.

"major" or "whole tone," of this. This name will probably be invalid if the interval structure of this has been changed, e.g. by inversion.

Returns: std::string

modulations (csound::Scale::modulations)

Returns a list of common modulations, that is, other major or harmonic minor Scales to which the Chord belongs; optionally the Chord can first be resized (e.g.

from a 9th chord to a triad) in order to find more or fewer possible modulations.

ParameterDescription
chord

Returns: std::vector< Scale >

modulations_for_voices (csound::Scale::modulations_for_voices)

ParameterDescription
chord
voices

Returns: std::vector< Scale >

modulations_for_scale_types (csound::Scale::modulations_for_scale_types)

For any Chord belonging to this Scale , returns in the argument a list of other Scales to which that Chord also belongs.

Switching to one of these Scales will perform some sort of modulation. The list of scale type names restricts the types of Scale that will be returned.

ParameterDescription
result
current_chord
voices_
type_names

Returns: void

relative_tonicizations (csound::Scale::relative_tonicizations)

Returns a list of common relative tonicizations for the Chord , that is, the other major or harmonic minor Scales for which that Chord could be mutated to have the secondary function.

If that is not possible, an empty result is returned.

ParameterDescription
current_chord
secondary_function
voices

Returns: std::vector< Scale >

relative_tonicizations_for_scale_types (csound::Scale::relative_tonicizations_for_scale_types)

Returns the relative tonicizations of the Chord , that is, the scales for which that Chord could be mutated to have the secondary function, if that is possible.

The list of scale types is used to restrict the types of Scales that are returned.

ParameterDescription
result
current_chord
secondary_function
voices
type_names

Returns: void

secondary (csound::Scale::secondary)

Returns the current Chord mutated, if possible, to one or more function(s) with respect to another Chord in its Scale .

Not "secondary function of this chord," but "this chord as secondary
function of another (tonicized) chord." If that is not possible, an empty Chord is returned. The number of voices defaults to that of the current Chord . Can be used to generate secondary dominants (function = 5), secondary supertonics (function = 2), secondary submediants (function = 6), and so on. It is then up to the user to perform an appropriate progression by number of scale degrees in the original Scale .

ParameterDescription
current_chord
secondary_function
voices_

Returns: std::vector< Chord >

secondary_to_degree (csound::Scale::secondary_to_degree)

Returns the current Chord mutated, if possible, have the specified function with respect to the target scale degree of the Scale .

Not "secondary function of this chord," but "this chord as secondary
function of another (tonicized) chord." The number of voices defaults to that of the current Chord . Can be used to generate secondary dominants (function = 5), secondary supertonics (function = 2), secondary submediants (function = 6), and so on. It is then up to the user to perform an appropriate progression by number of scale degrees in the original Scale . If no such mutation can be found, nothing is done; i.e., the current Chord is returned.

ParameterDescription
current_chord
secondary_function
target_degree
chord_voices

Returns: Chord

semitones_for_degree (csound::Scale::semitones_for_degree)

Returns the number of semitones (may be whole or fractional) from the tonic (as 0) of this Scale to the indicated scale degree, which is wrapped around by octave equivalence.
ParameterDescription
scale_degree

Returns: double

tonic (csound::Scale::tonic)

Returns the pitch-class that is the tonic or root of this Scale .

Returns: double

tonicizations (csound::Scale::tonicizations)

Returns all major or minor Scales for which the current Chord is the tonic (scale degree 1).

The number of voices defaults to that of the current Chord , but may be larger or smaller.

NOTE: Here, tonicizations are modulations in which the Chord has degree 1, i.e. is the tonic chord.

ParameterDescription
current_chord
voices

Returns: std::vector< Scale >

transpose (csound::Scale::transpose)

Returns a copy of this Scale transposed by the indicated number of semitones .
ParameterDescription
semitones

Returns: Scale

transpose_degrees (csound::Scale::transpose_degrees)

Returns a Chord transposed by the indicated number of scale degrees ; the chord as passed must belong to this Scale , and the interval must be the same as that used to generate the Chord ; (defaults to thirds, or 3; the actual number of scale steps between chord pitches is interval - 1).
ParameterDescription
chord
scale_degrees
interval

Returns: Chord

transpose_to_degree (csound::Scale::transpose_to_degree)

Returns a copy of this Scale transposed to the indicated scale degree .
ParameterDescription
degrees

Returns: Scale

Score

C++ csound::Score

Base class for collections of events in music space.

Can order events by time.

The implementation is a std::vector of Events. The elements of the vector are value objects, not references.

Methods

add (csound::Score::add)

ParameterDescription
time
duration
status
instrument
key
velocity
phase
pan
depth
height
pitches

Returns: void

append (C++ csound::Score::append_note)

ParameterDescription
time
duration
status
instrument
key
velocity
phase
pan
depth
height
pitches

Returns: void

append_event (csound::Score::append_event)

ParameterDescription
event

Returns: void

arrange_all (csound::Score::arrange_all)

ParameterDescription
oldInstrumentNumber
newInstrumentNumber
gain
pan

Returns: void

clear (csound::Score::clear)

findScale (csound::Score::findScale)

Returns: void

get (csound::Score::get)

ParameterDescription
index

Returns: Event &

getCsoundScore (csound::Score::getCsoundScore)

Translate the Silence events in this to a Csound score, that is, to a list of i statements.

The Silence events are rounded off to the nearest equally tempered pitch by the specified number of tones per octave; if this argument is zero, the pitch is not tempered. The Silence events are conformed to the nearest pitch-class set in the pitch-class set dimension of the event, if the conform pitches argument is true; otherwise, the pitches are not conformed.

ParameterDescription
tonesPerOctave
conformPitches

Returns: std::string

getDuration (csound::Score::getDuration)

Returns the time from the beginning of the earliest-starting event to the ending of the last-ending event.

Does not assume that events are sorted, or that all no events start earlier than time 0.

Returns: double

getEventsDuration (csound::Score::getEventsDuration)

Returns the last off time minus the first on time (which can be less than 0).

Returns: double

getFirstOnTime (csound::Score::getFirstOnTime)

Returns the first on time.

Returns: double

getLastOffTime (csound::Score::getLastOffTime)

Returns the last off time.

Returns: double

getDurationFromZero (csound::Score::getDurationFromZero)

Returns the time from time 0 to the final off time.

Does not assume that events are sorted, or that no events start earlier than time 0.

Returns: double

getPitches (csound::Score::getPitches)

Return a vector containing the MIDI key numbers in the specified segment of the score.
ParameterDescription
begin
end
divisionsPerOctave

Returns: std::vector< double >

getPT (csound::Score::getPT)

For the specified segment of the score, return the indexes for the prime chord and its transposition, within the specified range.

See: http://ruccas.org/pub/Gogins/music_atoms.pdf

ParameterDescription
begin
end
lowest
range
divisionsPerOctave

Returns: std::vector< double >

getPTV (csound::Score::getPTV)

For the specified segment of the score, return the indexes for the prime chord, its transposition, and their voicing within the specified range.

Each of these indexes forms an additive cyclic group.

See: http://ruccas.org/pub/Gogins/music_atoms.pdf

ParameterDescription
begin
end
lowest
range
divisionsPerOctave

Returns: std::vector< double >

getRescaleMinima (csound::Score::getRescaleMinima)

Returns: std::vector< bool > &

getRescaleRanges (csound::Score::getRescaleRanges)

Returns: std::vector< bool > &

getScaleActualMinima (csound::Score::getScaleActualMinima)

Returns: const Event &

getScaleActualRanges (csound::Score::getScaleActualRanges)

Returns: const Event &

getScaleTargetMinima (csound::Score::getScaleTargetMinima)

Returns: Event &

getScaleTargetRanges (csound::Score::getScaleTargetRanges)

Returns: Event &

getVoicing (csound::Score::getVoicing)

Iterate over each note from the beginning to end of the segment; sort the unique pitches; return those unique pitches which also have unique pitch-class sets, in order from lowest to highest in pitch; this has the effect of returning the "inversion" or "voicing", in the musician's informal sense, of the pitches in that segment of the score.
ParameterDescription
begin
end
divisionsPerOctave

Returns: std::vector< double >

indexAfterTime (csound::Score::indexAfterTime)

Return the index of the first event after the specified time, that is return "end" for the time; if the time is not found, return the size of the score.

Iterating from indexAtTime(t1) to indexAfterTime(t2) is guaranteed to iterate over all and only those events included from and including t1 and up to but not including t2.

ParameterDescription
time

Returns: int

indexAtTime (csound::Score::indexAtTime)

Return the index of the first event at or after the specified time, that is, return "begin" for the time; if the time is not found, return the size of the score.

Iterating from indexAtTime(t1) to indexAfterTime(t2) is guaranteed to iterate over all and only those events included between t1 and t2.

ParameterDescription
time

Returns: int

indexToTime (csound::Score::indexToTime)

Return the time of the first event at or after the specified index; if the index is not found, return DBL_MAX.
ParameterDescription
index

Returns: double

initialize (csound::Score::initialize)

Returns: void

load (C++ csound::Score::load_filename)

ParameterDescription
filename

Returns: void

process (csound::Score::process)

Calls Event::process on all Events in this.

Returns: void

remove (csound::Score::remove)

ParameterDescription
index

Returns: void

removeArrangement (csound::Score::removeArrangement)

Remove instrument number, gain, and pan assignments.

Returns: void

rescale (csound::Score::rescale)

ParameterDescription
dimension
rescaleMinimum
minimum
rescaleRange
range

Returns: void

save (C++ csound::Score::save_filename)

ParameterDescription
filename

Returns: void

setDuration (csound::Score::setDuration)

Multiply existing times and durations by (targetDuration / getDuration() ), i.e.

stretch or shrink musical time.

ParameterDescription
targetDuration

Returns: void

setDurationFromZero (csound::Score::setDurationFromZero)

ParameterDescription
targetDuration

Returns: void

setK (csound::Score::setK)

Find the non-unique pitch-class set of the prior segment; invert the set such that the inversion's first two pitch-classes are exchanged from the origina; conform the pitches of the current segment to that inversion.
ParameterDescription
priorBegin
begin
end
base
range

Returns: void

setKL (csound::Score::setKL)

Find the non-unique pitch-class set of the prior segment; invert the set such that the inversion's first two pitch-classes are exchanged from the original; conform the pitches of the current segment to that inversion, using the closest voice-leading from the pitches of the prior segment, optionally avoiding parallel fifths.
ParameterDescription
priorBegin
begin
end
base
range
avoidParallels

Returns: void

setKV (csound::Score::setKV)

Find the non-unique pitch-class set of the prior segment; invert the set such that the inversion's first two pitch-classes are exchanged from the original; conform the pitches of the current segment to that inversion, with voicing V.
ParameterDescription
priorBegin
begin
end
V
base
range

Returns: void

setPerformanceDuration (csound::Score::setPerformanceDuration)

Rescales Event times for performance, i.e.

such that the first on time is 0, and getEventsDuration returns the target duration.

ParameterDescription
target_duration

Returns: void

setPitchClassSet (csound::Score::setPitchClassSet)

Set the pitches of the specified segment of the score to the specified pitch-class set.

Each pitch in the score is moved to the closest pitch-class in the specified set.

ParameterDescription
begin
end
pcs
divisionsPerOctave

Returns: void

setPitches (csound::Score::setPitches)

Set the pitches of the specified segment of the score to the specified pitches.

Each pitch in the score is moved to the closest pitch in the specified pitches.

ParameterDescription
begin
end
pitches

Returns: void

setPT (csound::Score::setPT)

For the specified segment of the score, adjust the pitches to match the specified indexes for the prime chord and its transposition within the specified range.

See: http://ruccas.org/pub/Gogins/music_atoms.pdf

ParameterDescription
begin
end
prime
transposition
lowest
range
divisionsPerOctave

Returns: void

setPTV (csound::Score::setPTV)

For the specified segment of the score, adjust the pitches to match the specified indexes for the prime chord, its transposition, and their voicing within the specified range.

Each of these indexes forms an additive cyclic group.

See: http://ruccas.org/pub/Gogins/music_atoms.pdf

ParameterDescription
begin
end
prime
transposition
voicing
lowest
range
divisionsPerOctave

Returns: void

setQ (csound::Score::setQ)

Find the non-unique pitch-class set of the prior segment; transpose the set up by Q if the set is a T-form of the context, or down by Q if the set is an I-form of the context; then conform the pitches of the current segment to that set.

The context will be reduced or doubled as required to match the cardinality of the set.

ParameterDescription
priorBegin
begin
end
Q
context
base
range

Returns: void

setQL (csound::Score::setQL)

Find the non-unique pitch-class set of the prior segment; transpose the set up by Q if the set is a T-form of the context, or down by Q if the set is an I-form of the context; then conform the pitches of the segment to that set, using the closest voice-leading from the pitches of the prior segment, optionally avoiding parallel fifths.

The context will be reduced or doubled as required to match the cardinality of the set.

ParameterDescription
priorBegin
begin
end
Q
context
base
range
avoidParallels

Returns: void

setQV (csound::Score::setQV)

Find the non-unique pitch-class set of the prior segment; transpose the set up by Q if the set is a T-form of the context, or down by Q if the set is an I-form of the context; then conform the pitches of the current segment to that set, with the voicing V.

The context will be reduced or doubled as required to match the cardinality of the set.

ParameterDescription
priorBegin
begin
end
Q
context
V
base
range

Returns: void

setScale (csound::Score::setScale)

ParameterDescription
score
dimension
rescaleMinimum
rescaleRange
beginAt
endAt
targetMinimum
targetRange

Returns: void

setVoicing (csound::Score::setVoicing)

Move the pitches in the segment as little as possible to make them have the same ordering of pitch-class sets as the voicing, from the bottom to the top of the range.

This has the effect of "inverting" or "re-voicing", in the musician's informal sense, the pitches in that segment of the score.

ParameterDescription
begin
end
voicing
range
divisionsPerOctave

Returns: void

sort (csound::Score::sort)

Sort all events in the score by time, instrument number, pitch, duration, loudness, and other dimensions as given by Event::SORT_ORDER .

Returns: void

temper (csound::Score::temper)

Confirm pitches in this score to the closest pitch in the indicated system of equal temperament.
ParameterDescription
tonesPerOctave

Returns: void

tieOverlappingNotes (csound::Score::tieOverlappingNotes)

If the score contains two notes of the same pitch and loudness greater than 0 that overlap in time, extend the earlier note and discard the later note.
ParameterDescription
considerInstrumentNumber

Returns: void

toString (csound::Score::toString)

Returns: std::string

voicelead (C++ csound::Score::voicelead_segments)

ParameterDescription
beginSource
endSource
beginTarget
endTarget
lowest
range
avoidParallelFifths
divisionsPerOctave

Returns: void

voicelead_pitches (csound::Score::voicelead_pitches)

ParameterDescription
beginSource
endSource
beginTarget
endTarget
targetPitches
lowest
range
avoidParallelFifths
divisionsPerOctave

Returns: void

size (csound::Score::size)

ChordScore

C++ csound::ChordScore

Extends: Score

Score equipped with chords.

The notes in the score may be conformed to the chord that obtains at the time of the notes. The times and durations of notes and chords are rescaled together. This is done by finding minimum and maximum times by counting both note times and chord times.

Properties

harmonies_for_times (csound::ChordScore::harmonies_for_times)

Returns: std::map< double, HarmonyEntry >

Methods

conformToChords (csound::ChordScore::conformToChords)

Conforms each note using the harmony entry from getHarmony at that note's onset time.

The octave_equivalence flag applies only to entries inserted with insertChord(time, chord) and mode Default.

ParameterDescription
tie_overlaps
octave_equivalence

Returns: void

getChord (csound::ChordScore::getChord)

Returns the most recent timeline chord at or before time_ , or if none exists, the soonest chord after time_ .

Returns the chord that governs harmony at the given time: the timeline entry at or before time_ , or if none exists, the soonest entry after time_ .

Null if the timeline is empty.

Returns null if the timeline is empty.

ParameterDescription
time_

Returns: Chord *

getHarmony (csound::ChordScore::getHarmony)

Returns the most recent harmony entry at or before time_ , or if none exists, the soonest entry after time_ .

Null if the timeline is empty.

ParameterDescription
time_

Returns: HarmonyEntry *

gatherSoundingChord (csound::ChordScore::gatherSoundingChord)

Returns pitches of notes sounding at time , considering score events with onset in [ prior_harmony_time , time ) whose off time is after time .
ParameterDescription
score
prior_harmony_time
time

Returns: Chord

insertChord (csound::ChordScore::insertChord)

Records a reference chord on the harmony timeline with mode Default.
ParameterDescription
tyme
chord

Returns: void

insertChordWithMode

insertFunctionalHarmony (csound::ChordScore::insertFunctionalHarmony)

Records functional harmony at scale_degree of scale with mode Hd or Hds .
ParameterDescription
tyme
scale
scale_degree
voices
mode
voice_leading_range

Returns: void

getTimelineDuration (C++ csound::ChordScore::getDuration)

Returns the time from the beginning of the earliest-starting event to the ending of the last-ending event.

Does not assume that events are sorted, or that all no events start earlier than time 0.

Returns: double

setTimelineDuration (C++ csound::ChordScore::setDuration)

Multiply existing times and durations by (targetDuration / getDuration() ), i.e.

stretch or shrink musical time.

ParameterDescription
targetDuration

Returns: void

setScale (csound::ChordScore::setScale)

ParameterDescription
score
dimension
rescaleMinimum
rescaleRange
beginAt
endAt
targetMinimum
targetRange

Returns: void

ScoreModel

C++ csound::ScoreModel

Extends: Composition

Base class for compositions that use the principle of a music graph to generate a score.

A music graph is a directed acyclic graph of nodes including empty nodes, nodes that contain only child nodes, score nodes, event generator nodes, event transformer nodes, and others. Each node is associated with a local transformation of coordinate system in music space using a 12 x 12 homogeneous matrix. To generate the score, the music graph is traversed depth first, and each node postconcatenates its local transformation of coordinate system with the coordinate system of its parent to derive a new local coordinate system, which is applied to all child events.

Methods

addChild (csound::ScoreModel::addChild)

Adds an immediate child Node to this.
ParameterDescription
node

Returns: void

childCount (csound::ScoreModel::childCount)

Returns the number of immediate children of this.

Returns: size_t

clear (csound::ScoreModel::clear)

Clears the score.

Returns: void

createTransform (csound::ScoreModel::createTransform)

Returns the identity matrix for score space.

Returns: Eigen::MatrixXd

element (csound::ScoreModel::element)

Returns a reference to the indicated element of the local transformation of coordinate system.
ParameterDescription
row
column

Returns: double &

getChild (csound::ScoreModel::getChild)

Returns the immediate child of this at the index.
ParameterDescription
index

Returns: Node *

getLocalCoordinates (csound::ScoreModel::getLocalCoordinates)

Returns the local transformation of coordinate system.

Returns: Eigen::MatrixXd

getThisNode (csound::ScoreModel::getThisNode)

Returns the address of this as a Node pointer.

Returns: Node *

initialize (csound::ScoreModel::initialize)

Returns: void

setElement (csound::ScoreModel::setElement)

Sets the indicated element of the local transformation of coordinate system.
ParameterDescription
row
column
value

Returns: void

transform (csound::ScoreModel::transform)

Optionally transform any or all notes produced by child nodes of this, which are in the score and in the global coordinate system.

The default implementation does nothing. Additional notes may also be generated.

ParameterDescription
score_from_children

Returns: void

traverse (csound::ScoreModel::traverse)

The default implementation postconcatenates its own local coordinate system with the global coordinates, then passes the score and the product of coordinate systems to each child, thus performing a depth-first traversal of the music graph.

In case a derived class needs to apply a different local transformation to each child node's notes, this method must be overridden. After child nodes have been traversed, notes generated by the child nodes are passed to the transform method of this, and the resulting notes appended to the gobal score; then an empty score is passed to the generate method of this, and the resulting notes appended to the global score.

ParameterDescription
global_coordinates
global_score

Returns: void

ScoreNode

C++ csound::ScoreNode

Extends: Node

Node class that produces events from the contained score, which can be built up programmatically or imported from a standard MIDI file.

Methods

getScore (csound::ScoreNode::getScore)

Returns: Score &

Sequence

C++ csound::Sequence

Extends: Node

Node that creates a temporal sequence of child nodes.

Stack

C++ csound::Stack

Extends: ScoreNode

The notes produced by each (not all) child node, are rescaled to all start at the same time, and last for the same duration; that of the 0th child, or a specified duration.

Properties

duration (C++ csound::Stack::getDuration)

Returns: double

StrangeAttractor

C++ csound::StrangeAttractor

Extends: ScoreNode

Generates notes by searching for a chaotic dynamical system defined by a polynomial equation or partial differential equation using Julien C.

Sprott's Lyupanov exponent search, or by translating a known chaotic dynamical system into music, by interpreting each iteration of the system as a note. The time of the note can be represented either as the order of iteration, or as a dimension of the attractor. See Julien C. Sprott's book "Strange Attractors".

Methods

calculateFractalDimension (csound::StrangeAttractor::calculateFractalDimension)

Returns: void

calculateLyupanovExponent (csound::StrangeAttractor::calculateLyupanovExponent)

Returns: void

codeRandomize (csound::StrangeAttractor::codeRandomize)

Returns: void

evaluateAttractor (csound::StrangeAttractor::evaluateAttractor)

Returns: bool

generateLocally (csound::StrangeAttractor::generateLocally)

Returns: void

getAttractorType (csound::StrangeAttractor::getAttractorType)

Returns: int

getCode (csound::StrangeAttractor::getCode)

Returns: std::string

getCoefficients (csound::StrangeAttractor::getCoefficients)

Returns: void

getDimensionAndOrder (csound::StrangeAttractor::getDimensionAndOrder)

Returns: void

getDimensionCount (csound::StrangeAttractor::getDimensionCount)

Returns: int

getFractalDimension (csound::StrangeAttractor::getFractalDimension)

Returns: double

getIteration (csound::StrangeAttractor::getIteration)

Returns: size_t

getIterationCount (csound::StrangeAttractor::getIterationCount)

Returns: size_t

getLyupanovExponent (csound::StrangeAttractor::getLyupanovExponent)

Returns: double

getNormalizedW (csound::StrangeAttractor::getNormalizedW)

Returns: double

getNormalizedX (csound::StrangeAttractor::getNormalizedX)

Returns: double

getNormalizedY (csound::StrangeAttractor::getNormalizedY)

Returns: double

getNormalizedZ (csound::StrangeAttractor::getNormalizedZ)

Returns: double

getScoreType (csound::StrangeAttractor::getScoreType)

Returns: int

getW (csound::StrangeAttractor::getW)

Returns: double

getX (csound::StrangeAttractor::getX)

Returns: double

getY (csound::StrangeAttractor::getY)

Returns: double

getZ (csound::StrangeAttractor::getZ)

Returns: double

initialize (csound::StrangeAttractor::initialize)

Returns: void

iterate (csound::StrangeAttractor::iterate)

Returns: void

iterate_without_rendering (csound::StrangeAttractor::iterate_without_rendering)

Iterates an already found chaotic system one step, without rendering to the score.

This is useful for driving external score generators. Returns true if the system has settled onto the attractor, or false otherwise.

Returns: bool

reinitialize (csound::StrangeAttractor::reinitialize)

Returns: void

render (csound::StrangeAttractor::render)

ParameterDescription
N
X
Y
Z
W

Returns: void

reset (csound::StrangeAttractor::reset)

Returns: void

searchForAttractor (csound::StrangeAttractor::searchForAttractor)

Returns: bool

setAttractorType (csound::StrangeAttractor::setAttractorType)

Types: 1 = 1-dimensional polynomial map, 2 = 2-dimensional polynomial map, 3 = 3-dimensional polynomial map, 4 = 4-dimensional polynomial map, 5 = 3-dimensional ODE, 6 = 4-dimensional ODE, 7 through 12 = special functions.
ParameterDescription
attractorType

Returns: void

setCode (csound::StrangeAttractor::setCode)

ParameterDescription
code

Returns: void

setDimensionCount (csound::StrangeAttractor::setDimensionCount)

ParameterDescription
D

Returns: void

setIteration (csound::StrangeAttractor::setIteration)

ParameterDescription
iteration

Returns: void

setIterationCount (csound::StrangeAttractor::setIterationCount)

ParameterDescription
iterationCount

Returns: void

setScoreType (csound::StrangeAttractor::setScoreType)

ParameterDescription
attractorType

Returns: void

setW (csound::StrangeAttractor::setW)

ParameterDescription
X

Returns: void

setX (csound::StrangeAttractor::setX)

ParameterDescription
X

Returns: void

setY (csound::StrangeAttractor::setY)

ParameterDescription
X

Returns: void

setZ (csound::StrangeAttractor::setZ)

ParameterDescription
X

Returns: void

shuffleRandomNumbers (csound::StrangeAttractor::shuffleRandomNumbers)

Returns: void

specialFunctions (csound::StrangeAttractor::specialFunctions)

Returns: void

System

C++ csound::System

Abstraction layer for a minimal set of system services.

Voicelead

C++ csound::Voicelead

This class contains facilities for voiceleading, harmonic progression, and identifying chord types.

See: http://ruccas.org/pub/Gogins/music_atoms.pdf

Methods

addOctave (csound::Voicelead::addOctave)

Add an octave to a voicing; can be iterated to enumerate the voicings of a chord.

The lowest voicing must initially be set equal to the original voicing. The algorithm treats a chord as a 'numeral' that increments with a radix equal to the number of octaves in the total range of pitches. Returns an empty voicing if adding an octave would create a voicing that exceeds the maximum pitch, i.e. when the highest-order voice needs to 'carry.'

ParameterDescription
lowestVoicing
newVoicing
maximumPitch
divisionsPerOctave

Returns: bool

areParallel (csound::Voicelead::areParallel)

ParameterDescription
chord1
chord2

Returns: bool

chordToPTV (csound::Voicelead::chordToPTV)

Return the voiced chord for the prime chord index P, transposition T, and voicing index V within the specified range for the indicated number of tones per octave.

The algorithm finds the zero voicing (the lowest octave transposition of the normal chord of the chord that is no lower than the lowest pitch, which has voicing index V = 0) and the zero iterator (the lowest (in all voices) unordered voicing of the chord that is no lower (in all voices) than the lowest pitch, which has enumeration index = 0). Thus, the V of a voicing equals the enumeration index of that voicing minus the enumeration index of the zero voicing. The algorithm enumerates the voicings until the chord is matched.

ParameterDescription
chord
lowestPitch
highestPitch
divisionsPerOctave

Returns: std::vector< double >

closer (csound::Voicelead::closer)

Return the closer, first by smoothness then by simplicity., of the voiceleadings between source and either destination1 or destination2, optionally avoiding parallel fifths.
ParameterDescription
source
destination1
destination2
avoidParallels

Returns: const std::vector< double > &

closest (csound::Voicelead::closest)

Return the closest voiceleading within the specified range, first by smoothness then by simplicity, between the source chord any of the destination chords, optionally avoiding parallel fifths.
ParameterDescription
source
destinations
avoidParallels

Returns: const std::vector< double >

closestPitch (csound::Voicelead::closestPitch)

Return the pitch in pitches that is closest to the specified pitch.
ParameterDescription
pitch
pitches

Returns: double

conformToPitchClassSet (csound::Voicelead::conformToPitchClassSet)

Return the pitch that results from making the minimum adjustment to the pitch-class of the pitch argument that is required to make its pitch-class the same as one of the pitch-classes in the pitch-class set argument.

I.e., "round up or down" to make the pitch fit into a chord or scale.

ParameterDescription
pitch
pcs
divisionsPerOctave

Returns: double

cToM (csound::Voicelead::cToM)

Return M = sum over pitch-classes of (2 ^ pitch-class) (multiplicative monoid for pitch-class sets) for C = (sum over pitch-classes of (pitch-class ^ 2)) - 1 (additive cyclic group for non-empty pitch-class sets).
ParameterDescription
C
divisionsPerOctaven

Returns: double

cToP (csound::Voicelead::cToP)

Return C = (sum over pitch-classes of (pitch-class ^ 2)) - 1 (additive cyclic group for non-empty pitch-class sets) for P = index of prime chords.

If an exact match is not found the closest match is returned.

ParameterDescription
C
divisionsPerOctave

Returns: double

euclideanDistance (csound::Voicelead::euclideanDistance)

Return the Euclidean distance between two chords, which must have the same number of voices.
ParameterDescription
chord1
chord2

Returns: double

I (csound::Voicelead::I)

Return the pitch-class inversion of pitch p by n semitones.
ParameterDescription
p
n

Returns: double

I_vector (csound::Voicelead::I_vector)

Return the pitch-class inversion of chord c by n semitones.
ParameterDescription
c
n

Returns: std::vector< double >

Iform (csound::Voicelead::Iform)

Return whether chord Y is an inverted form of chord X; g is the generator of inversions.
ParameterDescription
X
Y
g

Returns: bool

initializePrimeChordsForDivisionsPerOctave (csound::Voicelead::initializePrimeChordsForDivisionsPerOctave)

ParameterDescription
divisionsPerOctave

Returns: void

inversions (csound::Voicelead::inversions)

Return as many inversions of the pitch-classes in the chord as there are voices in the chord.
ParameterDescription
chord

Returns: std::vector< std::vector< double > >

invert (csound::Voicelead::invert)

Invert by rotating the chord and adding an octave to its last pitch.
ParameterDescription
chord

Returns: std::vector< double >

K (csound::Voicelead::K)

Invert chord c by exchange.
ParameterDescription
c

Returns: std::vector< double >

mToC (csound::Voicelead::mToC)

Return C = (sum over pitch-classes of (pitch-class ^ 2)) - 1 (additive cyclic group for non-empty pitch-class sets) for M = sum over pitch-classes of (2 ^ pitch-class) (multiplicative monoid for pitch-class sets).
ParameterDescription
M
divisionsPerOctave

Returns: double

mToPitchClassSet (csound::Voicelead::mToPitchClassSet)

Convert a pitch-class set number M = sum over pitch-classes of (2 ^ pitch-class) to a pitch-class set chord.
ParameterDescription
pcn
divisionsPerOctave

Returns: std::vector< double >

nameToC (csound::Voicelead::nameToC)

Return C = (sum over pitch-classes of (pitch-class ^ 2)) - 1 (additive cyclic group for pitch-class sets) for the named pitch-class set.
ParameterDescription
name
divisionsPerOctave_

Returns: double

nonBijectiveVoicelead (csound::Voicelead::nonBijectiveVoicelead)

Return the closest crossing-free, non-bijective voiceleading from the source chord to the pitch-classes in the target chord, using Dimitri Tymoczko's linear programming algorithm.

Because voices can be doubled, the source chord is returned along with result. The algorithm does not avoid parallel motions, and does not maintain the original order of the voices. The return value contains the original chord, the voiceleading vector, and the resulting chord, in that order.

ParameterDescription
sourceChord
targetPitchClassSet
divisionsPerOctave

Returns: std::vector< std::vector< double > >

normalChord (csound::Voicelead::normalChord)

Return the normal chord: that inversion of the pitch-classes in the chord which is closest to the orthogonal axis of the Tonnetz for that chord.

Similar to, but not identical with, "normal form."

ParameterDescription
chord

Returns: std::vector< double >

orderedPcs (csound::Voicelead::orderedPcs)

Return a copy of the chord where each pitch is replaced by its corresponding pitch-class.

The voices remain in their original order.

ParameterDescription
chord
divisionsPerOctave

Returns: std::vector< double >

pAndTtoPitchClassSet (csound::Voicelead::pAndTtoPitchClassSet)

Convert a prime chord number and transposition to a pitch-class set.
ParameterDescription
prime
transposition
divisionsPerOctave

Returns: std::vector< double >

pc (csound::Voicelead::pc)

Return the pitch-class of the pitch.

Pitch is measured in semitones, and the octave is always 12 semitones, so the pitch-class is the pitch modulo 12. If the pitch is an integral number of semitones, and the number of divisions per octave is also 12, then the pitch-class of a pitch is an integer. If the pitch is not an integral number of semitones, or the number of divisions per octave is not 12, then the pitch-class is not necessarily an integer.

ParameterDescription
pitch
divisionsPerOctave

Returns: double

pcs (csound::Voicelead::pcs)

Return the chord as the list of its pitch-classes.

Although the list is nominally unordered, it is returned sorted in ascending order. Note that pitch-classes may be doubled.

ParameterDescription
chord
divisionsPerOctave

Returns: std::vector< double >

pitchClassSetToM (csound::Voicelead::pitchClassSetToM)

Convert a chord to a pitch-class set number M = sum over pitch-classes of (2 ^ pitch-class).

These numbers form a multiplicative monoid. Arithmetic on this monoid can perform many harmonic and other manipulations of pitch.

ParameterDescription
chord
divisionsPerOctave

Returns: double

pitchClassSetToPandT (csound::Voicelead::pitchClassSetToPandT)

Convert a pitch-class set to a prime chord number and a transposition.

Note that the prime chord numbers, and transpositions, each form an additive cyclic group.

ParameterDescription
pcs
divisionsPerOctave

Returns: std::vector< double >

primeChord (csound::Voicelead::primeChord)

Return the prime chord: that inversion of the pitch-classes in the chord which is closest to the orthogonal axis of the Tonnetz for that chord, transposed so that its lowest pitch is at the origin.

Similar to, but not identical with, "prime form."

ParameterDescription
chord

Returns: std::vector< double >

pToC (csound::Voicelead::pToC)

Return P = index of prime chords for C = (sum over pitch-classes of (pitch-class ^ 2)) - 1 (additive cyclic group for non-empty pitch-class sets).

If an exact match is not found the closest match is returned.

ParameterDescription
Z
divisionsPerOctave

Returns: double

pToPrimeChord (csound::Voicelead::pToPrimeChord)

Return the prime chord for the index P.
ParameterDescription
P
divisionsPerOctave

Returns: std::vector< double >

ptvToChord (csound::Voicelead::ptvToChord)

Return the voiced chord for the prime chord index P, transposition T, and voicing index V within the specified range for the indicated number of tones per octave.

The algorithm finds the zero voicing (the lowest octave transposition of the normal chord of the chord that is no lower than the lowest pitch, which has voicing index V = 0) and the zero iterator (the lowest (in all voices) unordered voicing of the chord that is no lower (in all voices) than the lowest pitch, which has enumeration index = 0). Thus, V of a voicing equals the enumeration index of that voicing minus the enumeration index of the zero voicing. The algorithm enumerates the voicings, and thus V, until V is matched. If V is greater than the maximum V, its modulus is used.

ParameterDescription
P
T
V_
lowest
range
divisionsPerOctave

Returns: std::vector< double >

Q (csound::Voicelead::Q)

Contextually transpose chord c with respect to chord s by n semitones; g is the generator of transpositions.
ParameterDescription
c
n
s
g

Returns: std::vector< double >

recursiveVoicelead (csound::Voicelead::recursiveVoicelead)

Return the closest voiceleading within the specified range, first by smoothness then by simplicity, between the source chord and the target pitch-class set, optionally avoiding parallel fifths.

Bijective voiceleading first by closeness, then by simplicity, with optional avoidance of parallel fifths.

The algorithm uses a brute-force search through all unordered chords, which are recursively enumerated, fitting the target pitch-class set within the specified range. Although the time complexity is exponential, the algorithm is still usable for non-real-time operations in most cases of musical interest.

ParameterDescription
source
targetPitchClassSet
lowest
range
avoidParallels
divisionsPerOctave

Returns: std::vector< double >

rotate (csound::Voicelead::rotate)

Return the chord with the first note rotated to the last note.
ParameterDescription
chord

Returns: std::vector< double >

rotations (csound::Voicelead::rotations)

Return the set of all rotations of the chord.
ParameterDescription
chord

Returns: std::vector< std::vector< double > >

simpler (csound::Voicelead::simpler)

Return the simpler (fewer motions) of the voiceleadings between source chord and either destination1 or destination2, optionally avoiding parallel fifths.
ParameterDescription
source
destination1
destination2
avoidParallels

Returns: const std::vector< double > &

smoothness (csound::Voicelead::smoothness)

Return the smoothness (distance by taxicab or L1 norm) of the voiceleading between chord1 and chord2.
ParameterDescription
chord1
chord2

Returns: double

sortByAscendingDistance (csound::Voicelead::sortByAscendingDistance)

Return a copy of the chord sorted by ascending distance from its first pitch-class.
ParameterDescription
chord
divisionsPerOctave

Returns: std::vector< double >

T (csound::Voicelead::T)

Return the pitch-class transposition of pitch p by n semitones.
ParameterDescription
p
n

Returns: double

T_vector (csound::Voicelead::T_vector)

Return the pitch-class transposition of chord c by n semitones.
ParameterDescription
c
n

Returns: std::vector< double >

Tform (csound::Voicelead::Tform)

Return whether chord Y is a transposed form of chord X; g is the generator of transpositions.
ParameterDescription
X
Y
g

Returns: bool

toOrigin (csound::Voicelead::toOrigin)

Return the chord transposed so its lowest pitch is at the origin.
ParameterDescription
chord

Returns: std::vector< double >

transpose (csound::Voicelead::transpose)

Return the chord transposed by the indicated number of semitones.
ParameterDescription
chord
semitones

Returns: std::vector< double >

uniquePcs (csound::Voicelead::uniquePcs)

Return the chord as the list of its pitch-classes.

Although the list is nominally unordered, it is returned sorted in ascending order. Note that pitch-classes are NOT doubled.

ParameterDescription
chord
divisionsPerOctave

Returns: std::vector< double >

voicelead (csound::Voicelead::voicelead)

Return the closest voiceleading within the specified range, first by smoothness then by simplicity, between the source chord and the target pitch-class set, optionally avoiding parallel fifths.

Bijective voiceleading first by closeness, then by simplicity, with optional avoidance of parallel fifths.

The algorithm uses a brute-force search through all unordered chords, which are stored in a cache, fitting the target pitch-class set within the specified range. Although the time complexity is exponential, this is still usable for non-real-time operations in most cases of musical interest.

If source and target are the same, parallel fifths are not avoided.

ParameterDescription
source
targetPitchClassSet
lowest
range
avoidParallels
divisionsPerOctave

Returns: std::vector< double >

voiceleading (csound::Voicelead::voiceleading)

Return the voice-leading vector (difference) between chord1 and chord2.
ParameterDescription
chord1
chord2

Returns: std::vector< double >

voicings (csound::Voicelead::voicings)

Return an enumeration of all voicings of the chord that are greater than or equal to the lowest pitch, and less than the highest pitch, by adding octaves.

Voicings are ordered, but note that normally in this module chords are considered to be unordered. Note that complex chords and/or wide ranges may require more memory than is available. The index of voicings V forms an additive cyclic group. Arithmetic on this group can perform many operations on the voices of the chord such as revoicing, arpeggiation, and so on.

ParameterDescription
chord
lowest
highest
divisionsPerOctave

Returns: std::vector< std::vector< double > >

wrap (csound::Voicelead::wrap)

Wrap chord tones that exceed the highest pitch around to the bottom of the range orbifold.
ParameterDescription
chord
lowestPitch
highestPitch
divisionsPerOctave

Returns: std::vector< double >

VoiceleadingNode

C++ csound::VoiceleadingNode

Extends: Node

This node class imposes a sequence of one or more "voice-leading" operations upon the pitches of notes produced by children of this node, within a segment of the notes.

These operations comprise: prime chord (P), transpose (T), unordered pitch-class set (C, equivalent to PT), contextual inversion (K), contextual transposition (Q), voicing (V) within a specified range of pitches, and voice-lead (L). The values of P, T, C, and V each form an additive cyclic group whose elements are defined by counting through all possible values in order. Note that C is not the same as "pitch-class set number" in the sense of M = sum over pitch-classes of (2 ^ pitch-class); it is rather one less than M. Not all combinations of operations are consistent. P requires T. PT cannot be used with C. V cannot be used with L. If neither PT nor C is specified, the existing C of the notes is used. K and Q require a previous section, and cannot be used with P, T, or C. The consistent combinations of operations are thus: PT, PTV, PTL, C, CV, CL, K, KV, KL, Q, QV, QL, V, and L.

Methods

apply (csound::VoiceleadingNode::apply)

Apply the current voice-leading operation to the score, within the specified range of notes.

If voice-leading proper is to be performed, the prior voice-leading operation is used to determine how to lead the voices.

ParameterDescription
score
priorOperation
currentOperation

Returns: void

C (csound::VoiceleadingNode::C)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified prime chord and transposition.

Note that C (equivalent to PT) specifies what musicians normally call a chord.

ParameterDescription
time
C_

Returns: void

C_chord (C++ csound::VoiceleadingNode::C_name)

Same as C, except the chord can be specified by jazz-type name (e.g.

EbM7) instead of C number.

ParameterDescription
time
C_

Returns: void

chordVoiceleading (csound::VoiceleadingNode::chordVoiceleading)

Apply the specified chord to the current segement, using the closest voice-leading from the pitches of the previous segment.
ParameterDescription
chord
time
avoid_parallels

Returns: void

CL (csound::VoiceleadingNode::CL)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified chord; the voicing of the chord will be the smoothest voice-leading from the pitches of the previous chord.

Optionally, parallel fifths can be avoided. Note that CL (equivalent to PTL) specifies what musicians normally call the voice-leading of a chord.

ParameterDescription
time
C_
avoidParallels

Returns: void

CL_name (csound::VoiceleadingNode::CL_name)

Same as CL, except the chord is specified by jazz-type name (e.g.

EbM7) instead of C number.

ParameterDescription
time
C_
avoidParallels

Returns: void

CV (csound::VoiceleadingNode::CV)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified prime chord, transpostion, and voicing.

Note that CV (equivalent to PTV) specifies what musicians normally call the voicing, or octavewise inversion, of a chord.

ParameterDescription
time
C_
V_

Returns: void

CV_name (csound::VoiceleadingNode::CV_name)

Same as CV, except the chord is specified by jazz-type name (e.g.

EbM7) instead of C number.

ParameterDescription
time
C_
V_

Returns: void

getModality (csound::VoiceleadingNode::getModality)

Returns: std::vector< double >

K (csound::VoiceleadingNode::K)

Find the C of the previous segment, and contextually invert it; apply the resulting C to the current segment.

Contextual inversion is that inversion of C in which the first two pitch-classes are exchanged. If the chords are major or minor triads, produces the relative minor or major.

ParameterDescription
time

Returns: void

KL (csound::VoiceleadingNode::KL)

Find the C of the previous segment, and contextually invert it; apply the resulting C to the current segment, using the closest voiceleading from the pitches of the previous segment.

Contextual inversion is that inversion of C in which the first two pitch-classes are exchanged.

ParameterDescription
time
avoidParallels

Returns: void

KV (csound::VoiceleadingNode::KV)

Find the C of the previous segment, and contextually invert it; apply the resulting C to the current segment with voicing V.

Contextual inversion is that inversion of C in which the first two pitch-classes are exchanged.

ParameterDescription
time
V_

Returns: void

L (csound::VoiceleadingNode::L)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the smoothest voice-leading from the pitches of the previous segment.

Optionally, parallel fifths can be avoided. Note that L specifies what musicians normally call voice-leading.

ParameterDescription
time
avoidParallels

Returns: void

PT (csound::VoiceleadingNode::PT)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified prime chord and transposition.

Note that PT specifies what musicians normally call a chord, e.g. "E flat major ninth." However, chords do not have to be in twelve tone equal temperament.

ParameterDescription
time
P_
T

Returns: void

PTL (csound::VoiceleadingNode::PTL)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified chord; the voicing of the chord will be the smoothest voice-leading from the pitches of the previous chord.

Optionally, parallel fifths can be avoided. Note that PTL specifies what musicians normally call the voice-leading of a chord.

ParameterDescription
time
P_
T
avoidParallels

Returns: void

PTV (csound::VoiceleadingNode::PTV)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified prime chord, transpostion, and voicing.

Note that PTV specifies what musicians normally call the voicing, or octavewise inversion, of a chord.

ParameterDescription
time
P_
T
V_

Returns: void

Q (csound::VoiceleadingNode::Q)

Find the C of the previous segment, and contextually transpose it; apply the resulting C to the current segment.

Contextual transposition transposes C up by Q if C is an I-form, and down by Q if C is a T-form.

ParameterDescription
time
Q_

Returns: void

QL (csound::VoiceleadingNode::QL)

Find the C of the previous segment, and contextually transpose it; apply the resulting C to the current segment, using the specified octavewise revoicing.

Contextual transposition transposes C up by Q if C is an I-form, and down by Q if C is a T-form.

ParameterDescription
time
Q_
avoidParallels

Returns: void

QV (csound::VoiceleadingNode::QV)

Find the C of the previous segment, and contextually transpose it; apply the resulting C to the current segment with voicing V.

Contextual transposition transposes C up by Q if C is an I-form, and down by Q if C is a T-form.

ParameterDescription
time
Q_
V_

Returns: void

V (csound::VoiceleadingNode::V)

Beginning at the specified time and continuing to the beginning of the next operation or the end of the score, whichever comes first, conform notes produced by this node or its children to the specified voicing of the chord.

Note that V specifies what musicians normally call the voicing or octavewise inversion of the chord.

ParameterDescription
time
V_

Returns: void

VectorXd

AUTO-GENERATED by pnpm run generate-csoundac-jsdoc. Embind surface only.