Skip to content

duckling1169/BasicMusicVisualizer

Repository files navigation

BasicMusicVisualizer

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.

Stack

  • SwiftUI for the interface
  • AVFoundation for microphone capture
  • Accelerate (vDSP) for the FFT and magnitude math

How it works

  1. SoundAnalyzer captures PCM samples and computes an in-place FFT, plus an RMS/VU power meter.
  2. Frequency bins are thresholded and grouped into notes via a simple linear frequency-to-note mapping.
  3. NoteManager assigns each of the 12 notes a color; ContentView animates them.

Build & Run

Requires Xcode and an iOS device or simulator.

  1. Open BasicMusicVisualizer.xcodeproj.
  2. Select a target and press Run.
  3. Grant microphone access when prompted, then play or hum near the device.

License

MIT — see LICENSE.

About

Real-time iOS music visualizer that maps microphone audio to colored musical notes via FFT.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages