DSP modules

Contents

DSP modules#

Filter modules#

namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES#
class lowPassFilter : public YSE::DSP::dspObject#

Low-pass filter packaged as a chainable dspObject.

Wraps DSP::lowPass for use in a sound’s DSP chain via YSE::sound::setDSP.

Note

Mono only — feeds the first channel of the multichannel buffer.

Public Functions

lowPassFilter()#
inline virtual ~lowPassFilter()#
lowPassFilter &frequency(Flt value)#

Set the cutoff frequency in Hz.

Flt frequency()#

Current cutoff frequency.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmFrequency#
std::shared_ptr<DSP::buffer> result#
std::shared_ptr<lowPass> lp#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class highPassFilter : public YSE::DSP::dspObject#

High-pass filter packaged as a chainable dspObject.

Wraps DSP::highPass for use in a sound’s DSP chain via YSE::sound::setDSP.

Note

Mono only — feeds the first channel of the multichannel buffer.

Public Functions

highPassFilter()#
inline virtual ~highPassFilter()#
highPassFilter &frequency(Flt value)#

Set the cutoff frequency in Hz.

Flt frequency()#

Current cutoff frequency.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmFrequency#
std::shared_ptr<DSP::buffer> result#
std::shared_ptr<highPass> hp#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class bandPassFilter : public YSE::DSP::dspObject#

Resonant band-pass filter packaged as a chainable dspObject.

Wraps DSP::bandPass for use in a sound’s DSP chain via YSE::sound::setDSP.

Note

Mono only — feeds the first channel of the multichannel buffer.

Public Functions

bandPassFilter()#
inline virtual ~bandPassFilter()#
bandPassFilter &frequency(Flt value)#

Set the centre frequency in Hz.

Flt frequency()#

Current centre frequency.

bandPassFilter &setQ(Flt value)#

Set the resonance (Q factor).

Flt getQ()#

Current Q factor.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmFrequency#
aFlt parmQ#
std::shared_ptr<DSP::buffer> result#
std::shared_ptr<bandPass> bp#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class sweepFilter : public YSE::DSP::dspObject#

Auto-wah / sweep filter — LFO-modulated resonant filter as a chainable dspObject.

Internally an oscillator drives a vcf to sweep its cutoff. The oscillator shape is selectable at construction. Choose SAW for a classic wah ramp, TRIANGLE for a smoother sweep, SQUARE for a step.

Public Types

enum SHAPE#

LFO shape that drives the filter sweep.

Values:

enumerator TRIANGLE#
enumerator SAW#
enumerator SQUARE#

Public Functions

sweepFilter(SHAPE shape = SAW)#

Construct with the chosen sweep shape.

inline virtual ~sweepFilter()#
sweepFilter &speed(Flt value)#

Set the LFO speed in Hz.

Flt speed()#

Current LFO speed.

sweepFilter &depth(Int value)#

Set the sweep depth as 0–100.

Int depth()#

Current sweep depth.

sweepFilter &frequency(Int value)#

Set the centre frequency as 0–100.

Int frequency()#

Current centre frequency value.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmSpeed#
aInt parmDepth#
aInt parmFrequency#
SHAPE shape#
std::shared_ptr<wavetable> table#
std::shared_ptr<oscillator> osc#
std::shared_ptr<vcf> filter#
std::shared_ptr<DSP::buffer> result#
std::shared_ptr<interpolate4> interpolator#

Delay modules#

namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class basicDelay : public YSE::DSP::dspObject#

Three-tap delay packaged as a chainable dspObject.

Reads the same delay line at up to three offsets, each with its own time and gain. Use highPassDelay / lowPassDelay for the same effect with a filter in the feedback path.

Note

Mono only — feeds the first channel of the multichannel buffer.

Subclassed by YSE::DSP::MODULES::highPassDelay, YSE::DSP::MODULES::lowPassDelay

Public Types

enum DELAY_NR#

Which of the three delay taps to address.

Values:

enumerator FIRST#
enumerator SECOND#
enumerator THIRD#

Public Functions

basicDelay()#
inline virtual ~basicDelay()#
basicDelay &set(DELAY_NR nr, Flt time, Flt gain)#

Configure one of the three taps.

Parameters:
  • nr – Tap to configure.

  • time – Delay time in milliseconds.

  • gain – Gain for this tap.

Flt time(DELAY_NR nr)#

Current delay time of tap nr.

Flt gain(DELAY_NR nr)#

Current gain of tap nr.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Protected Functions

virtual void createPreFilter()#

