# AudioVisualizer **Repository Path**: PhiloKun/AudioVisualizer ## Basic Information - **Project Name**: AudioVisualizer - **Description**: AudioVisualizer - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-22 - **Last Updated**: 2026-07-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Audio Visualizer ๐ŸŽต macOS real-time audio visualization app built with SwiftUI + Metal. A macOS real-time audio visualization tool. Captures microphone input, performs FFT analysis, and renders dynamic visualizations using Metal shaders with 3 display modes. --- ## ๅŠŸ่ƒฝ Features - **ๅฎžๆ—ถ้ข‘่ฐฑ** Real-time FFT spectrum โ€” 128-band log-spaced frequency visualization - **ไธ‰็งๅฏ่ง†ๅŒ–ๆจกๅผ** 3 Visualization Modes โ€” Spectrum Bars / Circular / Waveform - **HSV ๅŠจๆ€้…่‰ฒ** HSV dynamic color โ€” frequency-index-based rainbow cycling with magnitude modulation - **็”ตๅนณๆŒ‡็คบ** Input level meter โ€” green โ†’ yellow โ†’ orange โ†’ red gradient - **็Žป็’ƒๆ€ๆŽงๅˆถๆ ** Glass-morphism control bar โ€” thin material background with mode switches - **้”ฎ็›˜ๅฟซๆท้”ฎ** Keyboard shortcuts โ€” `โŒ˜B` / `โŒ˜C` / `โŒ˜W` switch modes instantly ## ๆŠ€ๆœฏๆ ˆ Tech Stack | Layer | Technology | |-------|-----------| | Language | Swift 5.9 | | UI | SwiftUI | | Graphics | Metal (custom vertex + fragment shaders) | | Audio | AVFoundation / AVAudioEngine (microphone input) | | DSP | Accelerate (vDSP FFT, Hann window, log-spaced band mapping) | ## ็ณป็ปŸ่ฆๆฑ‚ Requirements - macOS 14.0+ (Sonoma) - Microphone access (for audio input) - Xcode 15+ or Swift 5.9+ ## ๅฎ‰่ฃ… Build & Run ```bash git clone https://github.com/PhiloKun/AudioVisualizer.git cd AudioVisualizer swift run ``` Or open in Xcode: ```bash open Package.swift ``` ## ไฝฟ็”จ Usage 1. Launch app โ€” microphone permission prompt appears 2. Grant microphone access 3. Play music or make sound near your mic 4. Switch modes via bottom control bar or keyboard shortcuts: - `โŒ˜B` โ€” Bars mode (spectrum bars) - `โŒ˜C` โ€” Circle mode (radial spectrum) - `โŒ˜W` โ€” Wave mode (oscilloscope waveform) ## ้กน็›ฎ็ป“ๆž„ Structure ``` AudioVisualizer โ”œโ”€โ”€ Package.swift โ”œโ”€โ”€ Sources/ โ”‚ โ””โ”€โ”€ AudioVisualizer/ โ”‚ โ”œโ”€โ”€ AudioVisualizerApp.swift # App entry point โ”‚ โ”œโ”€โ”€ ContentView.swift # Main UI + control bar โ”‚ โ”œโ”€โ”€ AudioEngine.swift # Audio capture + FFT pipeline โ”‚ โ”œโ”€โ”€ VisualizerView.swift # MTKView NSViewRepresentable โ”‚ โ””โ”€โ”€ MetalRenderer.swift # Metal vertex generation + shaders ``` ## ่ทฏ็บฟๅ›พ Roadmap - [x] Microphone input + FFT analysis - [x] 3 visualization modes (bars / circle / wave) - [x] HSV dynamic coloring - [x] Glass-morphism control bar - [ ] System audio capture (requires code signing) - [ ] Audio file playback - [ ] Custom color themes - [ ] Window resize responsiveness improvements ## ่ฎธๅฏ License MIT