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

Guitar distortion effect including Marshall cabinet, ADA cabinet and V-Twin preamp simulation, 5-band equalizer, bass and treble tone controls and two distortion sounds. More...

#include "SuperpoweredGuitarDistortion.h"

Inheritance diagram for Superpowered::GuitarDistortion:
Collaboration diagram for Superpowered::GuitarDistortion:

Public Member Functions

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

Public Attributes

bool ada
 Enables ADA cabinet simulation. Adds a lot of bass and treble. More...
 
float bassFrequency
 High-pass filter frequency in Hz. From 1 Hz to 250 Hz. More...
 
bool distortion0
 Enables the first distortion sound, that is similar to Boss DS-1. More...
 
bool distortion1
 Enables the second distortion sound, that is similar to Tyrian. More...
 
float drive
 Drive percentage, from 0 to 1. 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 eq2200HzDecibel
 EQ 2200 Hz decibel gain. Limit: -96 to 24. More...
 
float eq240HzDecibel
 EQ 240 Hz decibel gain. Limit: -96 to 24. More...
 
float eq6600HzDecibel
 EQ 6600 Hz decibel gain. Limit: -96 to 24. More...
 
float eq750HzDecibel
 EQ 750 Hz decibel gain. Limit: -96 to 24. More...
 
float eq80HzDecibel
 EQ 80 Hz decibel gain. Limit: -96 to 24. More...
 
float gainDecibel
 Gain value in decibel. Limit: -96 to 24. More...
 
bool marshall
 Enables Marshall cabinet simulation. More...
 
unsigned int samplerate = 0
 Sample rate in Hz. More...
 
float trebleFrequency
 Low-pass filter frequency in Hz. From 6000 Hz to the half of the current sample rate. More...
 
bool vtwin
 Enables V-Twin preamp simulation. Recommended for blues/jazz. More...
 

Private Member Functions

 GuitarDistortion (const GuitarDistortion &)
 
GuitarDistortionoperator= (const GuitarDistortion &)
 

Private Attributes

gdInternals * internals
 

Detailed Description

Guitar distortion effect including Marshall cabinet, ADA cabinet and V-Twin preamp simulation, 5-band equalizer, bass and treble tone controls and two distortion sounds.

One instance allocates around 32 kb memory.

Constructor & Destructor Documentation

◆ GuitarDistortion() [1/2]

Superpowered::GuitarDistortion::GuitarDistortion ( unsigned int  samplerate)

Constructor.

Enabled is false by default.

Parameters
samplerateThe initial sample rate in Hz.

◆ ~GuitarDistortion()

Superpowered::GuitarDistortion::~GuitarDistortion ( )

◆ GuitarDistortion() [2/2]

Superpowered::GuitarDistortion::GuitarDistortion ( const GuitarDistortion )
private

Member Function Documentation

◆ operator=()

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

◆ process()

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

Implements Superpowered::FX.

Member Data Documentation

◆ ada

bool Superpowered::GuitarDistortion::ada

Enables ADA cabinet simulation. Adds a lot of bass and treble.

◆ bassFrequency

float Superpowered::GuitarDistortion::bassFrequency

High-pass filter frequency in Hz. From 1 Hz to 250 Hz.

◆ distortion0

bool Superpowered::GuitarDistortion::distortion0

Enables the first distortion sound, that is similar to Boss DS-1.

◆ distortion1

bool Superpowered::GuitarDistortion::distortion1

Enables the second distortion sound, that is similar to Tyrian.

◆ drive

float Superpowered::GuitarDistortion::drive

Drive percentage, from 0 to 1.

◆ 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.

◆ eq2200HzDecibel

float Superpowered::GuitarDistortion::eq2200HzDecibel

EQ 2200 Hz decibel gain. Limit: -96 to 24.

◆ eq240HzDecibel

float Superpowered::GuitarDistortion::eq240HzDecibel

EQ 240 Hz decibel gain. Limit: -96 to 24.

◆ eq6600HzDecibel

float Superpowered::GuitarDistortion::eq6600HzDecibel

EQ 6600 Hz decibel gain. Limit: -96 to 24.

◆ eq750HzDecibel

float Superpowered::GuitarDistortion::eq750HzDecibel

EQ 750 Hz decibel gain. Limit: -96 to 24.

◆ eq80HzDecibel

float Superpowered::GuitarDistortion::eq80HzDecibel

EQ 80 Hz decibel gain. Limit: -96 to 24.

◆ gainDecibel

float Superpowered::GuitarDistortion::gainDecibel

Gain value in decibel. Limit: -96 to 24.

◆ internals

gdInternals* Superpowered::GuitarDistortion::internals
private

◆ marshall

bool Superpowered::GuitarDistortion::marshall

Enables Marshall cabinet simulation.

◆ samplerate

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

Sample rate in Hz.

◆ trebleFrequency

float Superpowered::GuitarDistortion::trebleFrequency

Low-pass filter frequency in Hz. From 6000 Hz to the half of the current sample rate.

◆ vtwin

bool Superpowered::GuitarDistortion::vtwin

Enables V-Twin preamp simulation. Recommended for blues/jazz.


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