Guitar Companion is a native macOS app for learning songs on guitar, built with
SwiftUI, AVFoundation/CoreAudio, and Accelerate — an app shell over a Swift
package (GuitarCompanionKit) with 200+ deterministic unit tests covering the
models, DSP, persistence, and recording paths. Drop in a song and it becomes a
practice project.
- Practice tools — a zoomable waveform with A/B looping snapped to the beat grid, pitch-preserving speed control (25–200%), ±12 semitone transposition, and a metronome that follows the track.
- Transcription — monophonic parts transcribe to piano roll and guitar tab with MIDI export.
Analysis runs in the background and is disk-cached by audio fingerprint:
song → fingerprint cache → beat/meter/key/chord models → Demucs 6-stem split → per-stem mixer → tone estimation
- Song analysis — a spectral-flux beat tracker with harmonic-comb tempo scoring estimates tempo and phase, a meter estimator picks 4/4 vs 6/8 automatically, and chroma-based models estimate the key and per-measure chords — all shown with confidence badges and a manual override.
- Stem isolation — real six-stem separation (Demucs
htdemucs_6s: vocals, drums, bass, guitar, piano, other) feeds a synchronized per-stem mixer with mute/solo/volume/pan, a stem-colored waveform, and a stem-ensemble pass that re-tracks the beat grid on the drum-weighted envelopes. - Tone workspace — pure-DSP feature extraction on the isolated guitar stem estimates the signal chain — pickups, drive, amp family, cab, and effects — as confidence-capped guesses with explanations and alternatives, plus shareable preset text.
The recording side turned out to be the hard part.
- Practice takes — capture the backing mix (exactly what you hear — stems, speed, pitch, metronome) alongside a guitar interface input and optional camera video (including iPhone Continuity Camera), all aligned on the host clock with a grid-aligned count-in that rides the track’s tempo and never lands in the file.
- Document packages — takes save as
.gctakepackages that keep video, backing, and input as separate aligned tracks, so a take can be remixed and re-exported later; projects save as.gcompdocument packages with atomic versioned writes, Finder integration, and bookmark-relinking for moved audio, restoring loops, speed, beat overrides, takes, and view state on reopen.
