From 9dcf94ab01269311b4e5d39be23c95560904c626 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 27 Jan 2026 23:09:27 +0100 Subject: feat: Implement spectool & specview; refactor coding style; update docs This commit introduces new tools for spectrogram manipulation and visualization, establishes a consistent coding style, and updates project documentation. Key changes include: - **Spectrogram Tools: - : A command-line utility for analyzing WAV/MP3 files into custom spectrogram format and playing back these spectrograms via the synth engine. - : A command-line tool for visualizing spectrogram files as ASCII art in the console. - **Coding Style Enforcement: - Added a configuration file enforcing LLVM-based style with 2-space indentation, no tabs, and an 80-column line limit. - Renamed all C++ source files from to for project consistency. - Applied automatic formatting using exit across the entire codebase. - **Documentation & Workflow: - Created to define a commit policy requiring tests to pass before committing. - Updated with instructions for building and using and , and referenced . - Updated and to reflect the new tools, audio architecture decisions (real-time additive synthesis, double-buffering for dynamic updates, WAV/MP3 support), coding style, and development workflow. - **Build System: - Modified to: - Include new targets for and under the option. - Update source file extensions to . - Add a new end-to-end test for to the suite. --- HOWTO.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'HOWTO.md') diff --git a/HOWTO.md b/HOWTO.md index d948e59..059a039 100644 --- a/HOWTO.md +++ b/HOWTO.md @@ -25,6 +25,8 @@ cmake --build build ## Testing +**Commit Policy**: Always run tests before committing. Refer to `CONTRIBUTING.md` for details. + To build and run the tests, you need to enable the `DEMO_BUILD_TESTS` option in CMake. Available test suites: @@ -69,3 +71,30 @@ The executable will be located at `build/spectool`. ```bash ./build/spectool play path/to/input.spec ``` + +### Spectrogram Viewer (`specview`) + +A command-line tool for visualizing spectrogram files in ASCII art. + +#### Building the Tool + +`specview` is built along with `spectool` when enabling `DEMO_BUILD_TOOLS`. + +```bash +cmake -S . -B build -DDEMO_BUILD_TOOLS=ON +cmake --build build +``` +The executable will be located at `build/specview`. + +#### Usage + +**View a spectrogram file:** +```bash +./build/specview path/to/input.spec +``` + +## References and links + +drum-kit: https://drive.google.com/file/d/13tc7XjkMg-tigvje5qpp6XazK-VcOjoc/view +(got from https://www.reddit.com/r/Drumkits/) + -- cgit v1.2.3