Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AirWindowsDistortion Class Reference

Sine-based waveshaping distortion effect based on AirWindows plugins. More...

#include <gin_distortion.h>

Public Member Functions

 AirWindowsDistortion ()
 
void setSampleRate (double sr)
 
void reset ()
 
void setParams (float density, float highpass, float output, float mix)
 
void process (juce::AudioSampleBuffer &buffer)
 

Detailed Description

Sine-based waveshaping distortion effect based on AirWindows plugins.

AirWindowsDistortion provides musical distortion using sine waveshaping with density control that can produce both soft saturation and aggressive clipping. Based on Chris Johnson's AirWindows plugins, it features integrated highpass filtering, automatic denormalization prevention, and 32-bit dithering.

Key Features:

Parameters:

The density parameter uses sine waveshaping which produces odd harmonics, creating a warm, musical distortion character. Values above 1.0 apply multiple passes of waveshaping for increasingly aggressive distortion.

Usage:

distortion.setSampleRate(44100.0);
// Subtle saturation
distortion.setParams(0.5f, // moderate density
0.1f, // slight highpass
0.8f, // reduce output
0.7f); // 70% wet
distortion.process(audioBuffer);
// Aggressive clipping
distortion.setParams(2.0f, // high density
0.3f, // more highpass
0.6f, // compensate output
1.0f); // fully wet
Sine-based waveshaping distortion effect based on AirWindows plugins.
Definition gin_distortion.h:94
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25

Credits: Based on AirWindows plugins by Chris Johnson (MIT License)

See also
Filter, WaveShaper

Constructor & Destructor Documentation

◆ AirWindowsDistortion()

AirWindowsDistortion::AirWindowsDistortion ( )

References reset().

Member Function Documentation

◆ setSampleRate()

void AirWindowsDistortion::setSampleRate ( double  sr)

◆ reset()

void AirWindowsDistortion::reset ( )

Referenced by AirWindowsDistortion().

◆ setParams()

void AirWindowsDistortion::setParams ( float  density,
float  highpass,
float  output,
float  mix 
)

◆ process()

void AirWindowsDistortion::process ( juce::AudioSampleBuffer &  buffer)

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