Csound and CsoundAC API
5.17
|
#include <MCRM.hpp>
Public Member Functions | |
virtual void | addChild (Node *node) |
virtual void | clear () |
virtual Eigen::MatrixXd | createTransform () |
virtual double & | element (size_t row, size_t column) |
Returns a reference to the indicated element of the local transformation of coordinate system. | |
void | generate () |
virtual Eigen::MatrixXd | getLocalCoordinates () const |
Returns the local transformation of coordinate system. | |
virtual Score & | getScore () |
MCRM () | |
virtual void | produceOrTransform (Score &score, size_t beginAt, size_t endAt, const Eigen::MatrixXd &coordinates) |
This function is called by the traverse() function. | |
void | resize (size_t transformations) |
void | setDepth (int depth) |
virtual void | setElement (size_t row, size_t column, double value) |
Sets the indicated element of the local transformation of coordinate system. | |
void | setTransformationElement (size_t index, size_t row, size_t column, double value) |
void | setWeight (size_t precursor, size_t successor, double weight) |
virtual Eigen::MatrixXd | traverse (const Eigen::MatrixXd &globalCoordinates, Score &score) |
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. | |
virtual | ~MCRM () |
Data Fields | |
std::vector< Node * > | children |
Child Nodes, if any. | |
double | duration |
If not 0, the score is rescaled to this duration. | |
std::string | importFilename |
Protected Attributes | |
Eigen::MatrixXd | localCoordinates |
Score | score |
Private Member Functions | |
void | iterate (int depth, size_t p, const Event &event, double weight) |
Private Attributes | |
int | depth |
std::vector< Eigen::MatrixXd > | transformations |
Eigen::MatrixXd | weights |
csound::MCRM::MCRM | ( | ) |
|
virtual |
|
virtualinherited |
|
virtualinherited |
Reimplemented in csound::ChordLindenmayer, csound::Lindenmayer, csound::MusicModel, and csound::ScoreModel.
|
virtualinherited |
|
virtualinherited |
Returns a reference to the indicated element of the local transformation of coordinate system.
void csound::MCRM::generate | ( | ) |
|
virtualinherited |
Returns the local transformation of coordinate system.
|
virtualinherited |
|
private |
|
virtual |
This function is called by the traverse() function.
The default implementation does nothing. If a derived node produces new Events, then it must transform them by the composite coordinates, then append them to the collecting score. If a derived node transforms Events produced by child Nodes, then it must transform only Events in the collecting score starting at the startAt index and continuing up to, but not including, the endAt index. These bookmarks, in turn, must be set in the Traverse function by all Nodes that produce events.
Reimplemented from csound::ScoreNode.
void csound::MCRM::resize | ( | size_t | transformations | ) |
void csound::MCRM::setDepth | ( | int | depth | ) |
|
virtualinherited |
Sets the indicated element of the local transformation of coordinate system.
void csound::MCRM::setTransformationElement | ( | size_t | index, |
size_t | row, | ||
size_t | column, | ||
double | value | ||
) |
void csound::MCRM::setWeight | ( | size_t | precursor, |
size_t | successor, | ||
double | weight | ||
) |
|
virtualinherited |
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::Koch, csound::Stack, csound::Intercut, csound::Hocket, and csound::Sequence.
|
inherited |
Child Nodes, if any.
|
private |
|
inherited |
If not 0, the score is rescaled to this duration.
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
private |
|
private |