MCRM.hpp

Go to the documentation of this file.
00001 /*
00002  * C S O U N D   V S T
00003  *
00004  * A VST plugin version of Csound, with Python scripting.
00005  *
00006  * L I C E N S E
00007  *
00008  * This software is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * This software is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this software; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 #ifndef SILENCEMCRM_H
00023 #define SILENCEMCRM_H
00024 #include "Platform.hpp"
00025 #ifdef SWIG
00026 %module CsoundAC
00027 %include "std_string.i"
00028 %include "std_vector.i"
00029 %{
00030 #include "Silence.hpp"
00031 #include <vector>
00032   %}
00033 #else
00034 #include "Silence.hpp"
00035 #endif
00036 
00037 namespace csound
00038 {
00039   class MCRM :
00040     public ScoreNode
00041   {
00042     // Hutchinson operator.
00043     std::vector< ublas::matrix<double> > transformations;
00044     // Pseudo-Markov operator.
00045     ublas::matrix<double> weights;
00046     // Depth of recursion.
00047     int depth;
00048     // Recursive iteration.
00049     void iterate(int depth, size_t p, const Event &event, double weight);
00050   public:
00051     MCRM();
00052     virtual ~MCRM();
00053     void setDepth(int depth);
00054     void resize(size_t transformations);
00055     void setTransformationElement(size_t index, size_t row, size_t column, double value);
00056     void setWeight(size_t precursor, size_t successor, double weight);
00057     void generate();
00058     // Node overrides.
00059     virtual void produceOrTransform(Score &score,
00060                     size_t beginAt,
00061                     size_t endAt,
00062                     const ublas::matrix<double> &coordinates);
00063   };
00064 }
00065 #endif

Generated on Tue Apr 14 11:00:49 2009 for Csound and CsoundAC by  doxygen 1.5.8