summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-31 15:36:45 +0100
committerskal <pascal.massimino@gmail.com>2026-01-31 15:36:45 +0100
commit72c0cbcb38732b698d33d52459fed67af56ee2ec (patch)
tree83cabb089d76c7dda49ac786ad829b6f37d17bbf /src/main.cc
parente96f282d77bd114493c8d9097c7fb7eaaad2338b (diff)
feat: Implement Sequence and Effect system for demo choreography
Refactors the rendering pipeline into a modular Sequence/Effect system. 'MainSequence' manages the final frame rendering and a list of 'Sequence' layers. 'Sequence' manages a timeline of 'Effect' objects (start/end/priority). Concrete effects (Heptagon, Particles) are moved to 'demo_effects.cc'. Updates main loop to pass beat and aspect ratio.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index 4f99230..fb0b412 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -212,7 +212,8 @@ int main(int argc, char **argv) {
float raw_peak = synth_get_output_peak();
float visual_peak = fminf(raw_peak * 8.0f, 1.0f);
- gpu_draw(visual_peak, aspect_ratio, (float)current_time);
+ float beat = fmodf((float)current_time * DEMO_BPM / 60.0f, 1.0f);
+ gpu_draw(visual_peak, aspect_ratio, (float)current_time, beat);
audio_update();
}