logo
Main Page | Namespaces | Classes | Compounds | Files | Compound Members | Related

polyphony.h

00001 //
00002 //  SYNTOPIA. See http://Syntopia.sourceforge.net for details and documentation.        
00003 //
00004 //      Author of this file: Mikael Hvidtfeldt Christensen (mikaelc@users.sourceforge.net)
00005 //
00006 
00007 #pragma warning(disable: 4786)
00008 
00009 #ifndef __polyphony__
00010 #define __polyphony__
00011 
00012 #include "Modules.h"
00013 #include "input.h"
00014 #include "output.h"
00015 #include "sndutils.h"
00016 #include <string>
00017 
00018 namespace SynthCore {
00019 
00020         
00022 
00026 class Polyphony : public Module {
00027         
00028 public: // ----------------------------------------------------------
00029 
00030         virtual std::string getName() {return "polyphony";}
00031         
00033         Output * Output1;
00034 
00036         static Module * newInstance(SynthVoice * S) ;
00037 
00039         Polyphony() ;
00040         
00042         ~Polyphony(); 
00043 
00045         void update() ;
00046 
00047         std::string getXML(int indent );
00048 
00050         void addVoice(SynthVoice * voice);
00051 
00054         void setVoices(int number);
00055 
00057         int getVoiceCount() {return polyVoices; }
00058 
00060         void clearInputs();
00061 
00063         void loadXML(XMLNode * n, bool firstPass);
00064 
00065 private: // ---------------------------------------------------
00066 
00067         vector<Input *> inputs;
00068         vector<SynthVoice *> voices;
00069         float temp;
00070         int polyVoices;
00071         float polyVoicesInv;
00072 };
00073 
00074 }; // end of namespace: SynthCore
00075 
00076 
00077 #endif

Syntopia Project. Visit the web page, or the SourceForge page.
Docs made by Doxygen. Email: Mikael Christensen