CppSound.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 CSND_CPPSOUND_H
00023 #define CSND_CPPSOUND_H
00024 
00025 #ifndef __MYFLT_DEF
00026 #define __MYFLT_DEF
00027 #ifdef USE_DOUBLE
00028 #define MYFLT double
00029 #else
00030 #define MYFLT float
00031 #endif
00032 #endif
00033 
00034 #ifdef SWIG
00035 %module csnd
00036 %include "std_string.i"
00037 %include "std_vector.i"
00038 %{
00039 #include "csound.hpp"
00040 #include "CsoundFile.hpp"
00041 #include <string>
00042 #include <vector>
00043   %}
00044 %template(MyfltVector) std::vector<MYFLT>;
00045 #else
00046 #include "csound.hpp"
00047 #include "CsoundFile.hpp"
00048 #include <string>
00049 #include <vector>
00050 #endif
00051 
00052 class PUBLIC CppSound : public Csound, public CsoundFile
00053 {
00054   bool go;
00055   bool isCompiled;
00056   bool isPerforming;
00057   size_t spoutSize;
00058   std::string renderedSoundfile;
00059 public:
00060   CppSound();
00061   virtual ~CppSound();
00062   virtual CSOUND *getCsound();
00063   virtual long getThis();
00064   virtual CsoundFile *getCsoundFile();
00065   virtual int compile(int argc, char **argv);
00066   virtual int compile();
00067   virtual size_t getSpoutSize() const;
00068   virtual std::string getOutputSoundfileName() const;
00069   virtual int perform(int argc, char **argv);
00070   virtual int perform();
00071   virtual int performKsmps(bool absolute);
00072   virtual void cleanup();
00073   virtual void inputMessage(const char *istatement);
00074   virtual void write(const char *text);
00075   virtual bool getIsCompiled() const;
00076   virtual void setIsPerforming(bool isPerforming);
00077   virtual bool getIsPerforming() const;
00078   virtual bool getIsGo();
00079   virtual void stop();
00080   virtual void setPythonMessageCallback();
00081 };
00082 
00083 #endif
00084 

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