• Stars
    star
    250
  • Rank 162,397 (Top 4 %)
  • Language
    Swift
  • Created almost 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Real-time audio input and FFT written entirely in Swift for iOS.

TempiFFT

Description

TempiFFT demonstrates how to input audio via AVFoundation for recording or processing and implements an FFT to display a real-time spectrum plot of incoming audio.

What's an FFT? Short for Fast Fourier Transform, it's a method for deconstructing an audio signal (or any time-based signal for that matter) into its constituent frequencies and intensities. The FFT function is a crucial component for nearly all audio DSP.

Doesn't Apple's Accelerate framework already include an FFT? Yes, and this project makes use of it. But Accelerate's FFT function (vDSP_fft_zrip) isn't trivial to call or set up correctly (esp. from Swift) and is just one necessary ingredient to a functional FFT.

What's โ€œlogical bandingโ€? Actually I made that term up so maybe there's a better name for it, but logical banding adds an interface on top of the raw FFT data so that you can, for example, analyze the data at 5 bands per octave across a 6 octave range.

How do you pronounce Tempi? TEMP-ee.

Technologies

  • Swift
  • iOS
  • AVFoundation
  • DSP (Fast Fourier Transform)
  • CoreGraphics

License

CC0

To the extent possible under law, John Scalo has waived all copyright and related or neighboring rights to this work.

Contact

Contact me on Twitter - @scalo