Gin
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions | Variables

Namespaces

namespace  Distortion
 Distortion.
 

Classes

class  ADSR
 Linear ADSR envelope generator optimized for modulation sources. More...
 
class  AnalogADSR
 Analog-modeled ADSR envelope generator for smooth, musical envelopes. More...
 
class  AudioEquationParser
 Equation parser with audio-specific functions for DSP processing. More...
 
class  AudioFifo
 Lock-free audio FIFO buffer for single producer/consumer scenarios. More...
 
struct  FuncState
 Base class for storing state in audio functions. More...
 
struct  OscState
 State storage for oscillator functions in AudioEquationParser. More...
 
struct  NoiseState
 State storage for noise generator in AudioEquationParser. More...
 
struct  HP12State
 State storage for 12dB/octave highpass filter in AudioEquationParser. More...
 
struct  HP24State
 State storage for 24dB/octave highpass filter in AudioEquationParser. More...
 
struct  BP12State
 State storage for 12dB/octave bandpass filter in AudioEquationParser. More...
 
struct  BP24State
 State storage for 24dB/octave bandpass filter in AudioEquationParser. More...
 
struct  LP12State
 State storage for 12dB/octave lowpass filter in AudioEquationParser. More...
 
struct  LP24State
 State storage for 24dB/octave lowpass filter in AudioEquationParser. More...
 
struct  Notch12State
 State storage for 12dB/octave notch filter in AudioEquationParser. More...
 
struct  Notch24State
 State storage for 24dB/octave notch filter in AudioEquationParser. More...
 
class  AudioFunctionHost
 State management for audio functions in AudioEquationParser. More...
 
class  AudioMidiFifo
 Combined audio and MIDI buffer for synchronized processing within a single thread. More...
 
class  GainProcessor
 Simple gain processor with ramping to avoid discontinuities. More...
 
class  WetDryMix
 Mix between wet and dry with a nice curve. More...
 
class  BandLimitedLookupTable
 Lookup tables for holding bandlimited waveforms. More...
 
class  BandLimitedLookupTables
 Generate and hold bandlimited lookup tables for all the common waveforms. More...
 
class  DelayLine
 Multi-channel delay line with interpolated tap reading. More...
 
class  AirWindowsDistortion
 Sine-based waveshaping distortion effect based on AirWindows plugins. More...
 
class  EnvelopeDetector
 Envelope follower for dynamics processing. More...
 
class  Dynamics
 Dynamics processor supporting compression, limiting, expansion, and gating. More...
 
struct  LinearEasing
 Linear easing function object (no easing). More...
 
struct  QuadraticInEasing
 Quadratic In easing function object. More...
 
struct  QuadraticOutEasing
 Quadratic Out easing function object. More...
 
struct  QuadraticInOutEasing
 Quadratic InOut easing function object. More...
 
struct  CubicInEasing
 Cubic In easing function object. More...
 
struct  CubicOutEasing
 Cubic Out easing function object. More...
 
struct  CubicInOutEasing
 Cubic InOut easing function object. More...
 
struct  QuarticInEasing
 Quartic In easing function object. More...
 
struct  QuarticOutEasing
 Quartic Out easing function object. More...
 
struct  QuarticInOutEasing
 Quartic InOut easing function object. More...
 
struct  QuinticInEasing
 Quintic In easing function object. More...
 
struct  QuinticOutEasing
 Quintic Out easing function object. More...
 
struct  QuinticInOutEasing
 Quintic InOut easing function object. More...
 
struct  SineInEasing
 Sine In easing function object. More...
 
struct  SineOutEasing
 Sine Out easing function object. More...
 
struct  SineInOutEasing
 Sine InOut easing function object. More...
 
struct  CircularInEasing
 Circular In easing function object. More...
 
struct  CircularOutEasing
 Circular Out easing function object. More...
 
struct  CircularInOutEasing
 Circular InOut easing function object. More...
 
struct  ExponentialInEasing
 Exponential In easing function object. More...
 
struct  ExponentialOutEasing
 Exponential Out easing function object. More...
 
struct  ExponentialInOutEasing
 Exponential InOut easing function object. More...
 
struct  ElasticInEasing
 Elastic In easing function object. More...
 
struct  ElasticOutEasing
 Elastic Out easing function object. More...
 
struct  ElasticInOutEasing
 Elastic InOut easing function object. More...
 
struct  BackInEasing
 Back In easing function object. More...
 
struct  BackOutEasing
 Back Out easing function object. More...
 
struct  BackInOutEasing
 Back InOut easing function object. More...
 
struct  BounceInEasing
 Bounce In easing function object. More...
 
