A beautiful, precise guitar tuner for iOS
Stay Tuned is a free, open-source guitar tuner app for iPhone. Whether you're a beginner learning your first chords or a seasoned player gigging on stage, Stay Tuned helps you get in tune quickly and accurately. With real-time pitch detection, multiple tuning presets, a built-in metronome, and a stunning visual interface, it's the only tuner you'll ever need.
- Stage Mode — High-contrast, landscape-locked performance view for live use
- Tools Menu — Consolidated access to metronome, settings, and tuner modes
- Real-time Pitch Detection — YIN-inspired algorithm with vDSP optimizations for accurate, low-latency tuning
- Chromatic Tuner — Detect any note across the full chromatic scale
- Multiple Tunings — Standard, Drop D, DADGAD, Open G/D/C/E/A/B, and more
- Visual Headstock — Martin-style guitar headstock with tappable tuning pegs
- Auto & Manual Modes — Auto-detect closest string or manually select which string to tune
- Animated Needle Meter — Smooth, responsive meter showing cents deviation
- Spectrum Analyzer — Real-time frequency visualization
- Tone Generator — Play reference tones for tuning by ear
- Metronome — Built-in metronome with customizable tempo and time signatures
- Adjustable Reference Pitch — Set A4 anywhere from 432Hz to 444Hz
- Glassmorphism UI — Modern, beautiful interface with animated gradients
- Haptic Feedback — Satisfying confirmation when strings are in tune
Standard Tuning • Chromatic Mode • Metronome
| Category | Technology |
|---|---|
| Language | Swift 5.9+ |
| UI Framework | SwiftUI |
| Audio Capture | AVAudioEngine, AVAudioSession |
| Signal Processing | Accelerate/vDSP |
| Testing | Swift Testing Framework |
| Minimum Target | iOS 17.0+ |
- Xcode: 15.0+
- iOS: 17.0+
- Device: iPhone with microphone access
-
Clone the repository:
git clone https://github.com/nickmaccarthy/Stay-Tuned.git cd stay-tuned -
Open the project in Xcode:
open "Stay Tuned/Stay Tuned.xcodeproj" -
Select your target device or simulator
-
Build and run (
Cmd + R)
Run the test suite with Cmd + U in Xcode, or from the command line:
xcodebuild test -project "Stay Tuned/Stay Tuned.xcodeproj" -scheme "Stay Tuned" -destination 'platform=iOS Simulator,name=iPhone 15'Stay Tuned follows the MVVM (Model-View-ViewModel) architecture pattern.
Stay Tuned/
├── Models/ # Data models (GuitarString, Tuning, Instrument, etc.)
├── Audio/ # Audio engine, pitch detection, tone generation
├── ViewModels/ # Observable objects managing app state
├── Views/ # SwiftUI views
├── Store/ # StoreKit integration for tips
└── Configuration/ # App configuration files
| Component | Description |
|---|---|
PitchDetector |
YIN-based pitch detection with parabolic interpolation |
AudioEngine |
AVAudioEngine wrapper for microphone capture |
TunerViewModel |
Main app state and tuning logic |
ToneGenerator |
Reference tone playback |
MetronomeEngine |
Precision metronome with multiple sounds |
The tuner uses a YIN-inspired algorithm optimized with Apple's Accelerate framework:
- Sample Accumulation — Buffers audio for low-frequency accuracy
- Difference Function — Calculates autocorrelation-based differences
- CMNDF — Cumulative Mean Normalized Difference Function for period detection
- Parabolic Interpolation — Sub-sample precision for accurate frequency estimation
| Tuning | Notes |
|---|---|
| Standard | E A D G B E |
| Half Step Down | Eb Ab Db Gb Bb Eb |
| Whole Step Down | D G C F A D |
| Drop D | D A D G B E |
| DADGAD | D A D G A D |
| Open G | D G D G B D |
| Open D | D A D F# A D |
| Open C | C G C G C E |
| Open E | E B E G# B E |
| Open A | E A E A C# E |
| Open B | B F# B F# B D# |
More tunings and instruments coming soon!
Key tuning parameters can be found in the source:
| Parameter | Value | File |
|---|---|---|
| In-tune tolerance | ±7 cents | TunerViewModel.swift |
| Reference pitch range | 432-444 Hz | ReferencePitchView.swift |
| Default reference pitch | 440 Hz (A4) | TunerViewModel.swift |
| Frequency range | 30-4000 Hz | PitchDetector.swift |
The project includes comprehensive unit tests covering:
- Chromatic note detection from frequency
- Tuning and string models
- Pitch detection accuracy
- Spectrum analyzer sensitivity
- ViewModel business logic
- Metronome timing
All new code must include unit tests. See CLAUDE.md for development guidelines.
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Write tests for your changes
- Ensure all tests pass (
Cmd + U) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you find Stay Tuned useful, consider supporting development:
- Venmo: @NickMacCarthy
- Cash App: $NickMacCarthy
- PayPal: nickmaccarthy
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with SwiftUI and ❤️
- Pitch detection inspired by the YIN algorithm
- Audio processing powered by Apple's Accelerate framework
Made with 🎸 for musicians



