DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
Oscillator.h File Reference

Band-limited oscillator: PolyBLEP waveforms plus table-minBLEP hard sync. More...

#include "DspMath.h"
#include "AudioSpec.h"
#include "AudioBuffer.h"
#include "MinBlepTable.h"
#include <cmath>
#include <algorithm>
#include <array>
#include <cassert>
#include <cstddef>
#include <type_traits>
Include dependency graph for Oscillator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dspark::Oscillator< T >
 Band-limited oscillator featuring PolyBLEP anti-aliasing and analog-modeled integration. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Detailed Description

Band-limited oscillator: PolyBLEP waveforms plus table-minBLEP hard sync.

Header-only C++20 oscillator for audio-rate synthesis and LFO duty. Saw and square discontinuities are corrected with PolyBLEP; the triangle is a leaky integration of the band-limited square (analog-style curve). Under hard sync every discontinuity is instead corrected with the shared minimum-phase band-limited step table (MinBlepTable), whose causal kernel survives the arbitrary jump amplitudes sync creates.

Features:

  • Sine / Saw / Square / Triangle, band-limited.
  • Hard sync with table-minBLEP correction (alias floor ~-90 dB or better).
  • Triangle integrator state kept in double (framework rule for recursive state).
  • Zero allocations after prepare(); the shared minBLEP table builds once there.

Dependencies: DspMath.h, AudioSpec.h, AudioBuffer.h, MinBlepTable.h.

Definition in file Oscillator.h.