Hook for subclasses to construct a pre-filter (used by lowPassDelay / highPassDelay).

virtual void applyPreFilter(DSP::buffer &buffer)#

Hook for subclasses to apply their pre-filter to buffer before reading from the delay line.

Protected Attributes

aFlt time0#
aFlt time1#
aFlt time2#
aFlt gain0#
aFlt gain1#
aFlt gain2#
std::shared_ptr<DSP::buffer> result#
std::shared_ptr<DSP::delay> delayBuffer#
std::shared_ptr<DSP::buffer> reader#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class highPassDelay : public YSE::DSP::MODULES::basicDelay#

basicDelay with a high-pass filter in front.

Useful for ducking bass build-up in long delay tails. Inherits the three-tap layout from basicDelay.

Public Functions

highPassDelay()#
highPassDelay &frequency(Flt value)#

Set the high-pass cutoff frequency in Hz.

Flt frequency()#

Current cutoff frequency.

Private Functions

virtual void createPreFilter()#

Hook for subclasses to construct a pre-filter (used by lowPassDelay / highPassDelay).

virtual void applyPreFilter(DSP::buffer &buffer)#

Hook for subclasses to apply their pre-filter to buffer before reading from the delay line.

Private Members

aFlt parmFrequency#
std::shared_ptr<DSP::highPass> hp#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class lowPassDelay : public YSE::DSP::MODULES::basicDelay#

basicDelay with a low-pass filter in front.

Darkens each successive echo — the classic “tape” delay character. Inherits the three-tap layout from basicDelay.

Public Functions

lowPassDelay()#
lowPassDelay &frequency(Flt value)#

Set the low-pass cutoff frequency in Hz.

Flt frequency()#

Current cutoff frequency.

Private Functions

virtual void createPreFilter()#

Hook for subclasses to construct a pre-filter (used by lowPassDelay / highPassDelay).

virtual void applyPreFilter(DSP::buffer &buffer)#

Hook for subclasses to apply their pre-filter to buffer before reading from the delay line.

Private Members

aFlt parmFrequency#
std::shared_ptr<DSP::lowPass> lp#

Effect modules#

namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

class hilbert#

Hilbert transform — splits a signal into two outputs 90° out of phase.

Used to build single-side-band modulators, frequency shifters, and analytic-signal envelope followers. Implemented as two biquad cascades per channel; L1/L2 form the in-phase path, R1/R2 the quadrature path.

Public Functions

hilbert()#
void operator()(YSE::DSP::buffer &in, YSE::DSP::buffer &out1, YSE::DSP::buffer &out2)#

Run the transform.

Parameters:
  • in – Input mono buffer.

  • out1 – In-phase output.

  • out2 – Quadrature output (90° lagged from out1).

Public Members

biQuad L1#

In-phase path biquads (output 1).

biQuad L2#
biQuad R1#

Quadrature path biquads (output 2, 90° lagged).

biQuad R2#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

class ringModulator : public YSE::DSP::dspObject#

Ring modulator as a chainable dspObject.

Multiplies the input by an internal sine carrier — classic bell-like / robot-voice timbres. The carrier frequency is the only user-controllable parameter.

Public Functions

ringModulator()#
inline virtual ~ringModulator()#
ringModulator &frequency(Flt value)#

Set the carrier frequency in Hz.

Flt frequency()#

Current carrier frequency.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmFrequency#
aFlt parmLevel#
std::shared_ptr<sine> sineGen#
std::shared_ptr<buffer> result#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

class sineWave : public YSE::DSP::dspSourceObject#

Sine-wave sound source.

The simplest possible source for YSE::sound::create(dspSourceObject&, ...). Useful as a test tone, a tuning reference, or the building block for an additive synth.

Public Functions

sineWave()#
virtual void frequency(float value) override#

Set the sine frequency in Hz.

Takes effect immediately, or on the next note-on transition if the sound is in a stopped/paused state.

float frequency()#

Current frequency.

virtual void process(SOUND_STATUS &intent) override#

dspSourceObject audio-thread entry point.

virtual void process(SOUND_STATUS &intent, Int &latency)#

Variant of process that reports latency.

Audio-thread only.

virtual void process(SOUND_STATUS &intent) = 0

Fill samples with the next audio block.

Parameters:

intent – The current playback intent (start, stop, pause, etc.) — subclasses use this to drive amplitude envelopes and trigger transitions.

Private Members