struct  BounceOutEasing
 Bounce Out easing function object. More...
 
struct  BounceInOutEasing
 Bounce InOut easing function object. More...
 
class  EasedValueSmoother< T, EasingFunction >
 Smooths a value using an easing function for natural-feeling transitions. More...
 
class  EQ
 Multi-channel, multi-band equalizer with flexible filter types. More...
 
class  FastMath< F >
 Fast approximations for trigonometric and hyperbolic functions. More...
 
class  Filter
 Multi-channel biquad filter with multiple types and slopes. More...
 
class  GateEffect
 Rhythmic gate effect with programmable step sequencing. More...
 
class  LevelTracker
 Track audio levels with decay in dB. More...
 
class  LFO
 Low-Frequency Oscillator with 18 waveform shapes and modulation features. More...
 
struct  LFO::Parameters
 
class  MidiFifo
 Simple MIDI buffer for time-shifting MIDI events within a single thread. More...
 
class  Modulation
 Modulated delay effect for chorus, flanger, and phaser effects. More...
 
class  MSEG
 Multi-Segment Envelope Generator (MSEG) for complex modulation curves. More...
 
struct  MSEG::Parameters
 
struct  MSEG::Point
 
struct  MSEG::Data
 
class  WhiteNoise
 White noise generator using a normal distribution. More...
 
class  PinkNoise
 Pink noise generator using the Voss-McCartney algorithm. More...
 
class  StereoOscillator
 Virtual analog stereo oscillator with band-limited waveforms. More...
 
struct  StereoOscillator::Params
 
struct  VoicedOscillatorParams
 Parameters for VoicedStereoOscillator configuration. More...
 
class  VoicedStereoOscillator< O, P >
 Stereo oscillator with multiple voices for unison/detuning effects. More...
 
struct  VoicedStereoOscillatorParams
 Extended parameters for band-limited voiced stereo oscillator. More...
 
class  BLLTVoicedStereoOscillator
 Band-limited stereo oscillator with multiple voices for unison effects. More...
 
class  PlateReverb< F, I >
 Plate reverb from Dattorro's paper. More...
 
class  ResamplingFifo
 High-quality sample rate conversion FIFO using libsamplerate. More...
 
class  Sample
 Audio sample container for loading and playing back sample data. More...
 
class  SampleOscillator
 Sample-based oscillator with pitch tracking and looping capabilities. More...
 
class  ScratchBuffer
 Temporary audio buffer allocated from a shared pool to avoid allocations. More...
 
class  SimpleVerb
 Simple stereo reverb effect with room size and damping controls. More...
 
class  StepLFO
 Step sequencer-style LFO with programmable values per step. More...
 
class  StereoDelay
 Stereo delay effect with feedback, cross-feedback, and wet/dry mix. More...
 
class  StereoEnhancer
 Stereo Enhancer. More...
 
class  StereoProcessor
 Stereo Processor. More...
 
struct  GlideInfo
 Configuration for pitch glide (portamento/glissando) between notes. More...
 
class  SynthesiserVoice
 Extended synthesizer voice with glide support and fast-kill capability. More...
 
class  Synthesiser
 Advanced MPE-capable synthesizer with mono/poly modes, glide, and voice management. More...
 
class  TextRenderer
 Render audio to ascii waveforms. More...
 
class  ValueSmoother< T >
 Linearly smooths parameter changes over time at a constant rate. More...
 
class  Wavetable
 Wrapper around juce::OwnedArray<BandLimitedLookupTable> for managing multiple wavetables. More...
 
class  DCBlocker
 DC blocking filter (high-pass filter) to remove DC offset. More...
 
class  WTOscillator
 Wavetable oscillator with interpolation and shaping options. More...
 
struct  WTOscillator::Params
 
struct  WTVoicedStereoOscillatorParams
 Extended parameters for wavetable voiced stereo oscillator. More...
 
class  WTVoicedStereoOscillator
 Stereo wavetable oscillator with multiple voices for unison/detuning effects. More...
 

Enumerations

enum class  Wave {
  Wave::silence = 0 , Wave::sine = 1 , Wave::triangle = 2 , Wave::sawUp = 3 ,
  Wave::sawDown = 4 , Wave::pulse = 5 , Wave::square = 6 , Wave::whiteNoise = 7 ,
  Wave::pinkNoise = 8
}
 Waveform types for band-limited oscillators. More...
 

Functions

juce::Value findValue (juce::ValueTree &state, juce::Identifier name, juce::var value)
 
template<class T >
getMidiNoteInHertz (const T noteNumber, const T frequencyOfA=(T) 440.0)
 
