Csound and CsoundAC API
5.17
|
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. More...
#include <Random.hpp>
Public Member Functions | |
virtual void | addChild (Node *node) |
virtual void | clear () |
virtual void | createDistribution (std::string distribution) |
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. | |
virtual Eigen::MatrixXd | getLocalCoordinates () const |
Returns the local transformation of coordinate system. | |
virtual Eigen::MatrixXd | getRandomCoordinates () const |
virtual void | produceOrTransform (Score &score, size_t beginAt, size_t endAt, const Eigen::MatrixXd &compositeCoordinates) |
This function is called by the traverse() function. | |
Random () | |
virtual double | sample () const |
virtual void | setElement (size_t row, size_t column, double value) |
Sets the indicated element of the local transformation of coordinate system. | |
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 | ~Random () |
Static Public Member Functions | |
static void | seed (int s) |
Data Fields | |
double | a |
double | b |
double | c |
std::vector< Node * > | children |
Child Nodes, if any. | |
int | column |
std::string | distribution |
int | eventCount |
bool | incrementTime |
double | Lambda |
double | maximum |
double | mean |
double | minimum |
double | q |
int | row |
double | sigma |
Static Public Attributes | |
static boost::mt19937 | mersenneTwister |
Protected Attributes | |
boost::variate_generator < boost::mt19937, boost::bernoulli_distribution<> > * | bernoulli_distribution_generator |
boost::variate_generator < boost::mt19937, boost::exponential_distribution<> > * | exponential_distribution_generator |
void * | generator_ |
boost::variate_generator < boost::mt19937, boost::geometric_distribution<> > * | geometric_distribution_generator |
Eigen::MatrixXd | localCoordinates |
boost::variate_generator < boost::mt19937, boost::lognormal_distribution<> > * | lognormal_distribution_generator |
boost::variate_generator < boost::mt19937, boost::normal_distribution<> > * | normal_distribution_generator |
boost::variate_generator < boost::mt19937, boost::triangle_distribution<> > * | triangle_distribution_generator |
boost::variate_generator < boost::mt19937, boost::uniform_int<> > * | uniform_int_generator |
boost::variate_generator < boost::mt19937, boost::uniform_real<> > * | uniform_real_generator |
boost::variate_generator < boost::mt19937, boost::uniform_smallint<> > * | uniform_smallint_generator |
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.
csound::Random::Random | ( | ) |
|
virtual |
|
virtualinherited |
|
virtualinherited |
Reimplemented in csound::ChordLindenmayer, csound::Lindenmayer, csound::MusicModel, and csound::ScoreModel.
|
virtual |
|
virtualinherited |
|
virtualinherited |
Returns a reference to the indicated element of the local transformation of coordinate system.
|
virtualinherited |
Returns the local transformation of coordinate system.
|
virtual |
|
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::Node.
|
virtual |
|
static |
|
virtualinherited |
Sets the indicated element of the local transformation of coordinate system.
|
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.
double csound::Random::a |
double csound::Random::b |
|
protected |
double csound::Random::c |
|
inherited |
Child Nodes, if any.
int csound::Random::column |
std::string csound::Random::distribution |
int csound::Random::eventCount |
|
protected |
|
protected |
|
protected |
bool csound::Random::incrementTime |
double csound::Random::Lambda |
|
protectedinherited |
|
protected |
double csound::Random::maximum |
double csound::Random::mean |
|
static |
double csound::Random::minimum |
|
protected |
double csound::Random::q |
int csound::Random::row |
double csound::Random::sigma |
|
protected |
|
protected |
|
protected |
|
protected |