ofxPDSP
|
Digital Delay with a low pass filter in the feedback path. More...
#include <Delay.h>
Public Member Functions | |
Delay (float timeMs) | |
Patchable & | set (float timeMs, float feedback=0.0f, float damping=0.0f) |
sets the default delay time, optionally the default feedback and damping values and returns the unit ready to be patched. More... | |
Patchable & | in_signal () |
Sets "signal" as selected input and returns this Unit ready to be patched. This is the default input. This is the signal to be delayed. You can patch the output back to this input to make a feedback path. | |
Patchable & | in_time () |
Sets "time" as selected input and returns this Unit ready to be patched. This is the delay time and obviously support audio-rate modulation. The time value is clamped to the max delay time of the delay buffer and to the minimum by the audio buffer size time. | |
Patchable & | in_feedback () |
Sets "feedback" as selected output and returns this Unit ready to be patched. This input is the feedback amount of delay and supports audio-rate modulation. | |
Patchable & | in_damping () |
Sets "damping" as selected output and returns this Unit ready to be patched. This input control how much the signal in the delay feedback path will be filtered and supports audio-rate modulation. Default value is 0.0f and the value are clipped in the 0.0f - 0.99f range. | |
Patchable & | out_signal () |
Sets "signal" as selected output and returns this Unit ready to be patched. This is the default output. This is the delayed signal. | |
void | setMaxTime (float timeMs) |
sets maximum delay time of this delay, The old delay buffer will be deleted and a new will be created, so this is absolutely not thread safe if used in the audio callback. More... | |
float | meter_time () const |
returns the time value at the start of the last processed buffer. This method is thread-safe. | |
Public Member Functions inherited from pdsp::Unit | |
Unit (const Unit &other) | |
Unit & | operator= (const Unit &other) |
Unit (Unit &&other) | |
Unit & | operator= (Unit &&other) |
virtual void | setOversampleLevel (int newOversampleLevel) |
sets the unit oversample level More... | |
int | getOversampleLevel () const |
returns the Unit oversample level | |
Public Member Functions inherited from pdsp::Patchable | |
void | resetInputToDefault () |
resets the selected input to the default. | |
void | resetOutputToDefault () |
resets the selected output to the default. | |
Patchable & | in (const char *tag) |
sets the selected input to the one tagged with "tag", if tag is a valid string, and returns this Patchable ready to be patched. More... | |
Patchable & | out (const char *tag) |
sets the selected output to the one tagged with "tag", if tag is a valid string, and returns this Patchable ready to be patched. More... | |
void | disconnectIn () |
disconnects all the outputs connected to the selected input, then resets the selected input to the default. | |
void | disconnectOut () |
disconnects all the inputs connected to the selected output, then resets the selected output to the default. | |
void | disconnectAll () |
disconnects all the inputs and outputs to their connected outputs and inputs. Also resets the selected input and output to the default. | |
InputNode & | getSelectedInput () |
returns the selected input, you can patch a Patchable or OutputNode to it with the >> operator. | |
OutputNode & | getSelectedOutput () |
returns the selected output, you can patch it to another Patchable or InputNode with the >> operator. | |
std::vector< std::string > | getInputsList () |
returns a vector of the valid input tags | |
std::vector< std::string > | getOutputsList () |
returns a vector of the valid input tags | |
Additional Inherited Members | |
Static Public Member Functions inherited from pdsp::Preparable | |
static double | getGlobalSampleRate () |
Protected Member Functions inherited from pdsp::Unit | |
void | prepareToPlay (int expectedBufferSize, double sampleRate) override |
you have to use this method only in the constructor, inside if(dynamicConstruction){ } More... | |
const float * | processInput (InputNode &node, int &stateNow) |
process the given input, gives you a pointer to the processed buffer as result and its state More... | |
float | processAndGetSingleValue (InputNode &input, int pos) |
process the given input, gives you a pointer to the processed buffer as result and its state More... | |
float * | getOutputBufferToFill (OutputNode &node) |
gets a pointer to the output buffer for rendering audio to it, and sets the OutputNode state to AudioRate More... | |
void | setControlRateOutput (OutputNode &node, float scalarValue) |
sets the OutputNode buffer to "Changed" and its first value to scalarValue More... | |
void | setOutputToZero (OutputNode &node) |
sets the OutputNode buffer to "Changed" and its first value to 0.0f More... | |
void | updateOutputNodes () |
call this method in the Unit constructor after adding all the Outputs, this is mandatory for the inner working of the patching framework. | |
Protected Member Functions inherited from pdsp::Patchable | |
void | addOutput (const char *tag, OutputNode &output) |
method to add outputs when constructing a Unit More... | |
void | addInput (const char *tag, InputNode &input) |
method to add inputs when constructing a Unit More... | |
void | addModuleOutput (const char *tag, Patchable &unit) |
method to add outputs when constructing a module More... | |
void | addModuleInput (const char *tag, Patchable &unit) |
method to add outputs when constructing a module More... | |
Digital Delay with a low pass filter in the feedback path.
Delay is a delay with a one pole low pass filter inside the feedback path, controllable with the in_damping() input. The feedback is controllable with the in_feedback(). Both the values from in_feedback() and in_damping() are used just once per buffer, so it has really no sense to patch Units running at audio rate to them. in_time() instead supports audio-rate modulation. The max time of Delay is settable with setMaxTime() or using the Delay( float timeMS ) constructor.
pdsp::Patchable & pdsp::Delay::set | ( | float | timeMs, |
float | feedback = 0.0f , |
||
float | damping = 0.0f |
||
) |
sets the default delay time, optionally the default feedback and damping values and returns the unit ready to be patched.
[in] | timeMs | delay time in milliseconds |
[in] | feedback | feedback value, if not given 0.0f |
[in] | damping | damping value, if not given 0.0f |
void pdsp::Delay::setMaxTime | ( | float | timeMs | ) |
sets maximum delay time of this delay, The old delay buffer will be deleted and a new will be created, so this is absolutely not thread safe if used in the audio callback.
[in] | timeMs | new maximum delay time. |