Following my recent post regarding ParticleLab, my high performance GPU based Swift particle system component, I’ve spent a happy few days working with Aurelius Prochazka from AudioKit creating an iOS app for visualising audio with particles.
The video above demonstrates how the particles react to birdsong and the effects are, in my humble opinion, quite striking. The visuals are reminiscent of a cloud chamber, with loops and spirals exploding and rapidly decelerating. The system in this video contains 4,000,000 particles and runs at over 40fps on my iPad Air 2.
The link between AudioKit and ParticleLab is AKAudioAnalyzer, this class exposes two properties,trackedAmplitude and trackedFrequency, and I use the value of these to control the position, mass and spin of ParicleLab’s four gravity wells. The code for doing this may look a little arcane, but let me step through it to demystify it.