|
SynthLab SDK
|
Abstract base class that encapsulates functionality of a module; used with the Module-Core paradigm. More...
#include <synthbase.h>
Public Member Functions | |
| SynthModule (std::shared_ptr< MidiInputData > _midiInputData) | |
| Constructs a SynthModule. More... | |
| virtual | ~SynthModule () |
| Removes cores, if any. | |
| virtual bool | reset (double _sampleRate)=0 |
| virtual bool | update ()=0 |
| virtual bool | render (uint32_t samplesToProcess=1)=0 |
| virtual bool | doNoteOn (MIDINoteEvent ¬eEvent)=0 |
| virtual bool | doNoteOff (MIDINoteEvent ¬eEvent)=0 |
| virtual bool | initialize (const char *_dllDirectory) |
| virtual int32_t | getState () |
| virtual bool | shutdown () |
| virtual bool | startGlideModulation (GlideInfo &glideInfo) |
| starts the built-in glide modulator More... | |
| std::shared_ptr< Modulators > | getModulationInput () |
| std::shared_ptr< Modulators > | getModulationOutput () |
| std::shared_ptr< AudioBuffer > | getAudioBuffers () |
| void | setUnisonMode (double _unisonDetuneCents, double _unisonStarPhase) |
| void | setFMBuffer (std::shared_ptr< AudioBuffer > pmBuffer) |
| void | clearFMBuffer () |
| virtual bool | getModuleStrings (std::vector< std::string > &moduleStrings, std::string ignoreStr="") |
| Gets a std::vector of Module Strings. More... | |
| virtual bool | getModuleStrings (uint32_t coreIndex, std::vector< std::string > &moduleStrings, std::string ignoreStr) |
| Gets a std::vector of Module Strings from a particular core. More... | |
| virtual bool | getAllModuleStrings (std::vector< std::string > &moduleStrings, std::string ignoreStr) |
| Gets a std::vector of all Module Strings concatenated from all cores in succession. More... | |
| virtual bool | getModKnobStrings (std::vector< std::string > &modKnobStrings) |
| Gets a std::vector of Mod Knob label strings for the selected core. More... | |
| virtual bool | getModKnobStrings (uint32_t coreIndex, std::vector< std::string > &modKnobStrings) |
| Gets a std::vector of Mod Knob label strings for a given core; if the core cannot be found returs the mod knob labels of the module itself. More... | |
| virtual bool | getModuleCoreStrings (std::vector< std::string > &moduleCoreStrings) |
| Gets a std::vector of the names of the four cores in this module. More... | |
| virtual bool | addModuleCore (std::shared_ptr< ModuleCore > core) |
| adds a module core to the module's set of four More... | |
| virtual uint32_t | getSelectedCoreIndex () |
| get the index of the selected core More... | |
| virtual bool | selectModuleCore (uint32_t index) |
| Select a core. More... | |
| virtual bool | selectDefaultModuleCore () |
| Select the default core, which is always the first in the list. More... | |
| virtual void | packCores () |
| packs the cores into non-null ordering | |
| virtual bool | clearModuleCores () |
| Clears out the module core pointer list. More... | |
| virtual void | setStandAloneMode (bool b) |
| Sets the stand-alone mode flag on all cores. More... | |
Protected Attributes | |
| std::shared_ptr< Modulators > | modulationInput = std::make_shared<Modulators>() |
| std::shared_ptr< Modulators > | modulationOutput = std::make_shared<Modulators>() |
| std::shared_ptr< MidiInputData > | midiInputData = nullptr |
| std::shared_ptr< AudioBuffer > | audioBuffers = nullptr |
| std::unique_ptr< GlideModulator > | glideModulator |
| std::shared_ptr< AudioBuffer > | fmBuffer = nullptr |
| std::shared_ptr< ModuleCore > | moduleCores [NUM_MODULE_CORES] |
| std::shared_ptr< ModuleCore > | selectedCore = nullptr |
| ModuleCoreData | moduleData |
| modulestrings (16) and mod knob labels (4) More... | |
| double | unisonDetuneCents = 0.0 |
| double | unisonStartPhase = 0.0 |
| bool | standAloneMode = false |
| CoreProcData | coreProcessData |
| std::string | dllDirectory |
Abstract base class that encapsulates functionality of a module; used with the Module-Core paradigm.
| SynthLab::SynthModule::SynthModule | ( | std::shared_ptr< MidiInputData > | _midiInputData | ) |
Constructs a SynthModule.
| _midiInputData | MIDI input data interface; if nullptr, then object synthesizes its own |
|
virtual |
adds a module core to the module's set of four
|
virtual |
Clears out the module core pointer list.
|
virtual |
Gets a std::vector of all Module Strings concatenated from all cores in succession.
| moduleStrings | vector pf strings retured via pass-by-reference |
| ignoreStr | a string to ignore when filling the vector (e.g. "empty string") |
|
inline |
access to audio buffers (I/O)
|
virtual |
Gets a std::vector of Mod Knob label strings for the selected core.
| modKnobStrings | vector pf strings retured via pass-by-reference |
|
virtual |
Gets a std::vector of Mod Knob label strings for a given core; if the core cannot be found returs the mod knob labels of the module itself.
| modKnobStrings | vector pf strings retured via pass-by-reference |
|
inline |
access to modulators
|
virtual |
Gets a std::vector of the names of the four cores in this module.
| moduleCoreStrings | vector pf strings retured via pass-by-reference |
|
virtual |
Gets a std::vector of Module Strings.
functions for dealing with the module cores; SynthLab only; these may be ignored in many stand-alone implementations
| moduleStrings | vector pf strings retured via pass-by-reference |
| ignoreStr | a string to ignore when filling the vector (e.g. "empty string") |
|
virtual |
Gets a std::vector of Module Strings from a particular core.
| coreIndex | index of core to query for its strings |
| moduleStrings | vector pf strings retured via pass-by-reference |
| ignoreStr | a string to ignore when filling the vector (e.g. "empty string") |
|
virtual |
get the index of the selected core
|
inlinevirtual |
EG only
Reimplemented in SynthLab::DXEG, and SynthLab::EnvelopeGenerator.
|
inlinevirtual |
for knowing the path to the DLL itself for loading PCM samples or other resources
|
pure virtual |
abstract base class functions: see synth book for details
Implemented in SynthLab::WaveSequencer, SynthLab::WTOscillator, SynthLab::PCMOscillator, SynthLab::FMOperator, SynthLab::WSOscillator, SynthLab::SynthFilter, SynthLab::Oscillator, SynthLab::Oscillator, SynthLab::SynthLFO, SynthLab::VAOscillator, SynthLab::KSOscillator, SynthLab::SynthModuleWithCores, SynthLab::DXEG, SynthLab::EnvelopeGenerator, SynthLab::AudioDelay, SynthLab::NoiseOscillator, SynthLab::DCA, SynthLab::SynthModuleNoCores, and SynthLab::FilterModule.
|
virtual |
Select the default core, which is always the first in the list.
|
virtual |
Select a core.
| index | index of core to select |
|
inline |
for DX synths only
|
virtual |
Sets the stand-alone mode flag on all cores.
| alone | true if stand-alone mode, false otherwise |
|
inline |
— for unison mode only
|
virtual |
starts the built-in glide modulator
for starting glide modulation on underlying objects
Reimplemented in SynthLab::WSOscillator.
|
protected |
audio buffers for pitched oscillator and filters and DCA
|
protected |
helpers for dealing with Cores
|
protected |
audio buffers for pitched oscillator and filters and DCA
|
protected |
glide modulator
|
protected |
MIDI Data Interface
|
protected |
modulation input bus
|
protected |
modulation outputs bus
|
protected |
for core-specific stuff
|
protected |
modulestrings (16) and mod knob labels (4)
for modules without cores