template<class T >
getMidiNoteFromHertz (const T freq, const T frequencyOfA=(T) 440.0)
 
float velocityToGain (float velocity, float sensitivity=1.0f)
 
void applyGain (juce::AudioSampleBuffer &buffer, juce::LinearSmoothedValue< float > &gain)
 
void applyGain (juce::AudioSampleBuffer &buffer, int channel, juce::LinearSmoothedValue< float > &gain)
 
void clip (juce::AudioSampleBuffer &buffer, float low=-1.0f, float high=1.0f)
 
juce::String getMidiMessageType (const juce::MidiMessage &msg)
 
juce::AudioSampleBuffer sliceBuffer (juce::AudioSampleBuffer &input, int start, int length)
 Get a section of an audio buffer.
 
ScratchBuffer monoBuffer (const juce::AudioSampleBuffer &input)
 Get a buffer but mono.
 
template<class T >
lerp (T a, T b, T t)
 Computes the linear interpolation between a and b, if the parameter t is inside [0, 1].
 
template<class T >
int sign (T x)
 Sign +1 or -1 of number.
 
float sine (float phase, float unused1=0, float unused2=0)
 Band-limited sine wave generator.
 
float triangle (float phase, float freq, float sampleRate)
 Band-limited triangle wave generator.
 
float sawUp (float phase, float freq, float sampleRate)
 Band-limited upward sawtooth wave generator.
 
float sawDown (float phase, float freq, float sampleRate)
 Band-limited downward sawtooth wave generator.
 
float pulse (float phase, float pw, float freq, float sampleRate)
 Band-limited pulse wave generator with variable pulse width.
 
float squareWave (float phase, float freq, float sampleRate)
 Band-limited square wave generator (50% duty cycle pulse).
 
juce::AudioSampleBuffer resampleBuffer (juce::AudioSampleBuffer &, double inputRate, double outputRate, int quality=4)
 Resamples an entire audio buffer from one sample rate to another.
 
bool loadWavetables (Wavetable &bllt, double playbackSampleRate, juce::AudioSampleBuffer &buffer, double fileSampleRate, int tableSize)
 

Variables

constexpr float Q = 0.70710678118655f
 

Detailed Description

Enumeration Type Documentation

◆ Wave

enum class Wave
strong

Waveform types for band-limited oscillators.

Wave enum defines the available waveform shapes for oscillators using band-limited lookup tables. Each waveform (except noise types) is pre-computed with appropriate band-limiting to prevent aliasing.

Available Waveforms:

  • silence: No output (0.0)
  • sine: Pure sine wave (fundamental only, no harmonics)
  • triangle: Triangle wave with soft harmonics
  • sawUp: Upward sawtooth (ramp up from -1 to 1)
  • sawDown: Downward sawtooth (ramp down from 1 to -1)
  • pulse: Variable pulse width waveform
  • square: Square wave (50% duty cycle pulse)
  • whiteNoise: White noise (equal energy across all frequencies)
  • pinkNoise: Pink noise (equal energy per octave, -3dB/octave)
See also
BandLimitedLookupTables, BandLimitedLookupTable
Enumerator
silence 

Silence (outputs 0.0)

sine 

Sine wave.

triangle 

Triangle wave.

sawUp 

Upward sawtooth.

sawDown 

Downward sawtooth.

pulse 

Pulse wave (variable width)

square 

Square wave (50% pulse)

whiteNoise 

White noise.

pinkNoise 

Pink noise.

Function Documentation

◆ findValue()

juce::Value findValue ( juce::ValueTree &  state,
juce::Identifier  name,
juce::var  value 
)

◆ getMidiNoteInHertz()

template<class T >
T getMidiNoteInHertz ( const noteNumber,
const frequencyOfA = (T)440.0 
)

◆ getMidiNoteFromHertz()

template<class T >
T getMidiNoteFromHertz ( const freq,
const frequencyOfA = (T)440.0 
)

◆ velocityToGain()

float velocityToGain ( float  velocity,
float  sensitivity = 1.0f 
)

◆ applyGain() [1/2]

void applyGain ( juce::AudioSampleBuffer &  buffer,
juce::LinearSmoothedValue< float > &  gain 
)

◆ applyGain() [2/2]

void applyGain ( juce::AudioSampleBuffer &  buffer,
int  channel,
juce::LinearSmoothedValue< float > &  gain 
)

◆ clip()

void clip ( juce::AudioSampleBuffer &  buffer,
float  low = -1.0f,
float  high = 1.0f 
)

◆ getMidiMessageType()

juce::String getMidiMessageType ( const juce::MidiMessage &  msg)

