diff options
| -rw-r--r-- | GEMINI.md | 2 | ||||
| -rw-r--r-- | PROJECT_CONTEXT.md | 15 | ||||
| -rw-r--r-- | SESSION_NOTES.md | 27 |
3 files changed, 39 insertions, 5 deletions
@@ -5,5 +5,7 @@ @FETCH_DEPS.md @CONTRIBUTING.md @HOWTO.md +@src/util/asset_manager.h +@tools/asset_packer.cc @tools/spectool.cc @tools/specview.cc diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index acc0b43..7664d9c 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -41,12 +41,19 @@ Incoming tasks in no particular order: ## Session Decisions and Current State ### Asset Management System: -- **Architecture**: Implemented a C++ tool (`asset_packer`) that bundles external files into the binary. -- **Descriptors**: Assets are defined in `assets/final/assets.txt` with optional compression settings. -- **Runtime Access**: Provides a type-safe `AssetId` enum and `GetAsset` function for retrieving raw byte data at runtime. -- **Integration**: Fully integrated into the CMake build process with automatic header/source generation. +- **Architecture**: Implemented a C++ tool (`asset_packer`) that bundles external files into hex-encoded C arrays. +- **Lookup**: Uses a highly efficient array-based lookup (AssetRecord) for O(1) retrieval of raw byte data at runtime. +- **Descriptors**: Assets are defined in `assets/final/demo_assets.txt` (for the demo) and `assets/final/test_assets_list.txt` (for tests). +- **Organization**: Common retrieval logic is decoupled and located in `src/util/asset_manager.cc`, ensuring generated data files only contain raw binary blobs. - **Lazy Decompression**: Scaffolding implemented for future on-demand decompression support. +### Build System: +- **Production Pipeline**: Automated the entire assembly process via a `final` CMake target (`make final`). +- **Automation**: This target builds the tools, runs the `gen_assets.sh` script to re-analyze audio and regenerate sources, and then performs final binary stripping and crunching (using `strip` and `gzexe` on macOS). +- **Scripts**: + - `scripts/gen_assets.sh`: Re-analyzes source audio files into `.spec` format and triggers the `asset_packer`. + - `scripts/crunch_demo.sh`: Performs the final size optimization and compression. + ### Audio Engine (Synth): - **Architecture**: Real-time additive synthesis from spectrograms using Inverse Discrete Cosine Transform (IDCT). - **Dynamic Updates**: Implemented a double-buffering (flip-flop) mechanism for thread-safe, real-time updates of spectrogram data. The main thread writes to a back buffer, which is then atomically swapped to become the active front buffer for the audio thread, avoiding real-time allocations and locks. diff --git a/SESSION_NOTES.md b/SESSION_NOTES.md index a92d96d..76aa782 100644 --- a/SESSION_NOTES.md +++ b/SESSION_NOTES.md @@ -8917,4 +8917,29 @@ I'll stage and commit the changes.**Tool Command**: ## MODEL ✨ -The `final` target is now part of the build system. What's next?
\ No newline at end of file +The `final` target is now part of the build system. What's next? +--- + +## Milestone Summary: Asset System & Production Pipeline (Jan 28, 2026) + +### Accomplishments: +1. **Refined Asset Management**: + * Refactored GetAsset to use an efficient O(1) array-based lookup. + * Decoupled generic manager logic (src/util/asset_manager.cc) from generated data. + * Established separate asset lists for demo and testing to prevent interference. +2. **Fully Automated Production Pipeline**: + * Integrated all steps into a single 'final' CMake target. + * Implemented scripts/gen_assets.sh for automatic spectrogram re-analysis. + * Optimized scripts/crunch_demo.sh for macOS stripping and compression (gzexe). +3. **Visual Improvements**: + * Added rotation, color shifting, and brightness boosts synchronized with audio peaks. + * Implemented background flash effect on beats. +4. **Stability & Quality**: + * Applied mandatory descriptive headers to all source files. + * Fixed various build system edge cases (e.g., target file resolution, stripped build dependencies). + * Ensured all tests (AssetManager, Synth, Spectool, Window) pass. + +### Status: +* The demo now features a working sequencer with embedded drum samples. +* Final compressed binary size on macOS is approximately 107KB (with assets). +* The project is ready for the next phase of development (cross-compilation or advanced compression). |
