Alex Barbulescu

Swift Playground Book

Metal | Accelerate | AVFoundation


GitHub

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.

Frequency Magnitudes

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.


Tutorials

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 :).

  1. Using Swift Playgrounds & Playground Books
  2. Making Your First Circle Using Metal Shaders