From ad4f87e0ebfd361c69c7ba9adc29292305f21f7c Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 27 Jan 2026 22:16:23 +0100 Subject: feat(audio): Implement real-time spectrogram synthesizer Adds a multi-voice, real-time audio synthesis engine that generates sound from spectrogram data using an Inverse Discrete Cosine Transform (IDCT). Key features: - A thread-safe, double-buffered system for dynamically updating spectrograms in real-time without interrupting audio playback. - Core DSP components: FDCT, IDCT, and Hamming window functions. - A simple sequencer in the main loop to demonstrate scripted audio events and dynamic updates. - Unit tests for the new synth engine and Hamming window, integrated with CTest. - A file documenting the build process, features, and how to run tests. --- HOWTO.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 HOWTO.md (limited to 'HOWTO.md') diff --git a/HOWTO.md b/HOWTO.md new file mode 100644 index 0000000..afd517e --- /dev/null +++ b/HOWTO.md @@ -0,0 +1,40 @@ +# How To + +This document describes the common commands for building and testing the project. + +## Features + +* **Real-time Audio Synthesis**: The demo features a multi-voice synthesizer that generates audio in real-time from spectrograms. +* **Dynamic Sound Updates**: Spectrograms can be updated dynamically and safely during runtime for evolving soundscapes. + +## Building + +### Debug Build + +```bash +cmake -S . -B build +cmake --build build +``` + +### Size-Optimized Build + +```bash +cmake -S . -B build -DDEMO_SIZE_OPT=ON +cmake --build build +``` + +## Testing + +To build and run the tests, you need to enable the `DEMO_BUILD_TESTS` option in CMake. + +Available test suites: +* `HammingWindowTest`: Verifies the properties of the Hamming window function. +* `SynthEngineTest`: Verifies the core functionality of the audio synthesizer. + +```bash +cmake -S . -B build -DDEMO_BUILD_TESTS=ON +cmake --build build +cd build +ctest +cd .. +``` -- cgit v1.2.3