Skip to content

First working version of ToneDriver with SDL2 implementation

Pre-release
Pre-release

Choose a tag to compare

@SeanP2001 SeanP2001 released this 13 Jul 21:02
· 6 commits to main since this release

🎵 ToneDriver v0.1

This commit completes the first working version of the cross-platform tone generation system.

Core Features:

  • Defined the abstract ToneDriver interface for audio tone synthesis
  • Implemented ToneDriverSDL2 using SDL2 with support for:
    • Frequency playback (continuous or timed)
    • Note and octave-based playback
    • Chords (via arpeggios)
    • Adjustable amplitude
    • Basic validation for note ranges
  • Generated square wave audio output using SDL audio callbacks
  • Added blocking delay support for rests and duration-based playback

Examples:

  • test-tone.cpp: Basic tone output test
  • test-frequencies.cpp: Frequency sweep across the spectrum
  • precomputed-frequencies.cpp: Basic tone output without computing frequencies
  • major-scale.cpp: Plays 12 major scales across multiple octaves

Other Improvements:

  • Added comprehensive Doxygen documentation for all classes and functions

Known Limitations:

  • Uses blocking SDL_Delay() for timing; will be replaced with non-blocking timers in a future update

Next Steps:

  • Replace blocking delays with SDL_AddTimer or threading

Closes milestone: v0.1