Simple echo ("delay effect").
More...
#include "SuperpoweredEcho.h"
|
| Echo (unsigned int samplerate, unsigned int maximumSamplerate=96000) |
| Constructor. More...
|
|
| ~Echo () |
|
bool | process (float *input, float *output, unsigned int numberOfFrames) |
| Processes the audio. More...
|
|
bool | process (float *input, float *output, unsigned int numberOfFrames, FX *fx) |
| Processes the audio. More...
|
|
void | setMix (float mix) |
| Sets dry and wet simultaneously with a good balance between them. More...
|
|
Simple echo ("delay effect").
One instance allocates around 770 kb memory.
◆ Echo() [1/2]
Superpowered::Echo::Echo |
( |
unsigned int |
samplerate, |
|
|
unsigned int |
maximumSamplerate = 96000 |
|
) |
| |
Constructor.
Enabled is false by default.
- Parameters
-
samplerate | The initial sample rate in Hz. |
maximumSamplerate | Maximum sample rate (affects memory usage, the lower the smaller). |
◆ ~Echo()
Superpowered::Echo::~Echo |
( |
| ) |
|
◆ Echo() [2/2]
Superpowered::Echo::Echo |
( |
const Echo & |
| ) |
|
|
private |
◆ operator=()
Echo& Superpowered::Echo::operator= |
( |
const Echo & |
| ) |
|
|
private |
◆ process() [1/2]
bool Superpowered::Echo::process |
( |
float * |
input, |
|
|
float * |
output, |
|
|
unsigned int |
numberOfFrames |
|
) |
| |
|
virtual |
Processes the audio.
Always call it in the audio processing callback, regardless if the effect is enabled or not for smooth, audio-artifact free operation. It's never blocking for real-time usage. You can change all properties and call setMix() on any thread, concurrently with process().
- Returns
- If process() returns with true, the contents of output are replaced with the audio output. If process() returns with false, it indicates silence. The contents of output are not changed in this case (not overwritten with zeros).
- Parameters
-
input | Pointer to floating point numbers. 32-bit interleaved stereo input. Can point to the same location with output (in-place processing). Special case: input can be NULL, the effect will output the tail only in this case. |
output | Pointer to floating point numbers. 32-bit interleaved stereo output. |
numberOfFrames | Number of frames to process. Recommendation for best performance: multiply of 4, minimum 64. |
Implements Superpowered::FX.
◆ process() [2/2]
bool Superpowered::Echo::process |
( |
float * |
input, |
|
|
float * |
output, |
|
|
unsigned int |
numberOfFrames, |
|
|
FX * |
fx |
|
) |
| |
Processes the audio.
Always call it in the audio processing callback, regardless if the effect is enabled or not for smooth, audio-artifact free operation. It's never blocking for real-time usage. You can change all properties and call setMix() on any thread, concurrently with process().
- Returns
- If process() returns with true, the contents of output are replaced with the audio output. If process() returns with false, the contents of output are not changed.
- Parameters
-
input | Pointer to floating point numbers. 32-bit interleaved stereo input. Can point to the same location with output (in-place processing). Special case: input can be NULL, the effect will output the tail only in this case. |
output | Pointer to floating point numbers. 32-bit interleaved stereo output. |
numberOfFrames | Number of frames to process. Recommendation for best performance: multiply of 4, minimum 64. |
fx | fx->process() will be used to pass audio from input to the internal buffer. For example, a resonant Filter can provide a nice color for the echoes. |
◆ setMix()
void Superpowered::Echo::setMix |
( |
float |
mix | ) |
|
Sets dry and wet simultaneously with a good balance between them.
Wet always equals to mix, but dry changes with a curve.
- Parameters
-
◆ beats
float Superpowered::Echo::beats |
Delay in beats. 0.03125 to 2.
◆ bpm
float Superpowered::Echo::bpm |
◆ decay
float Superpowered::Echo::decay |
◆ dry
float Superpowered::Echo::dry |
◆ enabled
bool Superpowered::FX::enabled = false |
|
inherited |
Turns the effect on/off. The actual switch will happen on the next process() call for smooth, audio-artifact free operation.
◆ internals
echoInternals* Superpowered::Echo::internals |
|
private |
◆ samplerate
unsigned int Superpowered::FX::samplerate = 0 |
|
inherited |
◆ wet
float Superpowered::Echo::wet |
The documentation for this class was generated from the following file:
- latest/Superpowered/SuperpoweredEcho.h