Repository navigation
Treat separately-profiled app instances as separate entries - #471
Draft
monet-vibrations-proto wants to merge 2 commits into
Draft
monet-vibrations-proto wants to merge 2 commits into
monet-vibrations-proto wants to merge 2 commits into
Conversation
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
A second copy of a browser launched with its own profile (e.g. `open -na "Brave Browser" --args --user-data-dir=...`) has its own process tree and audio service, but was merged into the same row and settings as the default instance because both share a bundle ID. - AppInstance reads the main process's argv (KERN_PROCARGS2) and recognises Chromium's --user-data-dir and Firefox's -profile / -P. - AudioApp.persistenceIdentifier becomes `bundleID@<profile path>` for such instances, so volume, pan, mute, EQ and routing persist per instance. Normal launches keep the plain bundle ID, so existing settings are untouched. - Rows are labelled "App (profile)"; activating an instance row uses its PID only, since AppleScript can't target a specific instance. - Instances are cached per PID and pruned when the app quits. Media-key shortcuts still resolve by bundle ID and pick the first matching instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
All of a Chromium browser's tabs and windows play audio through one shared audio-service process, so FineTune can't tell browser windows apart. A second copy launched with its own profile, though, gets its own process tree and audio service:
Before this change, that second copy was merged into the same row and settings as the default instance because both share a bundle ID.
What
AppInstancereads the app's main-process argv viaKERN_PROCARGS2and recognises Chromium's--user-data-dirand Firefox's-profile/-P.AudioApp.persistenceIdentifierbecomesbundleID@<profile path>for such instances, so volume, pan, mute, EQ and routing persist per instance. Normal launches keep the plain bundle ID, so existing settings are untouched and need no migration.tell application idcan't target a specific instance.AudioProcessMonitorcaches instances per PID and prunes them when the app quits.Limitation: media-key shortcuts still resolve by bundle ID and pick the first matching instance.
Testing
xcodebuild test -only-testing:FineTuneTests: 982 tests pass, including the newAppInstanceTests(argument parsing,KERN_PROCARGS2buffer layout, a live read of the test process's own arguments, and persistence identifiers).--user-data-dirBrave playing at the same time show as two rows and pan independently.🤖 Generated with Claude Code