Public Member Functions |
virtual void | addChild (Node *node) |
virtual void | addRule (std::string command, std::string replacement) |
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.
|
virtual void | generate () |
virtual double | getAngle () const |
virtual std::string | getAxiom () const |
virtual int | getIterationCount () const |
virtual Eigen::MatrixXd | getLocalCoordinates () const |
| Returns the local transformation of coordinate system.
|
virtual std::string | getReplacement (std::string command) |
virtual Score & | getScore () |
| Lindenmayer () |
virtual void | produceOrTransform (Score &collectingScore, size_t beginAt, size_t endAt, const Eigen::MatrixXd &coordinates) |
| This function is called by the traverse() function.
|
virtual void | setAngle (double angle) |
virtual void | setAxiom (std::string axiom) |
virtual void | setElement (size_t row, size_t column, double value) |
| Sets the indicated element of the local transformation of coordinate system.
|
virtual void | setIterationCount (int count) |
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 | ~Lindenmayer () |
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
virtual void csound::ScoreNode::produceOrTransform |
( |
Score & |
collectingScore, |
|
|
size_t |
beginAt, |
|
|
size_t |
endAt, |
|
|
const Eigen::MatrixXd & |
compositeCordinates |
|
) |
| |
|
virtualinherited |
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.
Reimplemented in csound::Cell, csound::MCRM, and csound::Rescale.