|
Gin
|
Wavetable oscillator with interpolation and shaping options. More...
#include <gin_wtoscillators.h>
Classes | |
| struct | Params |
Public Member Functions | |
| WTOscillator ()=default | |
| void | setSampleRate (double sr) |
| void | noteOn (float p=-1) |
| void | process (float note, const Params ¶ms, juce::AudioSampleBuffer &buffer) |
| void | processAdding (float note, const Params ¶ms, juce::AudioSampleBuffer &buffer) |
| void | processAddingSimple (float note, const Params ¶ms, juce::AudioSampleBuffer &buffer) |
| void | processAddingComplex (float note, const Params ¶ms, juce::AudioSampleBuffer &buffer) |
| void | processAddingCrossfadeComplex (float note, const Params ¶ms, juce::AudioSampleBuffer &buffer) |
| template<typename T > | |
| void | postProcess (const Params ¶ms, T &v) |
| void | setWavetable (Wavetable *table) |
| void | setBlockDC (bool b) |
Wavetable oscillator with interpolation and shaping options.
WTOscillator provides high-quality wavetable synthesis with support for table morphing, formant shifting, phase distortion (bend), and post-processing effects like asymmetry and wavefolding. It uses band-limited wavetables to avoid aliasing.
Key Features:
Parameters (via Params struct):
Usage:
|
default |
| void WTOscillator::setSampleRate | ( | double | sr | ) |
References DCBlocker::setCutoff(), and DCBlocker::setSampleRate().
| void WTOscillator::noteOn | ( | float | p = -1 | ) |
| void WTOscillator::process | ( | float | note, |
| const Params & | params, | ||
| juce::AudioSampleBuffer & | buffer | ||
| ) |
References processAdding().
| void WTOscillator::processAdding | ( | float | note, |
| const Params & | params, | ||
| juce::AudioSampleBuffer & | buffer | ||
| ) |
References WTOscillator::Params::bend, WTOscillator::Params::formant, DCBlocker::process(), processAddingComplex(), processAddingCrossfadeComplex(), and processAddingSimple().
Referenced by process().
| void WTOscillator::processAddingSimple | ( | float | note, |
| const Params & | params, | ||
| juce::AudioSampleBuffer & | buffer | ||
| ) |
References Wavetable::getUnchecked(), WTOscillator::Params::leftGain, math::min(), WTOscillator::Params::position, postProcess(), WTOscillator::Params::rightGain, and Wavetable::size().
Referenced by processAdding().
| void WTOscillator::processAddingComplex | ( | float | note, |
| const Params & | params, | ||
| juce::AudioSampleBuffer & | buffer | ||
| ) |
| void WTOscillator::processAddingCrossfadeComplex | ( | float | note, |
| const Params & | params, | ||
| juce::AudioSampleBuffer & | buffer | ||
| ) |
| void WTOscillator::postProcess | ( | const Params & | params, |
| T & | v | ||
| ) |
References WTOscillator::Params::asym, WTOscillator::Params::fold, math::lerp(), math::max(), math::min(), math::pow2(), and math::pow4().
Referenced by processAddingComplex(), processAddingCrossfadeComplex(), and processAddingSimple().
| void WTOscillator::setWavetable | ( | Wavetable * | table | ) |
| void WTOscillator::setBlockDC | ( | bool | b | ) |