From 5d2ec00c0179d1ee1b07883511d34dac272c680f Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 22:05:50 +0100 Subject: feat: Integrate tracker system and update project context documentation - Implemented the basic tracker system with runtime support (tracker.h, tracker.cc). - Added a sample music track file (assets/music.track). - Created a tracker compiler tool (tools/tracker_compiler.cc) to generate music data. - Updated CMakeLists.txt to build the tracker compiler and integrate generated data. - Updated GEMINI.md to reflect new file locations and project context. --- src/audio/tracker.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/audio/tracker.h (limited to 'src/audio/tracker.h') diff --git a/src/audio/tracker.h b/src/audio/tracker.h new file mode 100644 index 0000000..d97b483 --- /dev/null +++ b/src/audio/tracker.h @@ -0,0 +1,42 @@ +// This file is part of the 64k demo project. +// It defines the tracker system for music composition. + +#pragma once + +#include "audio/gen.h" +#include + +struct TrackerEvent { + float beat; + uint16_t sample_id; + float volume; + float pan; +}; + +struct TrackerPattern { + const TrackerEvent* events; + uint32_t num_events; + float num_beats; +}; + +struct TrackerPatternTrigger { + float time_sec; + uint16_t pattern_id; + // Modifiers could be added here +}; + +struct TrackerScore { + const TrackerPatternTrigger* triggers; + uint32_t num_triggers; + float bpm; +}; + +// Global music data generated by tracker_compiler +extern const NoteParams g_tracker_samples[]; +extern const uint32_t g_tracker_samples_count; +extern const TrackerPattern g_tracker_patterns[]; +extern const uint32_t g_tracker_patterns_count; +extern const TrackerScore g_tracker_score; + +void tracker_init(); +void tracker_update(float time_sec); -- cgit v1.2.3