title: Where can I find an example of a Spectrum Analyzer implementation using MTAudioProcessingTap, in Swift?
body: <p>I have an app that plays some audio, using AVPlayer. I'd like to add a spectrum analyzer visualization to the app's UI.</p>
  
  <p>I've found plenty of examples using FFTs to extract the spectrum data from audio samples, but I'm coming up empty trying to find an example that uses the data from an <code>MTAudioProcessingTapProcessCallback</code> (i.e. an example that doesn't use an AUGraph), and is also written in Swift.</p>
  
  <p>I'm finding the syntactic magic dizzying for going back and forth between the underlying data and Swift's desire for safe typing, and many of the examples that attempt to extract data are explicitly setup using a full AUGraph, which isn't an option for me as I'm not in a position to rewrite my entire audio engine.</p>
  
  <p>Is there some sample code out there that is written in Swift that can point the way? I feel like I've Googled everything I can think of and just can't find the right pieces to get it all sorted.</p>