In 2010 I made an #AudioVisual piece using #Haskell, #OpenGL, and #SC3:
https://mathr.co.uk/blog/2010-03-12_bowntz.html
This weekend I ported it from Haskell to #C, using #SDL2 as framework including #audio in the same program (SC3 was overkill for the simple sounds, and maintaining Haskell code to keep working with changes to the ecosystem is too much busy-work).
I changed the colours (suggested by @netzzz), moved the #physics #simulation from the #video thread to the #audio thread for tighter timing (the SC3 version scheduled events with bundles), and added a #RingBuffer to send the visualisation data back to the video thread (for smoother animation with good a/v sync).
I also did various optimisations, using tables instead of trigonometric functions, using (client-side) vertex arrays instead of glBegin().
License changed from #GPL v3 or later to #AGPL v3 only, in anticipation of compiling it to run in the browser using Emscripten.
Code at:
https://code.mathr.co.uk/bowntz
There's still (at least) one bug: after some time the program freezes and uses 100% CPU, I think it happens when the ball count limit is reached. Takes a long time so will be hard to figure out what is going on...