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

Simple gate effect. More...

#include "SuperpoweredGate.h"

Inheritance diagram for Superpowered::Gate:
Collaboration diagram for Superpowered::Gate:

Public Member Functions

 Gate (unsigned int samplerate)
 Constructor. More...
 
 ~Gate ()
 
bool process (float *input, float *output, unsigned int numberOfFrames)
 Processes the audio. More...
 

Public Attributes

float beats
 The rhythm in beats to open and close the "gate". From 1/64 beats to 4 beats. (>= 0.015625 and <= 4) More...
 
float bpm
 Limited to >= 40 and <= 250. 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...
 
unsigned int samplerate = 0
 Sample rate in Hz. More...
 
float wet
 Limited to >= 0 and <= 1. More...
 

Private Member Functions

 Gate (const Gate &)
 
Gateoperator= (const Gate &)
 

Private Attributes

gateInternals * internals
 

Detailed Description

Simple gate effect.

It doesn't allocate any internal buffers and needs just a few bytes of memory.

Constructor & Destructor Documentation

◆ Gate() [1/2]

Superpowered::Gate::Gate ( unsigned int  samplerate)

Constructor.

Enabled is false by default.

Parameters
samplerateThe initial sample rate in Hz.

◆ ~Gate()

Superpowered::Gate::~Gate ( )

◆ Gate() [2/2]

Superpowered::Gate::Gate ( const Gate )
private

Member Function Documentation

◆ operator=()

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

◆ process()

bool Superpowered::Gate::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 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: minimum 64.

Implements Superpowered::FX.

Member Data Documentation

◆ beats

float Superpowered::Gate::beats

The rhythm in beats to open and close the "gate". From 1/64 beats to 4 beats. (>= 0.015625 and <= 4)

◆ bpm

float Superpowered::Gate::bpm

Limited to >= 40 and <= 250.

◆ 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

gateInternals* Superpowered::Gate::internals
private

◆ samplerate

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

Sample rate in Hz.

◆ wet

float Superpowered::Gate::wet

Limited to >= 0 and <= 1.


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