Galactic Gladiators now has a music-reactive graphic equaliser in its pause menu.
Yes. A pause menu. In a space game. Written in Visual FoxPro.
Essential development work, obviously.
We’d talked about this before. The bars were already there, bouncing around and looking rather pleased with themselves. But they weren’t actually following the music.
Getting them to react properly seemed like too much effort, possibly beyond what we could reasonably do with the existing setup. So we left it.
Then I asked Claude.
It produced a standalone demo that analysed 16-bit WAV files. After converting one of my music tracks and fixing a small FoxPro quirk in the file-reading code, there it was: bars moving with the music.
Well, that rather changed the conversation.
The next step was getting that approach into our own pause menus. That involved a few rounds of debugging, some stubbornly invisible bars, and another reminder that FoxPro’s string comparisons can keep you humble.
The principle is quite neat. Windows Media Player plays the music. FoxPro asks where we are in the track, reads the audio samples at that point, and calculates the strength of different frequencies.
Those values drive the coloured bars. Little white peak markers jump upwards and drift back down, giving it that proper old-school hi-fi look.
We initially kept an MP3 for playback and a WAV for analysis. Then came the fairly obvious question: why keep both?
It now plays and analyses the WAV.
Does any of this help you defeat the mothership?
Absolutely not.
Does it make BARF FM more fun to sit and watch while the jukebox plays?
Absolutely.
That’s part of what I love about this project. Something gets filed under “probably not worth attempting”, then a different approach opens it up again.
Sometimes you end up with a useful feature.
Sometimes you end up watching little white lines bounce to a reggae version of your space-game theme tune.
I’m happy with either.
Seeing what’s possible.
