summaryrefslogtreecommitdiff
path: root/src/generated/music_data.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-05 20:18:28 +0100
committerskal <pascal.massimino@gmail.com>2026-02-05 20:18:28 +0100
commit12816810855883472ecab454f9c0d08d66f0ae52 (patch)
tree37e294d82cfe7c6cb887ed774268e6243fae0c77 /src/generated/music_data.cc
parent3ba0d20354a67b9fc62d29d13bc283c18130bbb9 (diff)
feat(audio): Complete Task #56 - Audio Lifecycle Refactor (All Phases)
SUMMARY ======= Successfully completed comprehensive 4-phase refactor of audio subsystem to eliminate fragile initialization order dependency between synth and tracker. This addresses long-standing architectural fragility where tracker required synth to be initialized first or spectrograms would be cleared. IMPLEMENTATION ============== Phase 1: Design & Prototype - Created AudioEngine class as unified audio subsystem manager - Created SpectrogramResourceManager for lazy resource loading - Manages synth, tracker, and resource lifecycle - Comprehensive test suite (test_audio_engine.cc) Phase 2: Test Migration - Migrated all tracker tests to use AudioEngine - Updated: test_tracker.cc, test_tracker_timing.cc, test_variable_tempo.cc, test_wav_dump.cc - Pattern: Replace synth_init() + tracker_init() with engine.init() - All 20 tests pass (100% pass rate) Phase 3: Production Integration - Fixed pre-existing demo crash (procedural texture loading) - Updated flash_cube_effect.cc and hybrid_3d_effect.cc - Migrated main.cc to use AudioEngine - Replaced tracker_update() calls with engine.update() Phase 4: Cleanup & Documentation - Removed synth_init() call from audio_init() (backwards compatibility) - Added AudioEngine usage guide to HOWTO.md - Added audio initialization protocols to CONTRIBUTING.md - Binary size verification: <500 bytes overhead (acceptable) RESULTS ======= ✅ All 20 tests pass (100% pass rate) ✅ Demo runs successfully with audio and visuals ✅ Initialization order fragility eliminated ✅ Binary size impact minimal (<500 bytes) ✅ Clear documentation for future development ✅ No backwards compatibility issues DOCUMENTATION UPDATES ===================== - Updated TODO.md: Moved Task #56 to "Recently Completed" - Updated PROJECT_CONTEXT.md: Added AudioEngine milestone - Updated HOWTO.md: Added "Audio System" section with usage examples - Updated CONTRIBUTING.md: Added audio initialization protocols CODE FORMATTING =============== Applied clang-format to all source files per project standards. FILES CREATED ============= - src/audio/audio_engine.h (new) - src/audio/audio_engine.cc (new) - src/audio/spectrogram_resource_manager.h (new) - src/audio/spectrogram_resource_manager.cc (new) - src/tests/test_audio_engine.cc (new) KEY FILES MODIFIED ================== - src/main.cc (migrated to AudioEngine) - src/audio/audio.cc (removed backwards compatibility) - All tracker test files (migrated to AudioEngine) - doc/HOWTO.md (added usage guide) - doc/CONTRIBUTING.md (added protocols) - TODO.md (marked complete) - PROJECT_CONTEXT.md (added milestone) TECHNICAL DETAILS ================= AudioEngine Design Philosophy: - Manages initialization order (synth before tracker) - Owns SpectrogramResourceManager for lazy loading - Does NOT wrap every synth API - direct calls remain valid - Provides lifecycle management, not a complete facade What to Use AudioEngine For: - Initialization: engine.init() instead of separate init calls - Updates: engine.update(music_time) instead of tracker_update() - Cleanup: engine.shutdown() for proper teardown - Seeking: engine.seek(time) for timeline navigation (debug only) Direct Synth API Usage (Still Valid): - synth_register_spectrogram() - Register samples - synth_trigger_voice() - Trigger playback - synth_get_output_peak() - Get audio levels - synth_render() - Low-level rendering SIZE IMPACT ANALYSIS ==================== Debug build: 6.2MB Size-optimized build: 5.0MB Stripped build: 5.0MB AudioEngine overhead: <500 bytes (0.01% of total) BACKWARD COMPATIBILITY ====================== No breaking changes. Tests that need low-level control can still call synth_init() directly. AudioEngine is the recommended pattern for production code and tests requiring both synth and tracker. handoff(Claude): Task #56 COMPLETE - All 4 phases finished. Audio initialization is now robust, well-documented, and properly tested. The fragile initialization order dependency has been eliminated. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/generated/music_data.cc')
-rw-r--r--src/generated/music_data.cc356
1 files changed, 118 insertions, 238 deletions
diff --git a/src/generated/music_data.cc b/src/generated/music_data.cc
index bc054fe..b40eb92 100644
--- a/src/generated/music_data.cc
+++ b/src/generated/music_data.cc
@@ -5,292 +5,173 @@
#include "generated/assets.h"
const NoteParams g_tracker_samples[] = {
- { 0 }, // ASSET_KICK_1 (ASSET)
- { 0 }, // ASSET_KICK_2 (ASSET)
- { 0 }, // ASSET_KICK_3 (ASSET)
- { 0 }, // ASSET_SNARE_1 (ASSET)
- { 0 }, // ASSET_SNARE_2 (ASSET)
- { 0 }, // ASSET_SNARE_3 (ASSET)
- { 0 }, // ASSET_SNARE_4 (ASSET)
- { 0 }, // ASSET_HIHAT_1 (ASSET)
- { 0 }, // ASSET_HIHAT_2 (ASSET)
- { 0 }, // ASSET_HIHAT_3 (ASSET)
- { 0 }, // ASSET_HIHAT_4 (ASSET)
- { 0 }, // ASSET_CRASH_1 (ASSET)
- { 0 }, // ASSET_RIDE_1 (ASSET)
- { 0 }, // ASSET_SPLASH_1 (ASSET)
- { 0 }, // ASSET_BASS_1 (ASSET)
- { 82.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f, 0.0f }, // NOTE_E2
- { 98.0f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f, 0.0f }, // NOTE_G2
- { 73.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f, 0.0f }, // NOTE_D2
- { 65.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f, 0.0f }, // NOTE_C2
+ {0}, // ASSET_KICK_1 (ASSET)
+ {0}, // ASSET_KICK_2 (ASSET)
+ {0}, // ASSET_KICK_3 (ASSET)
+ {0}, // ASSET_SNARE_1 (ASSET)
+ {0}, // ASSET_SNARE_2 (ASSET)
+ {0}, // ASSET_SNARE_3 (ASSET)
+ {0}, // ASSET_SNARE_4 (ASSET)
+ {0}, // ASSET_HIHAT_1 (ASSET)
+ {0}, // ASSET_HIHAT_2 (ASSET)
+ {0}, // ASSET_HIHAT_3 (ASSET)
+ {0}, // ASSET_HIHAT_4 (ASSET)
+ {0}, // ASSET_CRASH_1 (ASSET)
+ {0}, // ASSET_RIDE_1 (ASSET)
+ {0}, // ASSET_SPLASH_1 (ASSET)
+ {0}, // ASSET_BASS_1 (ASSET)
+ {82.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
+ 0.0f}, // NOTE_E2
+ {98.0f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
+ 0.0f}, // NOTE_G2
+ {73.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
+ 0.0f}, // NOTE_D2
+ {65.4f, 0.50f, 1.0f, 0.01f, 0.0f, 0.0f, 0.0f, 3, 0.6f, 0.0f,
+ 0.0f}, // NOTE_C2
};
const uint32_t g_tracker_samples_count = 19;
const AssetId g_tracker_sample_assets[] = {
- AssetId::ASSET_KICK_1,
- AssetId::ASSET_KICK_2,
- AssetId::ASSET_KICK_3,
- AssetId::ASSET_SNARE_1,
- AssetId::ASSET_SNARE_2,
- AssetId::ASSET_SNARE_3,
- AssetId::ASSET_SNARE_4,
- AssetId::ASSET_HIHAT_1,
- AssetId::ASSET_HIHAT_2,
- AssetId::ASSET_HIHAT_3,
- AssetId::ASSET_HIHAT_4,
- AssetId::ASSET_CRASH_1,
- AssetId::ASSET_RIDE_1,
- AssetId::ASSET_SPLASH_1,
- AssetId::ASSET_BASS_1,
- AssetId::ASSET_LAST_ID,
- AssetId::ASSET_LAST_ID,
- AssetId::ASSET_LAST_ID,
- AssetId::ASSET_LAST_ID,
+ AssetId::ASSET_KICK_1, AssetId::ASSET_KICK_2, AssetId::ASSET_KICK_3,
+ AssetId::ASSET_SNARE_1, AssetId::ASSET_SNARE_2, AssetId::ASSET_SNARE_3,
+ AssetId::ASSET_SNARE_4, AssetId::ASSET_HIHAT_1, AssetId::ASSET_HIHAT_2,
+ AssetId::ASSET_HIHAT_3, AssetId::ASSET_HIHAT_4, AssetId::ASSET_CRASH_1,
+ AssetId::ASSET_RIDE_1, AssetId::ASSET_SPLASH_1, AssetId::ASSET_BASS_1,
+ AssetId::ASSET_LAST_ID, AssetId::ASSET_LAST_ID, AssetId::ASSET_LAST_ID,
+ AssetId::ASSET_LAST_ID,
};
static const TrackerEvent PATTERN_EVENTS_kick_basic[] = {
- { 0.0f, 0, 1.0f, 0.0f },
- { 2.0f, 0, 1.0f, 0.0f },
- { 2.5f, 1, 0.7f, -0.2f },
+ {0.0f, 0, 1.0f, 0.0f},
+ {2.0f, 0, 1.0f, 0.0f},
+ {2.5f, 1, 0.7f, -0.2f},
};
static const TrackerEvent PATTERN_EVENTS_kick_varied[] = {
- { 0.0f, 1, 1.0f, 0.0f },
- { 2.0f, 2, 0.9f, 0.0f },
- { 2.5f, 0, 0.7f, 0.2f },
+ {0.0f, 1, 1.0f, 0.0f},
+ {2.0f, 2, 0.9f, 0.0f},
+ {2.5f, 0, 0.7f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_kick_dense[] = {
- { 0.0f, 0, 1.0f, 0.0f },
- { 0.5f, 1, 0.6f, -0.2f },
- { 1.0f, 2, 0.9f, 0.0f },
- { 1.5f, 1, 0.6f, 0.2f },
- { 2.0f, 0, 1.0f, 0.0f },
- { 2.5f, 1, 0.6f, -0.2f },
- { 3.0f, 2, 0.9f, 0.0f },
- { 3.5f, 1, 0.6f, 0.2f },
+ {0.0f, 0, 1.0f, 0.0f}, {0.5f, 1, 0.6f, -0.2f}, {1.0f, 2, 0.9f, 0.0f},
+ {1.5f, 1, 0.6f, 0.2f}, {2.0f, 0, 1.0f, 0.0f}, {2.5f, 1, 0.6f, -0.2f},
+ {3.0f, 2, 0.9f, 0.0f}, {3.5f, 1, 0.6f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_snare_basic[] = {
- { 1.0f, 3, 1.1f, 0.1f },
- { 3.0f, 3, 1.1f, 0.1f },
+ {1.0f, 3, 1.1f, 0.1f},
+ {3.0f, 3, 1.1f, 0.1f},
};
static const TrackerEvent PATTERN_EVENTS_snare_varied[] = {
- { 1.0f, 4, 1.0f, -0.1f },
- { 3.0f, 6, 1.1f, 0.1f },
+ {1.0f, 4, 1.0f, -0.1f},
+ {3.0f, 6, 1.1f, 0.1f},
};
static const TrackerEvent PATTERN_EVENTS_snare_dense[] = {
- { 0.5f, 5, 0.9f, 0.0f },
- { 1.0f, 3, 1.1f, 0.1f },
- { 1.5f, 6, 0.9f, 0.0f },
- { 2.5f, 5, 0.9f, 0.0f },
- { 3.0f, 4, 1.0f, 0.1f },
- { 3.5f, 6, 0.9f, 0.0f },
+ {0.5f, 5, 0.9f, 0.0f}, {1.0f, 3, 1.1f, 0.1f}, {1.5f, 6, 0.9f, 0.0f},
+ {2.5f, 5, 0.9f, 0.0f}, {3.0f, 4, 1.0f, 0.1f}, {3.5f, 6, 0.9f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_hihat_basic[] = {
- { 0.0f, 8, 0.7f, -0.3f },
- { 0.5f, 7, 0.3f, 0.3f },
- { 1.0f, 8, 0.7f, -0.3f },
- { 1.5f, 7, 0.3f, 0.3f },
- { 2.0f, 8, 0.7f, -0.3f },
- { 2.5f, 7, 0.3f, 0.3f },
- { 3.0f, 8, 0.7f, -0.3f },
- { 3.5f, 7, 0.3f, 0.3f },
+ {0.0f, 8, 0.7f, -0.3f}, {0.5f, 7, 0.3f, 0.3f}, {1.0f, 8, 0.7f, -0.3f},
+ {1.5f, 7, 0.3f, 0.3f}, {2.0f, 8, 0.7f, -0.3f}, {2.5f, 7, 0.3f, 0.3f},
+ {3.0f, 8, 0.7f, -0.3f}, {3.5f, 7, 0.3f, 0.3f},
};
static const TrackerEvent PATTERN_EVENTS_hihat_varied[] = {
- { 0.0f, 9, 0.7f, -0.3f },
- { 0.5f, 7, 0.3f, 0.3f },
- { 1.0f, 10, 0.6f, -0.2f },
- { 1.5f, 7, 0.3f, 0.3f },
- { 2.0f, 9, 0.7f, -0.3f },
- { 2.5f, 7, 0.3f, 0.3f },
- { 3.0f, 10, 0.6f, -0.2f },
- { 3.5f, 7, 0.3f, 0.3f },
+ {0.0f, 9, 0.7f, -0.3f}, {0.5f, 7, 0.3f, 0.3f}, {1.0f, 10, 0.6f, -0.2f},
+ {1.5f, 7, 0.3f, 0.3f}, {2.0f, 9, 0.7f, -0.3f}, {2.5f, 7, 0.3f, 0.3f},
+ {3.0f, 10, 0.6f, -0.2f}, {3.5f, 7, 0.3f, 0.3f},
};
static const TrackerEvent PATTERN_EVENTS_crash[] = {
- { 0.0f, 11, 0.9f, 0.0f },
+ {0.0f, 11, 0.9f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_ride[] = {
- { 0.0f, 12, 0.8f, 0.2f },
+ {0.0f, 12, 0.8f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_ride_fast[] = {
- { 0.0f, 12, 0.8f, 0.2f },
- { 0.5f, 12, 0.6f, 0.2f },
- { 1.0f, 12, 0.8f, 0.2f },
- { 1.5f, 12, 0.6f, 0.2f },
- { 2.0f, 12, 0.8f, 0.2f },
- { 2.5f, 12, 0.6f, 0.2f },
- { 3.0f, 12, 0.8f, 0.2f },
- { 3.5f, 12, 0.6f, 0.2f },
+ {0.0f, 12, 0.8f, 0.2f}, {0.5f, 12, 0.6f, 0.2f}, {1.0f, 12, 0.8f, 0.2f},
+ {1.5f, 12, 0.6f, 0.2f}, {2.0f, 12, 0.8f, 0.2f}, {2.5f, 12, 0.6f, 0.2f},
+ {3.0f, 12, 0.8f, 0.2f}, {3.5f, 12, 0.6f, 0.2f},
};
static const TrackerEvent PATTERN_EVENTS_splash[] = {
- { 0.0f, 13, 0.7f, -0.2f },
+ {0.0f, 13, 0.7f, -0.2f},
};
static const TrackerEvent PATTERN_EVENTS_bass_e_soft[] = {
- { 0.0f, 15, 0.4f, 0.0f },
- { 2.0f, 15, 0.3f, 0.0f },
+ {0.0f, 15, 0.4f, 0.0f},
+ {2.0f, 15, 0.3f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_e[] = {
- { 0.0f, 15, 0.5f, 0.0f },
- { 1.0f, 15, 0.4f, 0.0f },
- { 2.0f, 15, 0.5f, 0.0f },
- { 2.5f, 15, 0.3f, 0.0f },
- { 3.0f, 15, 0.4f, 0.0f },
+ {0.0f, 15, 0.5f, 0.0f}, {1.0f, 15, 0.4f, 0.0f}, {2.0f, 15, 0.5f, 0.0f},
+ {2.5f, 15, 0.3f, 0.0f}, {3.0f, 15, 0.4f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_eg[] = {
- { 0.0f, 15, 0.5f, 0.0f },
- { 1.0f, 15, 0.4f, 0.0f },
- { 2.0f, 16, 0.5f, 0.0f },
- { 3.0f, 16, 0.4f, 0.0f },
+ {0.0f, 15, 0.5f, 0.0f},
+ {1.0f, 15, 0.4f, 0.0f},
+ {2.0f, 16, 0.5f, 0.0f},
+ {3.0f, 16, 0.4f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_progression[] = {
- { 0.0f, 15, 0.5f, 0.0f },
- { 1.0f, 17, 0.4f, 0.0f },
- { 2.0f, 18, 0.5f, 0.0f },
- { 3.0f, 16, 0.4f, 0.0f },
+ {0.0f, 15, 0.5f, 0.0f},
+ {1.0f, 17, 0.4f, 0.0f},
+ {2.0f, 18, 0.5f, 0.0f},
+ {3.0f, 16, 0.4f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_synco_1[] = {
- { 0.0f, 15, 0.6f, 0.0f },
- { 0.2f, 15, 0.5f, 0.1f },
- { 0.8f, 15, 0.6f, -0.1f },
- { 1.5f, 15, 0.5f, 0.0f },
- { 2.0f, 15, 0.6f, 0.0f },
- { 2.8f, 16, 0.6f, 0.1f },
- { 3.2f, 15, 0.5f, 0.0f },
+ {0.0f, 15, 0.6f, 0.0f}, {0.2f, 15, 0.5f, 0.1f}, {0.8f, 15, 0.6f, -0.1f},
+ {1.5f, 15, 0.5f, 0.0f}, {2.0f, 15, 0.6f, 0.0f}, {2.8f, 16, 0.6f, 0.1f},
+ {3.2f, 15, 0.5f, 0.0f},
};
static const TrackerEvent PATTERN_EVENTS_bass_synco_2[] = {
- { 0.0f, 15, 0.6f, 0.0f },
- { 0.5f, 17, 0.6f, -0.1f },
- { 1.2f, 15, 0.5f, 0.1f },
- { 1.8f, 17, 0.5f, 0.0f },
- { 2.0f, 18, 0.6f, 0.0f },
- { 2.5f, 15, 0.5f, 0.1f },
- { 3.0f, 16, 0.6f, 0.0f },
- { 3.5f, 15, 0.5f, -0.1f },
+ {0.0f, 15, 0.6f, 0.0f}, {0.5f, 17, 0.6f, -0.1f}, {1.2f, 15, 0.5f, 0.1f},
+ {1.8f, 17, 0.5f, 0.0f}, {2.0f, 18, 0.6f, 0.0f}, {2.5f, 15, 0.5f, 0.1f},
+ {3.0f, 16, 0.6f, 0.0f}, {3.5f, 15, 0.5f, -0.1f},
};
static const TrackerEvent PATTERN_EVENTS_bass_synco_3[] = {
- { 0.0f, 15, 0.6f, 0.0f },
- { 0.2f, 15, 0.5f, 0.0f },
- { 0.5f, 15, 0.6f, 0.1f },
- { 1.0f, 16, 0.6f, 0.0f },
- { 1.5f, 15, 0.5f, -0.1f },
- { 2.2f, 17, 0.6f, 0.0f },
- { 2.8f, 15, 0.5f, 0.1f },
- { 3.5f, 15, 0.6f, 0.0f },
+ {0.0f, 15, 0.6f, 0.0f}, {0.2f, 15, 0.5f, 0.0f}, {0.5f, 15, 0.6f, 0.1f},
+ {1.0f, 16, 0.6f, 0.0f}, {1.5f, 15, 0.5f, -0.1f}, {2.2f, 17, 0.6f, 0.0f},
+ {2.8f, 15, 0.5f, 0.1f}, {3.5f, 15, 0.6f, 0.0f},
};
const TrackerPattern g_tracker_patterns[] = {
- { PATTERN_EVENTS_kick_basic, 3, 4.0f }, // kick_basic
- { PATTERN_EVENTS_kick_varied, 3, 4.0f }, // kick_varied
- { PATTERN_EVENTS_kick_dense, 8, 4.0f }, // kick_dense
- { PATTERN_EVENTS_snare_basic, 2, 4.0f }, // snare_basic
- { PATTERN_EVENTS_snare_varied, 2, 4.0f }, // snare_varied
- { PATTERN_EVENTS_snare_dense, 6, 4.0f }, // snare_dense
- { PATTERN_EVENTS_hihat_basic, 8, 4.0f }, // hihat_basic
- { PATTERN_EVENTS_hihat_varied, 8, 4.0f }, // hihat_varied
- { PATTERN_EVENTS_crash, 1, 4.0f }, // crash
- { PATTERN_EVENTS_ride, 1, 4.0f }, // ride
- { PATTERN_EVENTS_ride_fast, 8, 4.0f }, // ride_fast
- { PATTERN_EVENTS_splash, 1, 4.0f }, // splash
- { PATTERN_EVENTS_bass_e_soft, 2, 4.0f }, // bass_e_soft
- { PATTERN_EVENTS_bass_e, 5, 4.0f }, // bass_e
- { PATTERN_EVENTS_bass_eg, 4, 4.0f }, // bass_eg
- { PATTERN_EVENTS_bass_progression, 4, 4.0f }, // bass_progression
- { PATTERN_EVENTS_bass_synco_1, 7, 4.0f }, // bass_synco_1
- { PATTERN_EVENTS_bass_synco_2, 8, 4.0f }, // bass_synco_2
- { PATTERN_EVENTS_bass_synco_3, 8, 4.0f }, // bass_synco_3
+ {PATTERN_EVENTS_kick_basic, 3, 4.0f}, // kick_basic
+ {PATTERN_EVENTS_kick_varied, 3, 4.0f}, // kick_varied
+ {PATTERN_EVENTS_kick_dense, 8, 4.0f}, // kick_dense
+ {PATTERN_EVENTS_snare_basic, 2, 4.0f}, // snare_basic
+ {PATTERN_EVENTS_snare_varied, 2, 4.0f}, // snare_varied
+ {PATTERN_EVENTS_snare_dense, 6, 4.0f}, // snare_dense
+ {PATTERN_EVENTS_hihat_basic, 8, 4.0f}, // hihat_basic
+ {PATTERN_EVENTS_hihat_varied, 8, 4.0f}, // hihat_varied
+ {PATTERN_EVENTS_crash, 1, 4.0f}, // crash
+ {PATTERN_EVENTS_ride, 1, 4.0f}, // ride
+ {PATTERN_EVENTS_ride_fast, 8, 4.0f}, // ride_fast
+ {PATTERN_EVENTS_splash, 1, 4.0f}, // splash
+ {PATTERN_EVENTS_bass_e_soft, 2, 4.0f}, // bass_e_soft
+ {PATTERN_EVENTS_bass_e, 5, 4.0f}, // bass_e
+ {PATTERN_EVENTS_bass_eg, 4, 4.0f}, // bass_eg
+ {PATTERN_EVENTS_bass_progression, 4, 4.0f}, // bass_progression
+ {PATTERN_EVENTS_bass_synco_1, 7, 4.0f}, // bass_synco_1
+ {PATTERN_EVENTS_bass_synco_2, 8, 4.0f}, // bass_synco_2
+ {PATTERN_EVENTS_bass_synco_3, 8, 4.0f}, // bass_synco_3
};
const uint32_t g_tracker_patterns_count = 19;
static const TrackerPatternTrigger SCORE_TRIGGERS[] = {
- { 0.0f, 8 },
- { 0.0f, 0 },
- { 0.0f, 6 },
- { 2.0f, 0 },
- { 2.0f, 3 },
- { 2.0f, 6 },
- { 4.0f, 9 },
- { 4.0f, 1 },
- { 4.0f, 3 },
- { 4.0f, 7 },
- { 6.0f, 1 },
- { 6.0f, 4 },
- { 6.0f, 7 },
- { 8.0f, 11 },
- { 8.0f, 0 },
- { 8.0f, 3 },
- { 8.0f, 6 },
- { 8.0f, 12 },
- { 10.0f, 1 },
- { 10.0f, 4 },
- { 10.0f, 7 },
- { 10.0f, 12 },
- { 12.0f, 9 },
- { 12.0f, 0 },
- { 12.0f, 3 },
- { 12.0f, 6 },
- { 12.0f, 13 },
- { 14.0f, 1 },
- { 14.0f, 4 },
- { 14.0f, 7 },
- { 14.0f, 14 },
- { 16.0f, 8 },
- { 16.0f, 2 },
- { 16.0f, 5 },
- { 16.0f, 7 },
- { 16.0f, 13 },
- { 18.0f, 2 },
- { 18.0f, 5 },
- { 18.0f, 6 },
- { 18.0f, 15 },
- { 20.0f, 9 },
- { 20.0f, 2 },
- { 20.0f, 5 },
- { 20.0f, 7 },
- { 20.0f, 13 },
- { 22.0f, 2 },
- { 22.0f, 5 },
- { 22.0f, 6 },
- { 22.0f, 14 },
- { 24.0f, 11 },
- { 24.0f, 2 },
- { 24.0f, 5 },
- { 24.0f, 7 },
- { 24.0f, 15 },
- { 26.0f, 2 },
- { 26.0f, 5 },
- { 26.0f, 6 },
- { 26.0f, 13 },
- { 28.0f, 10 },
- { 28.0f, 0 },
- { 28.0f, 4 },
- { 28.0f, 7 },
- { 28.0f, 14 },
- { 30.0f, 1 },
- { 30.0f, 3 },
- { 30.0f, 6 },
- { 30.0f, 15 },
- { 31.0f, 6 },
- { 32.0f, 8 },
- { 32.0f, 10 },
- { 32.0f, 2 },
- { 32.0f, 5 },
- { 32.0f, 7 },
- { 32.0f, 16 },
- { 34.0f, 10 },
- { 34.0f, 2 },
- { 34.0f, 5 },
- { 34.0f, 6 },
- { 34.0f, 17 },
- { 36.0f, 10 },
- { 36.0f, 2 },
- { 36.0f, 5 },
- { 36.0f, 7 },
- { 36.0f, 18 },
- { 38.0f, 8 },
+ {0.0f, 8}, {0.0f, 0}, {0.0f, 6}, {2.0f, 0}, {2.0f, 3},
+ {2.0f, 6}, {4.0f, 9}, {4.0f, 1}, {4.0f, 3}, {4.0f, 7},
+ {6.0f, 1}, {6.0f, 4}, {6.0f, 7}, {8.0f, 11}, {8.0f, 0},
+ {8.0f, 3}, {8.0f, 6}, {8.0f, 12}, {10.0f, 1}, {10.0f, 4},
+ {10.0f, 7}, {10.0f, 12}, {12.0f, 9}, {12.0f, 0}, {12.0f, 3},
+ {12.0f, 6}, {12.0f, 13}, {14.0f, 1}, {14.0f, 4}, {14.0f, 7},
+ {14.0f, 14}, {16.0f, 8}, {16.0f, 2}, {16.0f, 5}, {16.0f, 7},
+ {16.0f, 13}, {18.0f, 2}, {18.0f, 5}, {18.0f, 6}, {18.0f, 15},
+ {20.0f, 9}, {20.0f, 2}, {20.0f, 5}, {20.0f, 7}, {20.0f, 13},
+ {22.0f, 2}, {22.0f, 5}, {22.0f, 6}, {22.0f, 14}, {24.0f, 11},
+ {24.0f, 2}, {24.0f, 5}, {24.0f, 7}, {24.0f, 15}, {26.0f, 2},
+ {26.0f, 5}, {26.0f, 6}, {26.0f, 13}, {28.0f, 10}, {28.0f, 0},
+ {28.0f, 4}, {28.0f, 7}, {28.0f, 14}, {30.0f, 1}, {30.0f, 3},
+ {30.0f, 6}, {30.0f, 15}, {31.0f, 6}, {32.0f, 8}, {32.0f, 10},
+ {32.0f, 2}, {32.0f, 5}, {32.0f, 7}, {32.0f, 16}, {34.0f, 10},
+ {34.0f, 2}, {34.0f, 5}, {34.0f, 6}, {34.0f, 17}, {36.0f, 10},
+ {36.0f, 2}, {36.0f, 5}, {36.0f, 7}, {36.0f, 18}, {38.0f, 8},
};
-const TrackerScore g_tracker_score = {
- SCORE_TRIGGERS, 85, 120.0f
-};
+const TrackerScore g_tracker_score = {SCORE_TRIGGERS, 85, 120.0f};
// ============================================================
// RESOURCE USAGE ANALYSIS (for synth.h configuration)
@@ -298,16 +179,15 @@ const TrackerScore g_tracker_score = {
// Total samples: 19 (15 assets + 4 generated notes)
// Max simultaneous pattern triggers: 6
// Estimated max polyphony: 24 voices
-//
+//
// REQUIRED (minimum to avoid pool exhaustion):
// MAX_VOICES: 24
// MAX_SPECTROGRAMS: 111 (no caching)
-//
+//
// RECOMMENDED (with 50% safety margin):
// MAX_VOICES: 48
// MAX_SPECTROGRAMS: 166 (no caching)
-//
+//
// NOTE: With spectrogram caching by note parameters,
// MAX_SPECTROGRAMS could be reduced to ~19
// ============================================================
-