#include <VoiceleadingNode.hpp>
Inherits csound::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. These operations comprise: prime chord (P), transpose (T), unordered pitch-class set (C, equivalent to PT), 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. The consistent combinations of operations are thus: PT, PTV, PTL, C, CV, CL, V, and L.
csound::VoiceleadingNode::VoiceleadingNode | ( | ) |
virtual csound::VoiceleadingNode::~VoiceleadingNode | ( | ) | [virtual] |
virtual void csound::Node::addChild | ( | Node * | node | ) | [virtual, inherited] |
virtual void csound::VoiceleadingNode::apply | ( | Score & | score, | |
const VoiceleadingOperation & | priorOperation, | |||
const VoiceleadingOperation & | currentOperation | |||
) | [virtual] |
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.
virtual void csound::VoiceleadingNode::C | ( | double | time, | |
double | C_ | |||
) | [virtual] |
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.
virtual void csound::VoiceleadingNode::C | ( | double | time, | |
std::string | C_ | |||
) | [virtual] |
Same as PT, except that a single number is used in place of the P and T numbers.
virtual void csound::VoiceleadingNode::CL | ( | double | time, | |
double | C_, | |||
bool | avoidParallels = true | |||
) | [virtual] |
Same as PTV, except the chord is specified by jazz-type name (e.g. EbM7) instead of P and T numbers.
virtual void csound::VoiceleadingNode::CL | ( | double | time, | |
std::string | C_, | |||
bool | avoidParallels = true | |||
) | [virtual] |
Same as PTL, except the chord is specified by a single number instead of P and T numbers.
virtual void csound::Node::clear | ( | ) | [virtual, inherited] |
Reimplemented in csound::Lindenmayer, csound::MusicModel, and csound::ScoreModel.
virtual ublas::matrix<double> csound::Node::createTransform | ( | ) | [virtual, inherited] |
virtual void csound::VoiceleadingNode::CV | ( | double | time, | |
std::string | C_, | |||
double | V_ | |||
) | [virtual] |
Same as PTV, except the chord is specified by a single number instead of the P and T numbers.
virtual void csound::VoiceleadingNode::CV | ( | double | time, | |
double | C_, | |||
double | V_ | |||
) | [virtual] |
Same as PT, except the chord can be specified by jazz-type name (e.g. EbM7) instead of P and T numbers.
virtual double& csound::Node::element | ( | size_t | row, | |
size_t | column | |||
) | [virtual, inherited] |
virtual ublas::matrix<double> csound::Node::getLocalCoordinates | ( | ) | const [virtual, inherited] |
Returns the local transformation of coordinate system.
Reimplemented in csound::Random.
virtual void csound::VoiceleadingNode::L | ( | double | time, | |
bool | avoidParallels = true | |||
) | [virtual] |
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 inversion of the chord.
virtual void csound::VoiceleadingNode::produceOrTransform | ( | Score & | score, | |
size_t | beginAt, | |||
size_t | endAt, | |||
const ublas::matrix< double > & | coordinates | |||
) | [virtual] |
Applies all of the stored voice-leading operations to the specified range of notes in the score. if rescaleTimes is true, the times of the operations will be rescaled to fit the times in the range of notes.
Reimplemented from csound::Node.
virtual void csound::VoiceleadingNode::PT | ( | double | time, | |
double | P_, | |||
double | T | |||
) | [virtual] |
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.
virtual void csound::VoiceleadingNode::PTL | ( | double | time, | |
double | P_, | |||
double | T, | |||
bool | avoidParallels = true | |||
) | [virtual] |
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.
virtual void csound::VoiceleadingNode::PTV | ( | double | time, | |
double | P_, | |||
double | T, | |||
double | V_ | |||
) | [virtual] |
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, transposition, and voicing. Note that PTV specifies what musicians normally call the voicing, or inversion, of a chord.
virtual void csound::Node::setElement | ( | size_t | row, | |
size_t | column, | |||
double | value | |||
) | [virtual, inherited] |
virtual void csound::VoiceleadingNode::transform | ( | Score & | score, | |
bool | rescaleTime = false | |||
) | [virtual] |
Apply all of the voice-leading operations stored within this node to the score. Enables voice-leading operations to be used outside the context of a music graph.
virtual ublas::matrix<double> csound::Node::traverse | ( | const ublas::matrix< double > & | globalCoordinates, | |
Score & | score | |||
) | [virtual, inherited] |
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.
Reimplemented in csound::Hocket, and csound::Sequence.
virtual void csound::VoiceleadingNode::V | ( | double | time, | |
double | V_ | |||
) | [virtual] |
Same as PTL, except the chord is specified by jazz-type name (e.g. EbM7) instead of P and T numbers.
If true (the default), voice-leadings will avoid parallel fifths.
The lowest pitch of the range of voicings, as a MIDI key number (default = 36).
std::vector<Node *> csound::Node::children [inherited] |
Child Nodes, if any.
The number of equally tempered divisions of the octave (default = 12). Note that the octave is always size 12. The size of a division of the octave is then 1 in 12-tone equal temperament, 0.5 in 24-tone equal temperament, 1.33333 in 9-tone equal temperament, and so on.
ublas::matrix<double> csound::Node::localCoordinates [protected, inherited] |
std::map<double, VoiceleadingOperation> csound::VoiceleadingNode::operations |
Voice-leading operations stored in order of starting time.
The range of voicings, from the lowest to the highest pitch, as a MIDI key number (default = 60).
If true (the default), rescale times of voice-leading operations in proportion to the duration of the notes produced by this and its child nodes.