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 COMPOSITION_H 00023 #define COMPOSITION_H 00024 00025 #include "Platform.hpp" 00026 #ifdef SWIG 00027 %module CsoundAC 00028 %{ 00029 #include "CppSound.hpp" 00030 #include "Score.hpp" 00031 %} 00032 #else 00033 #include "CppSound.hpp" 00034 #include "Score.hpp" 00035 #endif 00036 00037 namespace csound 00038 { 00045 class Composition 00046 { 00047 protected: 00048 Score score; 00049 double tonesPerOctave; 00050 bool conformPitches; 00051 CppSound cppSound_; 00052 CppSound *cppSound; 00056 std::string csoundScoreHeader; 00057 public: 00058 Composition(); 00059 virtual ~Composition(); 00064 virtual void generate(); 00070 virtual void createCsoundScore(std::string addToScore = "", 00071 double extendSeconds = 5.0); 00077 virtual void render(); 00081 virtual void perform(); 00086 virtual void clear(); 00090 virtual Score &getScore(); 00094 virtual void setCppSound(CppSound *orchestra); 00098 virtual CppSound *getCppSound(); 00102 virtual void write(const char *text); 00103 virtual void setTonesPerOctave(double tonesPerOctave); 00104 virtual double getTonesPerOctave() const; 00105 virtual void setConformPitches(bool conformPitches); 00106 virtual bool getConformPitches() const; 00111 virtual void setCsoundOrchestra(std::string orchestra); 00116 virtual std::string getCsoundOrchestra() const; 00121 virtual void setCsoundScoreHeader(std::string header); 00126 virtual std::string getCsoundScoreHeader() const; 00131 virtual void arrange(int oldInstrumentNumber, int newInstrumentNumber); 00137 virtual void arrange(int oldInstrumentNumber, 00138 int newInstrumentNumber, 00139 double gain); 00145 virtual void arrange(int oldInstrumentNumber, 00146 int newInstrumentNumber, 00147 double gain, 00148 double pan); 00153 virtual void removeArrangement(); 00158 virtual void setCsoundCommand(std::string command); 00163 virtual std::string getCsoundCommand() const; 00164 }; 00165 } 00166 #endif 00167