sine sineGen#
YSE::DSP::drawableBuffer volumeCurve#
YSE::DSP::drawableBuffer frequencyCurve#
aFlt parmFrequency#
Flt currentFrequency#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class granulator : public YSE::DSP::dspObject#

Granular synthesis effect as a chainable dspObject.

Maintains a circular pool of recent input audio, then spawns short “grains” sampled from random positions in that pool. The grain rate, length, and pitch are configurable, each with a random component for natural variation. Use for clouds, textures, time-stretch, and pitch-shifting effects.

Public Functions

granulator(UInt poolSize = SAMPLERATE * 5, UInt maxGrains = 16)#

Construct the granulator.

Parameters:
  • poolSize – Size of the circular input buffer in samples. Limits how far back into the input the granulator can reach. Default is 5 seconds at the engine’s current sample rate.

  • maxGrains – Maximum number of grains alive simultaneously.

inline virtual ~granulator()#
virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

granulator &grainFrequency(UInt value)#

Set the spawn rate in grains per second.

inline UInt grainFrequency()#

Current spawn rate.

granulator &grainLength(UInt samples, UInt random = 0)#

Set the grain length.

Parameters:
  • samples – Length in samples.

  • random – Random variation around samples, in samples.

inline UInt grainLength()#

Current grain length.

granulator &grainTranspose(Flt pitch, Flt random = 0)#

Set the grain pitch shift.

Parameters:
  • pitch – Pitch multiplier (1.0 = unchanged, 2.0 = octave up).

  • random – Random pitch variation.

inline Flt grainTranspose()#

Current grain pitch multiplier.

granulator &gain(Flt value)#

Set the output gain.

inline Flt gain()#

Current output gain.

Private Members

UInt poolSize#
UInt poolPosition#
std::shared_ptr<DSP::buffer> pool#
clip limiter#
aUInt parmFrequency#
aUInt parmLength#
aUInt parmLengthRandom#
aFlt parmTranspose#
aFlt parmTransposeRandom#
aFlt parmGain#
Flt leftOverStarts#
UInt maxGrains#
std::shared_ptr<std::vector<grain>> grainPool#
UInt readPos#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class phaser : public YSE::DSP::dspObject#

Phaser effect as a chainable dspObject.

Four-stage all-pass cascade modulated by a triangle LFO. Produces the familiar sweeping “jet plane” sound.

Public Functions

phaser()#
inline virtual ~phaser()#
phaser &frequency(Flt value)#

Set the sweep LFO frequency.

Typically very low; default 0.3 Hz. Must be > 0.

Flt frequency()#

Current LFO frequency.

phaser &range(Flt value)#

Set the sweep range coefficient.

Default 0.1; values above 0.5 are unstable.

Flt range()#

Current sweep range.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmFrequency#
aFlt parmRange#
std::shared_ptr<lfo> triangle#
std::shared_ptr<realOneZeroReversed> rzero1#
std::shared_ptr<realOnePole> rpole1#
std::shared_ptr<realOneZeroReversed> rzero2#
std::shared_ptr<realOnePole> rpole2#
std::shared_ptr<realOneZeroReversed> rzero3#
std::shared_ptr<realOnePole> rpole3#
std::shared_ptr<realOneZeroReversed> rzero4#
std::shared_ptr<realOnePole> rpole4#
std::shared_ptr<buffer> result#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DSP

Audio buffers, oscillators, filters, envelopes, and effect modules.

Build chains of DSP::dspObject to process a sound, DSP::dspSourceObject to feed one. Single-channel audio data lives in DSP::buffer and its drawing / file / wavetable subclasses.

namespace MODULES
class difference : public YSE::DSP::dspObject#

FM difference-tone synthesis as a chainable dspObject.

Generates a sine carrier and clips the sum of input and carrier to produce difference-frequency intermodulation tones. A simple FM/distortion hybrid for buzzy, bell-like textures.

Note

Mono only — feeds the first channel of the multichannel buffer.

Public Functions

difference()#
inline virtual ~difference()#
difference &frequency(Flt value)#

Set the carrier frequency in Hz.

Flt frequency()#

Current carrier frequency.

difference &amplitude(Flt value)#

Set the carrier amplitude.

Flt amplitude()#

Current carrier amplitude.

virtual void create()#

dspObject lifecycle hook — allocates buffers.

virtual void process(std::vector<YSE::DSP::buffer> &buffer)#

dspObject audio-thread entry point.

Private Members

aFlt parmFrequency#
aFlt parmAmplitude#
std::shared_ptr<DSP::buffer> result#
std::shared_ptr<sine> source#
std::shared_ptr<clip> clipper#