A SwiftUI iOS app that visualizes microphone input through multiple sound-reactive animations. Filters out background noise and responds to breathing, whispers, voice, and music.
- Sun Glow - Pulsing sun with rotating gradient bars
- Balls - Bouncing balls that react to sound intensity
- Fire - 16 frequency-mapped flames (low frequencies on left, high on right)
- Line - Heart monitor / EKG style line visualizer
- Bars - Frequency spectrum analyzer with 32 bands
- Real-time microphone capture via
AVAudioEngine - High-pass + band-pass filtering (250 Hz - 8000 Hz) to filter out background noise like lawn mowers
- Adaptive noise floor learning
- 1024-sample FFT analysis with Hann windowing
- 32 logarithmic frequency bands (80 Hz - 8000 Hz)
Sound/
├── SoundApp.swift # App entry point
├── ContentView.swift # Main view with animation switcher
├── AudioManager.swift # Microphone capture, filtering, FFT
├── AnimationType.swift # Animation enum
├── SunGlowVisualizerView.swift # Sun Glow animation
├── BallsVisualizerView.swift # Bouncing balls animation
├── FireVisualizerView.swift # Frequency-reactive fire
├── LineVisualizerView.swift # Heart monitor line
├── BarsVisualizerView.swift # Frequency spectrum bars
├── Info.plist # Microphone permissions
└── Assets.xcassets/ # App icon and colors
- Open
Sound.xcodeprojin Xcode - Select your development team in Signing & Capabilities
- Choose target device or simulator
- Build and run (
Cmd+R) - Grant microphone permission when prompted
- iOS 15.0+
- Xcode 13.0+
- Swift 5.5+
- Microphone captures audio in real-time via
AVAudioEngine - DSP Pipeline applies high-pass and band-pass IIR filters to isolate human voice frequencies
- Adaptive Noise Gate continuously learns and subtracts background noise
- FFT Analysis computes frequency spectrum across 32 logarithmic bands
- Visualizations render in real-time using SwiftUI, driven by audio level and frequency data
Microphone access is required and explained in the permission prompt. Audio is processed locally on the device and never transmitted or stored.