Swift Playground Book
Metal | Accelerate | AVFoundation
What is it
BeatMatch is an audio visualization game relying on signal processing and metal shaders.
Audio Visualization - A Speed Tutorial
The sound goes through the
AVAudioEngine class where a tap is inserted to get the buffer data. From there we can calculate the uniform inputs for our metal shaders.
Current Audio Volume
This is for the bumping circle, doing a RMS calcultion and linear interpolation will get us smooth values for each draw cycle.
This is a more complicated task but essentially we do a Fast Fourier Transform to get the intensity in frequency bins, chop of the imaginary part and normalize the values.
I’m currently working on making tuturials out of all the things I’ve learned. Mainly Metal Shaders and signal processing. The list below will be updated as they come :).