#include <MusicModel.hpp>
Inherits csound::Composition, and csound::Node.
Public Member Functions | |
MusicModel () | |
virtual | ~MusicModel () |
virtual void | initialize () |
virtual void | generate () |
virtual void | clear () |
virtual std::string | getFilename () const |
virtual void | setFilename (std::string filename) |
virtual std::string | getMidiFilename () |
virtual std::string | getOutputSoundfileName () |
virtual long | getThis () |
virtual Node * | getThisNode () |
virtual void | createCsoundScore (std::string addToScore="", double extendSeconds=5.0) |
virtual void | render () |
virtual void | perform () |
virtual Score & | getScore () |
virtual void | setCppSound (CppSound *orchestra) |
virtual CppSound * | getCppSound () |
virtual void | write (const char *text) |
virtual void | setTonesPerOctave (double tonesPerOctave) |
virtual double | getTonesPerOctave () const |
virtual void | setConformPitches (bool conformPitches) |
virtual bool | getConformPitches () const |
virtual void | setCsoundOrchestra (std::string orchestra) |
virtual std::string | getCsoundOrchestra () const |
virtual void | setCsoundScoreHeader (std::string header) |
virtual std::string | getCsoundScoreHeader () const |
virtual void | arrange (int oldInstrumentNumber, int newInstrumentNumber) |
virtual void | arrange (int oldInstrumentNumber, int newInstrumentNumber, double gain) |
virtual void | arrange (int oldInstrumentNumber, int newInstrumentNumber, double gain, double pan) |
virtual void | removeArrangement () |
virtual void | setCsoundCommand (std::string command) |
virtual std::string | getCsoundCommand () const |
virtual ublas::matrix< double > | getLocalCoordinates () const |
virtual ublas::matrix< double > | traverse (const ublas::matrix< double > &globalCoordinates, Score &score) |
virtual void | produceOrTransform (Score &score, size_t beginAt, size_t endAt, const ublas::matrix< double > &coordinates) |
virtual ublas::matrix< double > | createTransform () |
virtual double & | element (size_t row, size_t column) |
virtual void | setElement (size_t row, size_t column, double value) |
virtual void | addChild (Node *node) |
Static Public Member Functions | |
static std::string | generateFilename () |
Data Fields | |
std::vector< Node * > | children |
Protected Attributes | |
Score | score |
double | tonesPerOctave |
bool | conformPitches |
CppSound | cppSound_ |
CppSound * | cppSound |
std::string | csoundScoreHeader |
ublas::matrix< double > | localCoordinates |
Private Attributes | |
std::string | filename |
csound::MusicModel::MusicModel | ( | ) |
virtual csound::MusicModel::~MusicModel | ( | ) | [virtual] |
virtual void csound::Node::addChild | ( | Node * | node | ) | [virtual, inherited] |
virtual void csound::Composition::arrange | ( | int | oldInstrumentNumber, | |
int | newInstrumentNumber, | |||
double | gain, | |||
double | pan | |||
) | [virtual, inherited] |
Re-assign instrument numbers, adjust gains, and change pans 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 numbers and adjust gains for export to Csound score (convenience wrapper for Score::arrange()).
virtual void csound::Composition::arrange | ( | int | oldInstrumentNumber, | |
int | newInstrumentNumber | |||
) | [virtual, inherited] |
Re-assign instrument numbers 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] |
The default implementation does nothing.
Reimplemented in csound::Cell, csound::CounterpointNode, csound::Hocket, csound::MCRM, csound::Random, csound::Rescale, csound::ScoreNode, and csound::VoiceleadingNode.
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.
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] |