Skip to content

Synthesizer DSP basics: oscillators, oversampling, filters, synth demo wip - #192

Open
kunitoki wants to merge 35 commits into
mainfrom
dev/aa_hard_sync_oscillators
Open

kunitoki wants to merge 35 commits into
mainfrom
dev/aa_hard_sync_oscillators

Conversation

@kunitoki

@kunitoki kunitoki commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

This pull request introduces significant enhancements and new features to the DSP module, focusing on advanced oversampling, oscillator, and filter capabilities, along with improvements to examples and documentation. Notably, it adds a new halfband oversampler, major oscillator classes for alias-free synthesis, a state-of-the-art state variable filter, and upgrades to the example synthesizer instruments and displays. Documentation has been updated to reflect these changes and to provide comprehensive coverage of the new APIs.

DSP Module Enhancements:

  • Added HalfbandOversampler, a new power-of-two oversampler with both linear-phase FIR and polyphase IIR designs, offering improved efficiency and flexibility for audio processing. ([CHANGELOG.mdR427-R442](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442))
  • Renamed the previous Oversampler to SincOversampler, significantly improving its speed and alias rejection, and expanded the available oversampling factors and kernel radii. ([[1]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR410), [[2]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442))
  • Introduced major oscillator classes: FourierSeries, SyncSpectralResampler, AdditiveOscillator, WavetableOscillator, and SyncOscillator, enabling alias-free oscillator synchronization and advanced spectral shaping (PrismSpectrum), as well as a new LFO class. ([[1]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442), [[2]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR451-R452))
  • Added VAStateVariableFilter, a topology-preserving transform SVF supporting eight outputs, analytic response, and advanced resonance and shelf controls. ([[1]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442), [[2]](https://github.com/kunitoki/yup/pull/192/files#diff-435ffb471327778d19da9c282345a72219bb8683a8cebaead5acca3499ae0492R150-R173))

Example and Demo Improvements:

  • Upgraded the graphics synthesizer and audio examples with new oscillator displays (including GPU raymarched waveform rendering and freehand drawing with partial extraction), a Vital-style instrument interface, enhanced modulation, and improved unison and MIDI input support. ([[1]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442), [[2]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR824-R833))
  • Added new features to the spectrum analyzer example, such as waveform selection and high-factor sweep oversampling, and made the graphics synthesizer more modular and expressive. ([CHANGELOG.mdR427-R442](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442))

Documentation Updates:

  • Expanded the DSP documentation to cover new modules and features: oscillators, advanced oversamplers, and the new state variable filter, with updated API references and usage examples. ([[1]](https://github.com/kunitoki/yup/pull/192/files#diff-f0388ca6e731ed5b28d7294ea9023718fa9f2969d34a3a604cb77c72c31d3167L6-R6), [[2]](https://github.com/kunitoki/yup/pull/192/files#diff-f0388ca6e731ed5b28d7294ea9023718fa9f2969d34a3a604cb77c72c31d3167L32-R32), [[3]](https://github.com/kunitoki/yup/pull/192/files#diff-f0388ca6e731ed5b28d7294ea9023718fa9f2969d34a3a604cb77c72c31d3167L44-R52), [[4]](https://github.com/kunitoki/yup/pull/192/files#diff-f0388ca6e731ed5b28d7294ea9023718fa9f2969d34a3a604cb77c72c31d3167R115), [[5]](https://github.com/kunitoki/yup/pull/192/files#diff-435ffb471327778d19da9c282345a72219bb8683a8cebaead5acca3499ae0492R150-R173))
  • Updated the changelog with detailed descriptions of all major changes, new APIs, and behavioral differences. ([[1]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR410), [[2]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR427-R442), [[3]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR451-R452), [[4]](https://github.com/kunitoki/yup/pull/192/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR824-R833))

Build System:

  • Enabled generation of compile_commands.json for improved tooling support. ([CMakeLists.txtR31](https://github.com/kunitoki/yup/pull/192/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aR31))

These changes collectively advance the DSP framework's capabilities for real-time audio synthesis and processing, and provide a richer set of tools for both developers and users.

@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.13084% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.34%. Comparing base (ca37b4e) to head (4e90620).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ules/yup_dsp/oscillators/yup_WavetableOscillator.h 96.72% 4 Missing ⚠️
...dules/yup_dsp/resampling/yup_HalfbandOversampler.h 98.76% 4 Missing ⚠️
modules/yup_dsp/oscillators/yup_FourierSeries.h 97.77% 3 Missing ⚠️
modules/yup_dsp/oscillators/yup_SyncOscillator.h 95.77% 3 Missing ⚠️
...es/yup_dsp/oscillators/yup_SyncSpectralResampler.h 98.08% 3 Missing ⚠️
modules/yup_core/native/yup_SystemStats_linux.cpp 66.66% 1 Missing ⚠️
...dules/yup_dsp/oscillators/yup_AdditiveOscillator.h 98.97% 1 Missing ⚠️
...ules/yup_dsp/oscillators/yup_ModulatedOscillator.h 99.05% 1 Missing ⚠️
modules/yup_dsp/oscillators/yup_PrismSpectrum.h 98.68% 1 Missing ⚠️
modules/yup_dsp/resampling/yup_SincOversampler.h 98.07% 1 Missing ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   83.17%   83.34%   +0.16%     
==========================================
  Files         916      925       +9     
  Lines      108425   109526    +1101     
==========================================
+ Hits        90183    91279    +1096     
- Misses      18242    18247       +5     
Files with missing lines Coverage Δ
...s/yup_animation/renderer/yup_AnimationRenderer.cpp 74.06% <100.00%> (-0.16%) ⬇️
modules/yup_core/system/yup_SystemStats.h 100.00% <ø> (ø)
modules/yup_dsp/oscillators/yup_WaveformBank.h 100.00% <100.00%> (ø)
modules/yup_dsp/resampling/yup_Resampler.h 98.48% <ø> (ø)
modules/yup_dsp/resampling/yup_SincTable.h 100.00% <100.00%> (ø)
modules/yup_dsp/utilities/yup_DspMath.cpp 100.00% <100.00%> (ø)
modules/yup_dsp/utilities/yup_DspMath.h 82.05% <100.00%> (+4.39%) ⬆️
modules/yup_dsp_jit/runtime/yup_YdspAudioGraph.cpp 90.94% <100.00%> (ø)
...odules/yup_dsp_jit/runtime/yup_YdspGraphInternal.h 94.56% <100.00%> (+0.72%) ⬆️
modules/yup_graphics/graphics/yup_Graphics.cpp 96.28% <100.00%> (+0.05%) ⬆️
... and 16 more

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f99db63...4e90620. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant