Class fx_destructor

Inheritance Relationships

Base Type

Class Documentation

class fx_destructor : public fx_effect

Effect: Destructor - provides various types of hard and soft destructors for creating different types of distortions.

Here’s a nice summary of clipping using polynomials to create various types of distortions topic: http://sites.music.columbia.edu/cmc/music-dsp/FAQs/guitar_distortion_FAQ.html

Public Functions

fx_destructor(float param_1, DESTRUCTOR_TYPE clip_type)

Basic constructor for the destructor (for models with one parameter)

Parameters
  • [in] param_1: The first parameter of the destructor (varies by destructor type)

  • [in] clip_type: Destructor function; See DESTRUCTOR_TYPE in Special parameters and constants

fx_destructor(float param_1, float param_2, DESTRUCTOR_TYPE clip_type)

Basic constructor for the destructor (for models with one parameter)

Parameters
  • [in] param_1: The first parameter of the destructor (varies by destructor type)

  • [in] param_2: The second parameter of the destructor (varies by destructor type)

  • [in] clip_type: Destructor function; See DESTRUCTOR_TYPE in Special parameters and constants

fx_destructor(float param_1, float param_2, float output_gain, DESTRUCTOR_TYPE clip_type)

Advanced constructor for the destructor.

Parameters
  • [in] param_1: The first parameter of the destructor (varies by destructor type)

  • [in] param_2: The second parameter of the destructor (varies by destructor type)

  • [in] output_gain: The output stage gain (linear)

  • [in] clip_type: Destructor function; See DESTRUCTOR_TYPE in Special parameters and constants

void enable()

Enable the destructor (it is enabled by default)

void bypass()

Bypass the destructor (will just pass clean audio through)

void set_param_1(float new_param_1)

Sets the clipping threshold.

Parameters
  • [in] threshold: The threshold for clipping should be between 0.1 and 1.0. A value of 0.1 will provide aggressive clipping where as a value of 0.8 will provide more gentle clipping.

void set_clipping_threshold(float new_clip)

Sets the clipping threshold when using SMOOTH_CLIP, SMOOTHER_CLIP or SMOOTH_FUZZ.

Parameters
  • [in] new_clip: The new clipping threshold (typically around 0.1)

void set_param_2(float new_param_2)

Sets the input drive before the destructor.

Parameters
  • [in] drive: The drive a value that the incoming signal will get multiplied by before entering the destructor.

void set_input_drive(float new_drive)

Sets the input drive when using SMOOTH_CLIP, SMOOTHER_CLIP or SMOOTH_FUZZ.

Parameters
  • [in] new_drive: The new input drive (1.0 is no input gain, >1 will drive input signal into saturation)

void set_output_gain(float new_gain)

Sets the output gain of the destructors.

Parameters
  • [in] gain: The gain is the value that will be multiplied at the output stage of the destructor.

void print_params(void)

Print the parameters for this effect.

Public Members

fx_audio_node *input

Audio routing node [input]: primary audio input

fx_audio_node *output

Audio routing node [output]: primary audio output

fx_control_node *param_1

Control routing node [input]: clipping threshold (0.0 -> 1.0)

fx_control_node *param_2

Control routing node [input]: input drive multiplier before destructor (up to 64.0)

fx_control_node *output_gain

Control routing node [input]: output gain (linear)