csound::Lindenmayer Class Reference
#include <Lindenmayer.hpp>
Inherits csound::ScoreNode.
Public Member Functions
Data Fields
Protected Member Functions
Protected Attributes
Detailed Description
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.
Constructor & Destructor Documentation
csound::Lindenmayer::Lindenmayer |
( |
|
) |
|
virtual csound::Lindenmayer::~Lindenmayer |
( |
|
) |
[virtual] |
Member Function Documentation
virtual void csound::Node::addChild |
( |
Node * |
node |
) |
[virtual, inherited] |
virtual void csound::Lindenmayer::addRule |
( |
std::string |
command, |
|
|
std::string |
replacement | |
|
) |
| | [virtual] |
virtual void csound::Lindenmayer::clear |
( |
|
) |
[virtual] |
virtual ublas::matrix<double> csound::Lindenmayer::createRotation |
( |
int |
dimension1, |
|
|
int |
dimension2, |
|
|
double |
angle | |
|
) |
| | const [protected, virtual] |
virtual ublas::matrix<double> csound::Node::createTransform |
( |
|
) |
[virtual, inherited] |
virtual double& csound::Node::element |
( |
size_t |
row, |
|
|
size_t |
column | |
|
) |
| | [virtual, inherited] |
virtual void csound::Lindenmayer::generate |
( |
|
) |
[virtual] |
virtual double csound::Lindenmayer::getAngle |
( |
|
) |
const [virtual] |
virtual std::string csound::Lindenmayer::getAxiom |
( |
|
) |
const [virtual] |
virtual int csound::Lindenmayer::getDimension |
( |
char |
dimension |
) |
const [protected, virtual] |
virtual int csound::Lindenmayer::getIterationCount |
( |
|
) |
const [virtual] |
virtual ublas::matrix<double> csound::Node::getLocalCoordinates |
( |
|
) |
const [virtual, inherited] |
Returns the local transformation of coordinate system.
Reimplemented in csound::Random.
virtual std::string csound::Lindenmayer::getReplacement |
( |
std::string |
command |
) |
[virtual] |
virtual Score& csound::ScoreNode::getScore |
( |
|
) |
[virtual, inherited] |
virtual void csound::Lindenmayer::initialize |
( |
|
) |
[protected, virtual] |
virtual void csound::Lindenmayer::interpret |
( |
std::string |
command, |
|
|
bool |
render | |
|
) |
| | [protected, virtual] |
virtual void csound::ScoreNode::produceOrTransform |
( |
Score & |
score, |
|
|
size_t |
beginAt, |
|
|
size_t |
endAt, |
|
|
const ublas::matrix< double > & |
coordinates | |
|
) |
| | [virtual, inherited] |
virtual void csound::Lindenmayer::rewrite |
( |
|
) |
[protected, virtual] |
virtual void csound::Lindenmayer::setAngle |
( |
double |
angle |
) |
[virtual] |
virtual void csound::Lindenmayer::setAxiom |
( |
std::string |
axiom |
) |
[virtual] |
virtual void csound::Node::setElement |
( |
size_t |
row, |
|
|
size_t |
column, |
|
|
double |
value | |
|
) |
| | [virtual, inherited] |
virtual void csound::Lindenmayer::setIterationCount |
( |
int |
count |
) |
[virtual] |
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::Lindenmayer::updateActual |
( |
Event & |
event |
) |
[protected, virtual] |
Field Documentation