ImageToScore.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 IMAGETOSCORE_H
00023 #define IMAGETOSCORE_H
00024 
00025 #include "Platform.hpp"
00026 #ifdef SWIG
00027 %module CsoundAC
00028 %{
00029 #include "Silence.hpp"
00030 %}
00031 #else
00032 #include "Silence.hpp"
00033 using namespace boost::numeric;
00034 #endif
00035 
00036 class Fl_Image;
00037 
00038 namespace csound
00039 {
00044         class ImageToScore : public ScoreNode
00045         {
00046         protected:
00047                 std::string imageFilename;
00048                 Fl_Image *image;
00049                 size_t maximumVoiceCount;
00050                 double minimumValue;
00051                 static void rgbToHsv(double r, double g, double b, double &h, double &s, double &v);
00052                 virtual void getPixel(size_t x, size_t y, double &hue, double &saturation, double &value) const;
00053                 virtual void translate(double x, double y, double hue, double value, Event &event) const;
00054         public:
00055                 ImageToScore(void);
00056                 virtual ~ImageToScore(void);
00057                 virtual void setImageFilename(std::string imageFilename);
00058                 virtual std::string getImageFilename() const;
00059                 virtual void setMaximumVoiceCount(size_t maximumVoiceCount);
00060                 virtual size_t getMaximumVoiceCount() const;
00061                 virtual void setMinimumValue(double minimumValue);
00062                 virtual double getMinimumValue() const;
00063                 virtual void generate();
00064         };
00065 }
00066 
00067 #endif

Generated on Sun Nov 9 00:04:51 2008 for Csound and CsoundAC by  doxygen 1.5.6