summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
8 dayschore(assets): Clean up demo_assets.txtskal
Removed dummy and test assets from the main demo list, leaving only the required drum samples.
8 dayschore: Update .gitignore for generated assetsskal
Ignore generated C++ asset sources and spectral data files.
8 dayschore(assets): Remove obsolete assets.txtskal
This file has been replaced by 'demo_assets.txt' and 'test_assets_list.txt'.
8 daysfeat(assets): Add auto-generation comment to packer outputskal
Updates to prepend a warning comment to the generated and files, indicating they are auto-generated and should not be manually edited.
8 daysdocs: Document gen_assets.sh usageskal
Adds instructions to HOWTO.md for re-generating assets from source audio using the provided script.
8 daysfix(assets): Update gen_assets.sh pathsskal
Synchronizes scripts/gen_assets.sh with the current project structure: uses 'demo_assets.txt' and outputs to the 'src/' directory.
8 daysfeat(assets): Separate demo and test asset listsskal
Renamed demo assets to 'demo_assets.txt' and created 'test_assets_list.txt' for AssetManagerTest to prevent interference. - Updated CMakeLists.txt to generate separate headers for demo and test. - Updated test_assets.cc to conditionally include the test-specific header. - Incorporated gen_assets.sh into the 'final' target.
8 daysfeat(demo): Add drum sequence using embedded assetsskal
Incorporates kick1.spec, snare1.spec, and hihat1.spec into the demo sequence. - Updated assets.txt with new drum identifiers. - Implemented register_spec_asset helper in main.cc to load spectral data. - Added 8th-note sequencer triggering a simple drum and bass pattern.
8 daysfeat(build): Add 'final' CMake target for production assemblyskal
Introduces a 'final' target that automates the entire production pipeline: building the stripped binary, generating assets, and performing final compression (crunching). - Updated CMakeLists.txt to define the 'final' target. - Updated HOWTO.md with instructions for running 'cmake --build build --target final'.
8 daysrefactor(assets): Optimize asset retrieval using array lookupskal
This refactors the asset management system to be more efficient and cleaner. - Moved common GetAsset/DropAsset logic to src/util/asset_manager.cc. - Changed retrieval to use an array of records (AssetRecord) for O(1) lookups instead of a switch statement. - Updated asset_packer to generate only raw data and the record array.
8 daysupdate asset systemskal
8 daysdocs: Update project context and session notesskal
Summarizes recent implementations including Asset Management, audio/visual fixes, and style improvements.
8 daysstyle: Add 3-line descriptive headers to all source filesskal
This commit applies a new project-wide rule that every source file must begin with a concise 3-line comment header describing its purpose. - Updated CONTRIBUTING.md with the new rule. - Applied headers to all .cc and .h files in src/ and tools/. - Fixed various minor compilation errors and missing includes discovered during the header update process.
8 daystest(assets): Add functional tests for asset management systemskal
This commit makes the asset packer fully functional and adds an end-to-end test suite. - Updated asset_packer.cc to read file contents and embed them as hex arrays. - Added actual asset files (null.bin, test_asset.txt) for testing. - Implemented src/tests/test_assets.cc to verify data integrity at runtime. - Refactored CMakeLists.txt to handle generated file dependencies correctly.
8 daysfeat(assets): Implement basic asset packing systemskal
Introduces a new asset management system to embed binary assets directly into the demo executable. - Creates the directory for asset definition and an descriptor file. - Implements to generate (with enum and declaration) and (with placeholder data). - Integrates into CMake build, making depend on the generated asset files. - Adds minimal integration in and documentation in . This addresses Task 9 (compact in-line and off-line asset system).
8 daysadd asset system description fileskal
9 daysclang-formatskal
9 daysupdate SESSION_NOTES.mdskal
9 daysdocs(contributing): Exclude third_party/ from clang-formatskal
Updates the clang-format command in CONTRIBUTING.md to explicitly exclude the 'third_party/' directory. This prevents clang-format from modifying external library code and avoids potential processing issues.
9 daysdocs(contributing): Exclude assets/ and archive/ from clang-formatskal
Updates the clang-format command in CONTRIBUTING.md to explicitly exclude the 'assets/' and 'archive/' directories. This prevents clang-format from attempting to process large, non-source files in these directories, which can cause hangs or unexpected behavior.
9 daysbuild: Finalize WebGPU integration and platform fixesskal
Includes correct CMake configuration for GLFW native access, Objective-C++ compilation for the helper library on macOS, and applies clang-format to modified sources.
9 daysfix(gpu): Ensure shader entry points are preserved in STRIP_ALL buildskal
The build was stripping all strings, including critical shader entry points ('vs_main', 'fs_main'), causing a runtime panic. Introduced for optional debug labels (which are stripped) and restored to always return the string content for functional requirements.
9 daysdocs: Mark task 3 (binary crunchers) as completedskal
9 daysfix(crunch): Use strip/gzexe on macOS instead of UPXskal
UPX is unreliable on macOS. Switched to using standard 'strip -u -r' and 'gzexe' for binary compression on Darwin systems. Achieved a compressed binary size of ~48KB (dynamically linked). Updated FETCH_DEPS.md to reflect that UPX is now only required for Linux/Windows.
9 daysfeat(crunch): Add UPX-based binary packer scriptskal
Adds 'scripts/crunch_demo.sh' to automate building a stripped binary and compressing it with UPX. Updates 'FETCH_DEPS.md' with UPX installation instructions and 'HOWTO.md' with usage guide. This addresses Task 3 (add binary crunchers).
9 daysfeat(platform): Add 'q' key to quitskal
Adds the 'q' key as an alternative to 'Escape' for closing the application.
9 daysfix(gpu): Add aspect ratio correction to shaderskal
Implements aspect ratio correction to prevent the pulsating heptagon from being distorted when the window is resized. - The main loop now queries the framebuffer size and calculates the aspect ratio each frame. - This aspect ratio is passed to the GPU via an updated uniform buffer. - The vertex shader in shader.wgsl now uses the aspect ratio to correctly scale the X coordinates of the vertices, ensuring the shape remains proportional.
9 daysfix(synth): Implement peak meter with decay for smooth visualsskal
The graphics appeared static because the audio peak value was transient, only lasting for a single audio buffer. The main graphics loop, running much faster, would mostly read a zero value. This fix implements a simple peak meter with an exponential decay. The peak value now rises instantly to the maximum sample value but fades out smoothly over several frames, providing a persistent and smooth value for the visualizer.
9 daysadd miniaudio.hskal
9 daysupdate SESSION_NOTESskal
9 daysdocs(contributing): Add clang-format directiveskal
Adds a new directive to CONTRIBUTING.md requiring all code to be formatted with clang-format before committing, ensuring consistent style across the codebase.
9 daysopt: Implement build stripping and platform-specific size optimizationsskal
Adds a 'STRIP_ALL' mode to minimize binary size for the final build, and refines size optimization flags for macOS. - **STRIP_ALL Mode**: Added a 'DEMO_STRIP_ALL' CMake option that defines 'STRIP_ALL'. In this mode, command-line parsing is bypassed (forcing fullscreen), debug labels/error callbacks are removed from WebGPU, and non-essential code (like iostream) is stripped. - **macOS Optimizations**: Updated CMake to use '-dead_strip' instead of GNU '--gc-sections' on Apple platforms to resolve linker errors and improve dead code elimination. - **Documentation**: Updated HOWTO.md to document the new 'Final / Strip Build' process and FETCH_DEPS.md for optimized wgpu-native build guidance. - **Task 7 & 8**: Marks these tasks as completed in PROJECT_CONTEXT.md.
9 daysrefactor(gpu): Integrate WebGPU via system wgpu-native and glfw3webgpuskal
Replaces the complex wgpu-native submodule and manual platform-specific surface creation with a system-wide wgpu-native install (via Homebrew) and the glfw3webgpu helper library. - Updates scripts/project_init.sh to fetch glfw3webgpu and ensure wgpu-native is installed. - Refactors CMakeLists.txt to link against the system wgpu-native library. - Simplifies src/platform.cc to use glfwCreateWindowWGPUSurface. - Simplifies src/gpu/gpu.cc to use standard WebGPU headers. - Updates FETCH_DEPS.md with new installation instructions. - Updates PROJECT_CONTEXT.md with the new integration strategy.
9 daysfeat: Implement fullscreen, keyboard controls, and pulsating heptagonskal
This commit fulfills tasks 1 and 2, and adds a synchronized visual effect. - **Fullscreen Mode**: Added '--fullscreen' command-line argument and dynamic toggling via 'F' key. - **Keyboard Controls**: Implemented 'Esc' to exit and 'F' to toggle fullscreen in 'src/platform.cc'. - **Synchronized Visuals**: Added a pulsating heptagon effect in 'src/gpu/gpu.cc' and 'src/gpu/shader.wgsl' that scales and changes color based on the real-time audio peak from the synth. - **Refactor**: Abstracted platform-specific WebGPU surface creation into 'src/platform.cc' to keep 'src/gpu/gpu.cc' cross-platform. - **Build System**: Corrected 'CMakeLists.txt' to properly link 'wgpu-native' and platform frameworks, and updated 'project_init.sh' to build the submodule. - **Documentation**: Updated 'HOWTO.md' and 'PROJECT_CONTEXT.md' with new features and decisions.
9 daysfeat: Implement spectool & specview; refactor coding style; update docsskal
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.
9 daystest(spectool): Add end-to-end test for analysis toolskal
Adds a new CTest unit test that performs a full, end-to-end verification of the 'spectool analyze' command. The test programmatically generates a sine wave, saves it as a .wav file, executes the spectool executable as a subprocess to analyze the wave, and then verifies the integrity of the resulting .spec file. This ensures the analysis pipeline (WAV decoding, windowing, FDCT, and file I/O) works correctly.
9 daysfeat(spectool): Add MP3 support for audio analysisskal
Leverages the built-in MP3 decoder in miniaudio to allow spectool's 'analyze' command to process .mp3 files in addition to .wav files. Updates the tool's command-line help text and the project's HOWTO.md to reflect the new capability.
9 daysfeat(audio): Implement real-time spectrogram synthesizerskal
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.
9 daysinitial commitskal