A SwiftUI iOS app that listens through the microphone and visualizes the music it hears in real time. Incoming audio is run through a Fast Fourier Transform, mapped to the twelve musical notes, and rendered as colored bars whose intensity tracks each note's magnitude.
An early project exploring real-time DSP on iOS with Apple's Accelerate framework.
- SwiftUI for the interface
- AVFoundation for microphone capture
- Accelerate (
vDSP) for the FFT and magnitude math
SoundAnalyzercaptures PCM samples and computes an in-place FFT, plus an RMS/VU power meter.- Frequency bins are thresholded and grouped into notes via a simple linear frequency-to-note mapping.
NoteManagerassigns each of the 12 notes a color;ContentViewanimates them.
Requires Xcode and an iOS device or simulator.
- Open
BasicMusicVisualizer.xcodeproj. - Select a target and press Run.
- Grant microphone access when prompted, then play or hum near the device.
MIT — see LICENSE.