Skip to content

A simple example of how to implement a polyphonic audio synthesiser using SIMD on both ARM and x86 CPU's.

License

Notifications You must be signed in to change notification settings

seclorum/SIMDsynth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIMDsynth

This is a SIMD-accelerated audio synthesizer written in C++ with the JUCE framework, using vectorized math to simulate polyphonic audio synthesis with filters, envelopes, LFOs, and sine and saw wavetable oscillators.

It's optimized for both x86-64 (SSE) and ARM64 (NEON) platforms, in order to highlight the SIMD techniques in a JUCE context.

Some rudimentary factory presets are included in the plugin - they will be created automatically on first execution of the plugin.

High-Level Overview

  • Multiple synthesis formats (AU, VST3, Standalone)
  • Up to 16-voice polyphony
  • Multiple waveforms (sine, saw, square) using wavetables
  • Sub-oscillator with keyboard tracking
  • Unison feature with detune
  • ADSR envelopes
  • LFO modulation
  • Filter per voice
  • 4x oversampling to reduce aliasing
  • Preset management system
  • Includes a basic set of Factory Presets for testing purposes.

Technical Implementation:

  • Built using the JUCE framework
  • Uses SIMD (Single Instruction Multiple Data) optimization for efficient processing
  • Supports both x86 (SSE/SSE2/SSE4.1) and ARM (NEON) architectures
  • Implements wavetable synthesis with 2048-point tables
  • Uses modern C++17 features
  • Note: An initial attempt at integrating Tony Hardy-Bicks' DFM1 Filter is available in the "dfm1-filter-integration" development branch!

screenshot

TODO:

  • Move file operations to a background thread to prevent audio glitches.

  • Add a modulation matrix for more flexible routing

  • Implement additional LFO waveforms

  • Add envelope curves/shapes

  • Add filter types (currently has one filter type)

  • Implement additional oscillator waveforms

  • Add effects section (reverb, delay, etc.)

  • Add MIDI learn functionality for parameters

  • Implement undo/redo for parameter changes

  • Add parameter smoothing for all controls

  • Consider splitting the Voice struct into smaller components (Oscillator, Envelope, etc.)

  • Move DSP-related code into separate classes

  • Create a dedicated parameter management class

  • Add more robust error handling for file operations

  • Implement graceful fallbacks for missing presets

  • Add parameter validation

  • Add unit tests for DSP algorithms

  • Implement automated testing for preset loading/saving

  • Add performance benchmarks

  • Use more C++17 features:

	// Instead of raw pointer management:
	std::optional<Filter> filter;
	std::variant<float, double> sampleType;
  • Consider implementing the PIMPL idiom to reduce compilation dependencies and improve build times.
  • Add detailed parameter documentation
  • Include performance considerations and CPU usage guidelines
  • Document the SIMD optimization strategy
  • Add code comments explaining DSP algorithms

(c) 2025, seclorum

About

A simple example of how to implement a polyphonic audio synthesiser using SIMD on both ARM and x86 CPU's.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages