A hypnotic, music-reactive Techno visuals show designed for staring at at a party (Part 2)

Hi everyone,


Just sharing my work here again. I made a post on the old Processing forum and it seemed to go down reasonably well. I’ve made some updates now and thought it would be cool to share them!

As the first post said:
‘I coded this system for minimal techno visuals in Processing. It involves 3D graphics, beat detection and other techniques! Been working on it on and off for a long time. I have used it live at a clubnight [a few times] too!’

Updates this time:

  • Movie Playback (frame accurate)
  • Gentle fade in, fade out of sphere
  • Small tweaks to visuals routine

Here, it is reacting to a new hour long techno mix I made. Any questions about any elements of the system, let me know and I’ll help you out!

Thanks for looking :slight_smile:


Left you a message on YT. Wd love to see the code that reacts to the music in Processing and generates visuals…

Thanks for sharing this, @Shallowed.

Hey! Ah cool, think I saw that one. For sure, I can let you know a bit about the code.

First and foremost, I would say that the software’s most important feature is the detection and analysis of beats within a provided audio source. Most things in the software make use of these beats in some way. For example, the spinning sphere flashes on the beat usually.

My beat detection system is a kind of custom simplistic one I wrote myself. I’ll quote you what I wrote last time, perhaps it’ll help you :slight_smile:

I used a FFT (Fast Fourier Transform) object (docs). This allows you to split the audio into a spectrum (multiple bouncing frequency bands, like you might see on a graphic equalizer).

Since my music has a pretty constant pulsing bassy beat, I simply access the value for the lowest band of the FFT (number 0), then set a threshold for what constitutes a beat on that band. I also have a sensitivity value that I can change on the fly, so that 2 beats aren’t detected too close together. This works reasonably well, and is something I can quickly mess with at live shows if the beat detection goes wrong (I have threshold and sensitivity mapped to the arrow keys).

Here’s some code for that last bit:

if (frameCount >= mostRecentBeatFrameCount + sensitivity) {
if (selectedAverageBandLevel > chosenThreshold) {
mostRecentBeatFrameCount = frameCount;

So yeah, pretty simple solution, works well for live situations with 4x4 bass heavy music. There’s definitely, definitely better ways to approach it though. You can find scientific papers and other writings online about better beat detection methods, I would like to implement one one day!

One you are detecting beats, it’s should be straightforward to create some visuals. For example: when you detect a beat, flash a colour up on screen for a few frames (that’s one I use). Then you’ll have a pulsing effect, in time with music. Any parameter that processing allows you access to, you can manipulate in time with your detected bits, and create cool music reactive effects. That part is all about experimentation, to see what works well!

Hope that helps, cheers!


More than happy to, Cheers Jeremy

Thanks so much! I’ll play with it. Can you answer further questions should they arise?

Do you have this whole code on Github or somewhere?

You’re welcome! Don’t have the code available on GitHub or anything, can probably answer more questions though.

1 Like

Couldnt you use minim for beat detection? also if youre looking to record your graphics with something like VideoExport you should try do any sound analysis of your whole song first and store some Low, Med, High averages an a array. That way when recording the video you can keep in time with your song otherwise it gets out of sync if you try to do FFT on the fly and frame record at the same time.

I did this on my software PoShowTube which makes YouTube videos.