Main Page |
Namespaces |
Classes |
Compounds |
Files |
Compound Members |
Related
SynthCore::Module Class ReferenceBase class for all modules.
More...
#include <Modules.h>
Inheritance diagram for SynthCore::Module:
List of all members.
|
Public Methods |
| Module () |
| Constructor.
|
virtual void | update ()=0 |
virtual int | getNoInputs () |
virtual Input * | getInput (int no) |
| Returns pointer to an input.
|
virtual void | addInput (Input *I) |
virtual int | getNoOutputs () |
| Returns number of outputs.
|
virtual Output * | getOutput (int no) |
| Returns pointer to an output.
|
virtual void | addOutput (Output *I) |
virtual std::string | getName () |
| The name is just a virtual placeholder.
|
virtual void | newMidiEvent () |
virtual std::string | getXML (int indent=0) |
virtual void | loadXML (XMLNode *n, bool firstPass) |
std::string | saveID (int indent=0) |
virtual Module * | sharedClone () |
void | loadParameter (string tagName, float par, XMLNode *n) |
Static Public Methods |
int | getUniqueID () |
| Call this to get an unique ID for a module.
|
void | resetIDCount (int i) |
| Resets ID Count.
|
Module * | newInstance () |
| Use this as a 'factory' constructor.
|
std::string | saveParameter (std::string tag, float f, int indent=0) |
std::string | saveParameter (std::string tag, std::string s, int indent=0) |
Public Attributes |
SynthVoice * | hostVoice |
int | ModID |
bool | firstVoice |
Static Public Attributes |
int | IDCount = 1 |
| The counter for the unique ID.
|
Friends |
std::ostream & | operator<< (std::ostream &ostr, Module &myMod) |
| Modules can be streamed to an ostream.
|
std::ostream & | operator<< (std::ostream &ostr, Module *myMod) |
| Modules pointers can also be streamed to an ostream.
|
Detailed Description
Base class for all modules.
- Todo:
-
consider the RTTI reflection.
Definition at line 39 of file Modules.h.
Member Function Documentation
virtual void SynthCore::Module::addInput |
( |
Input * |
I |
) |
[inline, virtual] |
|
|
Adds the input to the list of inputs (myInputs) This is called from the Input constructor - so it shouldnt be called manually.
Definition at line 68 of file Modules.h.
Referenced by SynthCore::Input::Input(). |
virtual void SynthCore::Module::addOutput |
( |
Output * |
I |
) |
[inline, virtual] |
|
|
Adds the output to the list of outputs (myOutputs) This is called from the Output constructor - so it shouldnt be called manually.
Definition at line 78 of file Modules.h.
Referenced by SynthCore::Output::Output(). |
virtual int SynthCore::Module::getNoInputs |
( |
|
) |
[inline, virtual] |
|
|
A bit of 'reflection' must be implemented This returns the number of inputs. Used with getInput()
Definition at line 61 of file Modules.h. |
string SynthCore::Module::getXML |
( |
int |
indent = 0 |
) |
[virtual] |
|
void SynthCore::Module::loadXML |
( |
XMLNode * |
n, |
|
|
bool |
firstPass |
|
) |
[virtual] |
|
virtual void SynthCore::Module::newMidiEvent |
( |
|
) |
[inline, virtual] |
|
|
This function is called if the module is part of a synthVoice, and a midi event occours (As of now, the detected events are: key up/down) Overwrite this if the module needs to react on midi events (IE oscillators).
Reimplemented in SynthCore::Sampler.
Definition at line 91 of file Modules.h. |
virtual Module* SynthCore::Module::sharedClone |
( |
|
) |
[inline, virtual] |
|
virtual void SynthCore::Module::update |
( |
|
) |
[pure virtual] |
|
Member Data Documentation
bool SynthCore::Module::firstVoice
|
|
|
Used if the Module is part of a HostVoice. When a polyphonic instrument is played, certain modules (IE the oscillators and envelopes) must be duplicated. These units, which are to be duplicated are called voices. - Todo:
-
Change HostSynth to HostVoice
Definition at line 100 of file Modules.h.
Referenced by SynthCore::BiQuad::BiQuad(), SynthCore::Envelope3::Envelope3(), Module(), SynthCore::Multiplier::Multiplier(), SynthCore::Sampler::newMidiEvent(), SynthCore::Polyphony::Polyphony(), SynthCore::WaveShaper::sharedClone(), SynthCore::Tube::sharedClone(), SynthCore::Sampler::sharedClone(), SynthCore::BiQuad::sharedClone(), SynthCore::Envelope3::sharedClone(), SynthCore::Tube::Tube(), SynthCore::BiQuad::update(), SynthCore::Envelope3::update(), and SynthCore::WaveShaper::WaveShaper(). |
int SynthCore::Module::ModID
|
|
The documentation for this class was generated from the following files:
Syntopia Project. Visit the web page,
or the SourceForge page.
Docs made by Doxygen.
Email: Mikael Christensen
|