SynthLab SDK
|
Audio Ping-Pong Delay module. More...
#include <audiodelay.h>
Public Member Functions | |
AudioDelay (std::shared_ptr< MidiInputData > _midiInputData, std::shared_ptr< AudioDelayParameters > _parameters, uint32_t blockSize=64) | |
Constructs a stereo audio delay processor. More... | |
virtual bool | reset (double _sampleRate) override |
Resets object to initialized state. More... | |
virtual bool | update () override |
Updates the selected core. More... | |
virtual bool | render (uint32_t samplesToProcess=1) override |
Processes audio through the stereo delay. More... | |
virtual bool | doNoteOn (MIDINoteEvent ¬eEvent) override |
Perform note-on operations for the component. More... | |
virtual bool | doNoteOff (MIDINoteEvent ¬eEvent) override |
Perform note-off operations for the component. More... | |
std::shared_ptr< AudioDelayParameters > | getParameters () |
Public Member Functions inherited from SynthLab::SynthModule | |
SynthModule (std::shared_ptr< MidiInputData > _midiInputData) | |
Constructs a SynthModule. More... | |
virtual | ~SynthModule () |
Removes cores, if any. | |
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 Member Functions | |
void | createDelayBuffers (double _sampleRate, double _bufferLength_mSec) |
Create new circular buffers on init, or anytime the sample rate changes. More... | |
Protected Attributes | |
std::shared_ptr< AudioDelayParameters > | parameters = nullptr |
double | sampleRate = 0.0 |
current sample rate | |
double | samplesPerMSec = 0.0 |
samples per millisecond, for easy access calculation | |
double | delayInSamples_L = 0.0 |
double includes fractional part | |
double | delayInSamples_R = 0.0 |
double includes fractional part | |
double | bufferLength_mSec = 0.0 |
buffer length in mSec | |
unsigned int | bufferLength = 0 |
buffer length in samples | |
double | wetMix = 0.707 |
wet output default = -3dB | |
double | dryMix = 0.707 |
dry output default = -3dB | |
CircularBuffer< double > | delayBuffer_L |
LEFT delay buffer of doubles. | |
CircularBuffer< double > | delayBuffer_R |
RIGHT delay buffer of doubles. | |
Protected Attributes inherited from SynthLab::SynthModule | |
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 |
Audio Ping-Pong Delay module.
Base Class: SynthModule
Databases: None
GUI Parameters: AudioDelayParameters
std::shared_ptr<AudioDelayParameters> getParameters()
Ordinarily, this operation happens just prior to calling the render() function so that is the preferred method of operation to avoid multiple calls to the update() function, which is usually the most CPU intensive function of the SynthModule.
Access to Modulators
Access to audio buffers (I/O)
Reads:
Writes:
Construction:
(1) For use within a synth project, the constructor is specialized to use shared recources for:
The owning object (SynthVoice for the SynthLab projects) must pass these valid pointers to the object at construction time. Typically the engine or voice will be the primary synthesizers of these resources. See the 2nd Edition Synth Book for more information.
(2) Standalone:
To use in standalone mode, call the constructor with the shared resoure pointers as null:
AudioDelay(nullptr, nullptr, 64);
In standalone mode, the object creates and maintains these resources:
Render:
SynthLab::AudioDelay::AudioDelay | ( | std::shared_ptr< MidiInputData > | _midiInputData, |
std::shared_ptr< AudioDelayParameters > | _parameters, | ||
uint32_t | blockSize = 64 |
||
) |
Constructs a stereo audio delay processor.
One and only specialized constructor; pointers may be null for stanalone
_midiInputData | shared MIDI input resource; may be nullptr |
_parameters | shared GUI and operational parameters; may be nullptr |
blockSize | the synth block process size in frames (stereo) |
|
protected |
Create new circular buffers on init, or anytime the sample rate changes.
creation function
|
overridevirtual |
Perform note-off operations for the component.
Implements SynthLab::SynthModule.
|
overridevirtual |
Perform note-on operations for the component.
Implements SynthLab::SynthModule.
|
inline |
For standalone operation only; not used in SynthLab synth projects
|
overridevirtual |
Processes audio through the stereo delay.
Implements SynthLab::SynthModule.
|
overridevirtual |
Resets object to initialized state.
SynthModule Overrides
_sampleRate | the current sample rate in Hz |
Implements SynthLab::SynthModule.
|
overridevirtual |
Updates the selected core.
Implements SynthLab::SynthModule.
|
protected |
For standalone operation only; not used in SynthLab synth projects