Skip to content

Add per-app stereo pan - #470

Draft
monet-vibrations-proto wants to merge 1 commit into
ronitsingh10:mainfrom
monet-vibrations-proto:feature/per-app-pan
Draft

monet-vibrations-proto wants to merge 1 commit into
ronitsingh10:mainfrom
monet-vibrations-proto:feature/per-app-pan

Conversation

@monet-vibrations-proto

Copy link
Copy Markdown

Part of #416 (the per-app half: route one app to the left ear and another to the right).

What

Each app gets a pan control (−1 full left … 0 center … +1 full right) in its expanded panel, so two apps can share one pair of headphones, one per ear (e.g. music left, a meeting right).

  • PanMath — real-time-safe pan. Moving off center progressively folds a stereo source to mono before attenuating the far side, so a hard-panned stereo app keeps both channels in one ear instead of losing half the program.
  • ProcessTapController — pan is ramped per frame with the existing volume ramp coefficient (no zipper noise), carried across crossfade/device switches, and skipped entirely at center so the default path is bit-exact with today's output.
  • Settings — persisted per app (appPans), cleared by ignore/prune/reset.
  • URL scheme — finetune://set-pan?app=ID&pan=-100…100|left|center|right (documented in guide/url-schemes.md).
  • UI — PanControlView in the expanded app row.

Testing

  • xcodebuild test -only-testing:FineTuneTests: all 974 unit tests pass, including new tests for pan math, pipeline mapping (stereo, mono, multichannel), ramp/snap behaviour and URL parsing.
  • Manual: Spotify hard left plus a call hard right on headphones; each stays in its own ear with no clicks while dragging the slider. finetune://set-pan updates and persists the setting.

🤖 Generated with Claude Code

Each app gets a pan control (-1 full left … 0 center … 1 full right) in its
expanded panel, so two apps can share one pair of headphones, one per ear
(e.g. music left, meeting right). Closes the per-app half of ronitsingh10#416.

- PanMath: RT-safe pan. Moving off center progressively folds a stereo
  source to mono before attenuating the far side, so a hard-panned stereo
  app keeps both channels in one ear instead of losing half the program.
- ProcessTapController: pan is ramped per frame with the existing volume
  ramp coefficient (no zipper noise), carried across crossfade/device
  switches, and skipped entirely at center so the default path is
  bit-exact with today's output.
- Persisted per app in settings (appPans), cleared by ignore/prune/reset.
- URL scheme: finetune://set-pan?app=ID&pan=-100…100|left|center|right
- Tests for pan math, pipeline mapping (stereo, mono, multichannel),
  ramp/snap behaviour and URL parsing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KQG7XZ7tYR1MrJGZ7P8ri5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant