csound::MusicModel Class Reference

#include <MusicModel.hpp>

Inherits csound::Composition, and csound::Node.

Public Member Functions

Static Public Member Functions

Data Fields

Protected Attributes

Private Attributes


Detailed Description

Base class for compositions that use the principle of a music graph to generate a score. A music graph is a directed acyclic graph of nodes including empty nodes, nodes that contain only child nodes, score nodes, event generator nodes, event transformer nodes, and others. Each node is associated with a local transformation of coordinate system in music space using a 12 x 12 homogeneous matrix. To generate the score, the music graph is traversed depth first, and each node postconcatenates its local transformation of coordinate system with the coordinate system of its parent to derive a new local coordinate system, which is applied to all child events.

Constructor & Destructor Documentation

csound::MusicModel::MusicModel (  ) 

virtual csound::MusicModel::~MusicModel (  )  [virtual]


Member Function Documentation

virtual void csound::Node::addChild ( Node node  )  [virtual, inherited]

virtual void csound::Composition::arrange ( int  silenceInstrumentNumber,
std::string  csoundInstrumentName,
double  gain,
double  pan 
) [virtual, inherited]

Re-assign instrument by name, adjust gain, and change pan for export to Csound score.

virtual void csound::Composition::arrange ( int  silenceInstrumentNumber,
std::string  csoundInstrumentName,
double  gain 
) [virtual, inherited]

Re-assign instrument by name and adjust gains for export to Csound score.

virtual void csound::Composition::arrange ( int  silenceInstrumentNumber,
std::string  csoundInstrumentName 
) [virtual, inherited]

Re-assign instrument by name for export to Csound score.

virtual void csound::Composition::arrange ( int  oldInstrumentNumber,
int  newInstrumentNumber,
double  gain,
double  pan 
) [virtual, inherited]

Re-assign instrument number, adjust gain, and change pan for export to Csound score (convenience wrapper for Score::arrange()).

virtual void csound::Composition::arrange ( int  oldInstrumentNumber,
int  newInstrumentNumber,
double  gain 
) [virtual, inherited]

Re-assign instrument number and adjust gain for export to Csound score (convenience wrapper for Score::arrange()).

virtual void csound::Composition::arrange ( int  oldInstrumentNumber,
int  newInstrumentNumber 
) [virtual, inherited]

Re-assign instrument number for export to Csound score (convenience wrapper for Score::arrange()).

virtual void csound::MusicModel::clear (  )  [virtual]

Clear all contents of this. Probably should be overridden in derived classes.

Reimplemented from csound::Composition.

virtual void csound::Composition::createCsoundScore ( std::string  addToScore = "",
double  extendSeconds = 5.0 
) [virtual, inherited]

Translate the generated score to a Csound score and export it for performance. The time given by extendSeconds is used for a concluding e statement.

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::MusicModel::generate (  )  [virtual]

Generate performance events and store them in the score. Must be overidden in derived classes.

Reimplemented from csound::Composition.

static std::string csound::MusicModel::generateFilename (  )  [static]

virtual bool csound::Composition::getConformPitches (  )  const [virtual, inherited]

virtual CppSound* csound::Composition::getCppSound (  )  [virtual, inherited]

Return the self-contained Orchestra.

virtual std::string csound::Composition::getCsoundCommand (  )  const [virtual, inherited]

Return Csound command line (convenience wrapper for CppSound::getCommand()).

virtual std::string csound::Composition::getCsoundOrchestra (  )  const [virtual, inherited]

Return the Csound orchestra (convenience wrapper for CppSound::getOrchestra()).

virtual std::string csound::Composition::getCsoundScoreHeader (  )  const [virtual, inherited]

Return the Csound score header that is prepended to generated scores.

virtual std::string csound::MusicModel::getFilename (  )  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::MusicModel::getMidiFilename (  )  [virtual]

virtual std::string csound::MusicModel::getOutputSoundfileName (  )  [virtual]

virtual Score& csound::Composition::getScore (  )  [virtual, inherited]

Return the self-contained Score.

virtual long csound::MusicModel::getThis (  )  [virtual]

virtual Node* csound::MusicModel::getThisNode (  )  [virtual]

virtual double csound::Composition::getTonesPerOctave (  )  const [virtual, inherited]

virtual void csound::MusicModel::initialize (  )  [virtual]

virtual void csound::Composition::perform (  )  [virtual, inherited]

Uses csound to perform the current score.

virtual void csound::Node::produceOrTransform ( Score score,
size_t  beginAt,
size_t  endAt,
const ublas::matrix< double > &  coordinates 
) [virtual, inherited]

virtual void csound::Composition::removeArrangement (  )  [virtual, inherited]

Remove instrument number, gain, and pan assignments (convenience wrapper for Score::removeArrangement()).

virtual void csound::Composition::render (  )  [virtual, inherited]

Convenience function that erases the existing score, appends optional text to it, invokes generate(), invokes createCsoundScore(), and invokes perform().

virtual void csound::Composition::setConformPitches ( bool  conformPitches  )  [virtual, inherited]

virtual void csound::Composition::setCppSound ( CppSound orchestra  )  [virtual, inherited]

Sets the self-contained Orchestra.

virtual void csound::Composition::setCsoundCommand ( std::string  command  )  [virtual, inherited]

Set Csound command line (convenience wrapper for CppSound::setCommand()).

virtual void csound::Composition::setCsoundOrchestra ( std::string  orchestra  )  [virtual, inherited]

Set the Csound orchestra (convenience wrapper for CppSound::setOrchestra()).

virtual void csound::Composition::setCsoundScoreHeader ( std::string  header  )  [virtual, inherited]

Set a Csound score fragment to be prepended to the generated score (createCsoundScore is called with it).

virtual void csound::Node::setElement ( size_t  row,
size_t  column,
double  value 
) [virtual, inherited]

virtual void csound::MusicModel::setFilename ( std::string  filename  )  [virtual]

virtual void csound::Composition::setTonesPerOctave ( double  tonesPerOctave  )  [virtual, inherited]

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::Composition::write ( const char *  text  )  [virtual, inherited]

Write as if to stdout or stderr.


Field Documentation

std::vector<Node *> csound::Node::children [inherited]

Child Nodes, if any.

bool csound::Composition::conformPitches [protected, inherited]

CppSound* csound::Composition::cppSound [protected, inherited]

CppSound csound::Composition::cppSound_ [protected, inherited]

std::string csound::Composition::csoundScoreHeader [protected, inherited]

Prepended to generated score.

std::string csound::MusicModel::filename [private]

ublas::matrix<double> csound::Node::localCoordinates [protected, inherited]

Score csound::Composition::score [protected, inherited]

double csound::Composition::tonesPerOctave [protected, inherited]


Generated on Wed Jul 29 22:58:42 2009 for Csound and CsoundAC API by  doxygen 1.5.9