SuperpoweredSDK  v2.0.2
Superpowered Audio SDK
Superpowered::Flanger Class Reference

Flanger with aggressive sound ("jet"). More...

#include "SuperpoweredFlanger.h"

Inheritance diagram for Superpowered::Flanger:
Collaboration diagram for Superpowered::Flanger:

Public Member Functions

 Flanger (unsigned int samplerate)
 Constructor. More...
 
 ~Flanger ()
 
float getDepthMs ()
 Returns with the current depth in milliseconds, 0.3f to 8.0f (0.3 ms to 8 ms). More...
 
bool process (float *input, float *output, unsigned int numberOfFrames)
 Processes the audio. More...
 

Public Attributes

float bpm
 The bpm of the current audio. Limited to >= 40 and <= 250. More...
 
float clipperMaximumDb
 The flanger has a Clipper inside to prevent overdrive. This is the maximumDb parameter. More...
 
float clipperThresholdDb
 The flanger has a Clipper inside to prevent overdrive. This is the thresholdDb parameter. More...
 
float depth
 0 to 1 (0 is 0.3 ms, 1 is 8 ms). More...
 
bool enabled = false
 Turns the effect on/off. The actual switch will happen on the next process() call for smooth, audio-artifact free operation. More...
 
float lfoBeats
 The length in beats between the "lowest" and the "highest" jet sound, >= 0.25 and <= 128. More...
 
unsigned int samplerate = 0
 Sample rate in Hz. More...
 
bool stereo
 True: stereo, false: mono. More...
 
float wet
 0 to 1. More...
 

Private Member Functions

 Flanger (const Flanger &)
 
Flangeroperator= (const Flanger &)
 

Private Attributes

flangerInternals * internals
 

Detailed Description

Flanger with aggressive sound ("jet").

One instance allocates around 80 kb memory.

Constructor & Destructor Documentation

◆ Flanger() [1/2]

Superpowered::Flanger::Flanger ( unsigned int  samplerate)

Constructor.

Enabled is false by default.

Parameters
samplerateThe initial sample rate in Hz.

◆ ~Flanger()

Superpowered::Flanger::~Flanger ( )

◆ Flanger() [2/2]

Superpowered::Flanger::Flanger ( const Flanger )
private

Member Function Documentation

◆ getDepthMs()

float Superpowered::Flanger::getDepthMs ( )

Returns with the current depth in milliseconds, 0.3f to 8.0f (0.3 ms to 8 ms).

◆ operator=()

Flanger& Superpowered::Flanger::operator= ( const Flanger )
private

◆ process()

bool Superpowered::Flanger::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 getDepthMs() 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
inputPointer to floating point numbers. 32-bit interleaved stereo input.
outputPointer to floating point numbers. 32-bit interleaved stereo output. Can point to the same location with input (in-place processing).
numberOfFramesNumber of frames to process. Recommendations for best performance: multiply of 4, minimum 64.

Implements Superpowered::FX.

Member Data Documentation

◆ bpm

float Superpowered::Flanger::bpm

The bpm of the current audio. Limited to >= 40 and <= 250.

◆ clipperMaximumDb

float Superpowered::Flanger::clipperMaximumDb

The flanger has a Clipper inside to prevent overdrive. This is the maximumDb parameter.

◆ clipperThresholdDb

float Superpowered::Flanger::clipperThresholdDb

The flanger has a Clipper inside to prevent overdrive. This is the thresholdDb parameter.

◆ depth

float Superpowered::Flanger::depth

0 to 1 (0 is 0.3 ms, 1 is 8 ms).

◆ 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

flangerInternals* Superpowered::Flanger::internals
private

◆ lfoBeats

float Superpowered::Flanger::lfoBeats

The length in beats between the "lowest" and the "highest" jet sound, >= 0.25 and <= 128.

◆ samplerate

unsigned int Superpowered::FX::samplerate = 0
inherited

Sample rate in Hz.

◆ stereo

bool Superpowered::Flanger::stereo

True: stereo, false: mono.

◆ wet

float Superpowered::Flanger::wet

0 to 1.


The documentation for this class was generated from the following file: