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

SynthCore Namespace Reference

The main part of the synth framework. More...


class  BiFilter
 BiFilter is a biquadratic filter implementation. More...

class  BiQuad
 The BiQuad module implements biquadratic filters. More...

class  coord
 Simple coordinate class. More...

class  DelayLine
 Simple (non-fractional) delay line. More...

class  Dummy
 Benchmarking module. More...

class  EnvData
 Class for storing envelope, and performing interpolation. More...

class  Envelope3
 Envelope3 is a generic envelope module. More...

class  Fourier
 Static class for doing Fourier transformations and constructing simple waveforms. More...

class  FreqTable
 Freqtable converts midinotes to their corresponding frequency in Hz. More...

class  Input
 Input is a generic input, used in almost every module. More...

class  Module
 Base class for all modules. More...

class  moduleRegistry
 Register all modules in this class In order to load Synth presets from an XML file and in order to use the GUI the system needs to 'know' about the modules. It needs a pointer to a constructor so that it can create objects from string representations at run-time. Therefore it is neccesary to register using the 'add' method in the registry. More...

class  Multiplier
 Multiplier: IE ring-modulator, VCA or amplitude modulator. More...

class  Output
 Output is a generic connector endpoint. More...

class  Polyphony
 Combines the polyphonic parts into one signal. More...

class  Sample
 Sample Container. More...

class  SampleMap
 SampleMap maps midikeys (0-127) to corresponding samples. More...

class  Sampler
 The main oscillator class. More...

class  Synth
 The main container for the various modules. More...

class  SynthEngine
class  SynthVoice
class  Tube
 Tube is a waveguide based experimental delay/reverb kind of effect. More...

class  WaveShaper
 Aplies a non-linear transformation to input signal. More...


typedef std::vector< coord
* >::const_iterator 
 coord iterator

typedef std::list< Module * > ModuleMap
typedef std::list< Module
* >::const_iterator 


ostream & operator<< (ostream &ostr, Module &myMod)
 Modules can be streamed to an ostream.

ostream & operator<< (ostream &ostr, Module *myMod)
 Modules pointers can also be streamed to an ostream.

Detailed Description

The main part of the synth framework.

The design is centered around the Synth class. This class is a container for:

  • A number (determined by the polyphony) of SynthVoices, which again host various Modules.
  • A number of pre-processing Modules.
A simple synth design would be:

A primary SynthVoice (AKA firstVoice) consisting of: A Sampler (A voltage controlled oscillator component) connected to an envelope, which again would be connected to an filter (controlled by another envelope).

This SynthVoice would be duplicated to the desired number of polyphonic voices. Notice that the duplication is not entirely trivial since the Modules need to share ressources (IE only the Sampler in firstVoice would contain the actual wavedata).

The pre-processing modules in the Synth unit would consist of a 'Polyphony' Module, mixing together the SynthVoice, and typically an reverb or delay effect (as for now, the tube Module would be a good substitute).

The following rules must be followed if new Modules are added.

  • All modules must be derived from the Module base class.
  • They must implement methods for serializing themselves: IE getXML() and loadXML()
  • You must use the Input and Output class for connecting to other Modules.
  • They must implement a second static 'constructor', taking a SynthVoice as argument! Notice that I cannot enforce this requirement through a purely virtual method, since there is no such thing as a virtual static class in C++. Example: static Module * newInstance(SynthVoice * S) { return new BiQuad(S); }
  • They must register themselves by having something like this called at run-time: moduleRegistry::getInstance()->add(typeid(BiQuad).name(),BiQuad::newInstance);

Typedef Documentation

typedef std::list< Module * > SynthCore::ModuleMap

Why do I have to define these two times: Why can't the compiler use the definitions in "Synth.h"? I dont get it.

Definition at line 93 of file Synth.h.

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