◆ sliceBuffer()

juce::AudioSampleBuffer sliceBuffer ( juce::AudioSampleBuffer &  input,
int  start,
int  length 
)

Get a section of an audio buffer.

◆ monoBuffer()

ScratchBuffer monoBuffer ( const juce::AudioSampleBuffer &  input)

Get a buffer but mono.

◆ lerp()

template<class T >
T lerp ( a,
b,
t 
)

Computes the linear interpolation between a and b, if the parameter t is inside [0, 1].

◆ sign()

template<class T >
int sign ( x)

Sign +1 or -1 of number.

◆ sine()

float sine ( float  phase,
float  unused1 = 0,
float  unused2 = 0 
)

Band-limited sine wave generator.

Generates a pure sine wave at the given phase. No band-limiting is needed for sine waves as they contain only the fundamental frequency.

Parameters
phasePhase position (0.0 to 1.0)
unused1Unused parameter for API consistency
unused2Unused parameter for API consistency
Returns
Sample value (-1.0 to 1.0)

◆ triangle()

float triangle ( float  phase,
float  freq,
float  sampleRate 
)

Band-limited triangle wave generator.

Generates an anti-aliased triangle wave using pre-computed band-limited wavetables based on the fundamental frequency.

Parameters
phasePhase position (0.0 to 1.0)
freqFundamental frequency in Hz
sampleRateCurrent sample rate
Returns
Sample value (-1.0 to 1.0)

◆ sawUp()

float sawUp ( float  phase,
float  freq,
float  sampleRate 
)

Band-limited upward sawtooth wave generator.

Generates an anti-aliased sawtooth wave that rises from -1 to 1 using pre-computed band-limited wavetables.

Parameters
phasePhase position (0.0 to 1.0)
freqFundamental frequency in Hz
sampleRateCurrent sample rate
Returns
Sample value (-1.0 to 1.0)

◆ sawDown()

float sawDown ( float  phase,
float  freq,
float  sampleRate 
)

Band-limited downward sawtooth wave generator.

Generates an anti-aliased sawtooth wave that falls from 1 to -1 using pre-computed band-limited wavetables.

Parameters
phasePhase position (0.0 to 1.0)
freqFundamental frequency in Hz
sampleRateCurrent sample rate
Returns
Sample value (-1.0 to 1.0)

◆ pulse()

float pulse ( float  phase,
float  pw,
float  freq,
float  sampleRate 
)

Band-limited pulse wave generator with variable pulse width.

Generates an anti-aliased pulse wave with adjustable pulse width (duty cycle). Uses pre-computed band-limited wavetables for alias-free waveforms.

Parameters
phasePhase position (0.0 to 1.0)
pwPulse width / duty cycle (0.0 to 1.0, 0.5 = square wave)
freqFundamental frequency in Hz
sampleRateCurrent sample rate
Returns
Sample value (-1.0 to 1.0)

◆ squareWave()

float squareWave ( float  phase,
float  freq,
float  sampleRate 
)

Band-limited square wave generator (50% duty cycle pulse).

Generates an anti-aliased square wave using pre-computed band-limited wavetables. Equivalent to pulse() with pw = 0.5.

Parameters
phasePhase position (0.0 to 1.0)
freqFundamental frequency in Hz
sampleRateCurrent sample rate
Returns
Sample value (-1.0 to 1.0)

◆ resampleBuffer()

juce::AudioSampleBuffer resampleBuffer ( juce::AudioSampleBuffer &  ,
double  inputRate,
double  outputRate,
int  quality = 4 
)

Resamples an entire audio buffer from one sample rate to another.

This is a convenience function that resamples a complete audio buffer in one operation, without requiring a ResamplingFifo. Useful for offline processing where you need to convert an entire buffer at once.

Parameters
bufferThe audio buffer to resample (input)
inputRateThe sample rate of the input buffer
outputRateThe desired output sample rate
qualityResampling quality (0-4, default 4): 0 = SRC_SINC_FASTEST, 1 = SRC_SINC_MEDIUM_QUALITY, 2 = SRC_SINC_BEST_QUALITY, 3 = SRC_ZERO_ORDER_HOLD, 4 = SRC_LINEAR
Returns
A new AudioSampleBuffer at the output sample rate
See also
ResamplingFifo

◆ loadWavetables()

bool loadWavetables ( Wavetable bllt,
double  playbackSampleRate,
juce::AudioSampleBuffer &  buffer,
double  fileSampleRate,
int  tableSize 
)

Variable Documentation

◆ Q

constexpr float Q = 0.70710678118655f
constexpr