Commit Graph
7 Commits
Author SHA1 Message Date
1524e349cb fix(build): bundle Rig Builder by its current repo name, not the pre-rename redirect (#59)
The bundled-plugin list cloned got-feedback/rig_builder, a name two
renames behind the current feedBack-plugin-rig-builder. That works only
via GitHub's rename redirect, which silently breaks the moment any new
repo takes the old name — a nightly would then bundle the wrong code
without failing. Point at the canonical repo with an explicit :rig_builder
dirname (capital B means the lowercase feedback-plugin- prefix strip
doesn't apply), which keeps the bundled module name byte-identical.

The other lowercase feedback-plugin-* entries are deliberately untouched:
GitHub repo names are case-insensitively unique, so a case-only mismatch
can never be shadowed or break, and canonicalizing them would force a
case-insensitive rewrite of the prefix strip (risky on the macOS build
host's bash 3.2) for zero functional gain.


Claude-Session: https://claude.ai/code/session_01H1ZBEcZoJinde9ms5fAjwc

Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 20:58:20 +02:00
dcfa6be19d fix(menu): make View → Zoom In accept the unshifted Ctrl+= key (#55)
The app relied on Electron's default application menu, whose View → Zoom In
binds only `CommandOrControl+Plus`. On US / most keyboard layouts "+" is the
shifted form of `=`, so pressing Ctrl with the unshifted +/= key sends Ctrl+=
and nothing happened — while Zoom Out (`Ctrl+-`, no Shift) worked, making zoom
feel half-broken.

Install an explicit application menu that mirrors Electron's default via
role-based submenus and hand-builds only View, where Zoom In also accepts
`Ctrl+=` and numpad `+` (hidden sibling items keep `Ctrl+Shift+=` and numpad
working). Strictly additive — no other menu behaviour changes.


Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:58:10 +02:00
06c68262a9 Streamer mix outputs (PR1): one stream bus → a 2nd output device (#49)
* feat(audio): streamer mix outputs — one stream bus to a 2nd output device (PR1)

Built-in routing so a streamer can send a separate mix (game ± their guitar
tone) to a second output device for OBS/Discord capture, while still monitoring
locally — no VoiceMeeter/Reaper. PR1 of the design in docs/streamer-mix-outputs.md.

Architecture: this inverts the engine's proven Phase-2 multi-INPUT-device pattern
to the output side. A new StreamSink = its own AudioDeviceManager + drain callback
+ packed drop-oldest SPSC ring (a mirror of InputDeviceSlot). The PRODUCER is the
main output path (both the duplex callback and the split audioOutputCallback): it
snapshots the guitar monitor mix BEFORE backing is added, then composes the stream
submix (includeGuitar ? guitar : 0) + (includeBacking ? backing : 0) × gain and
packs it into the sink ring. The CONSUMER (streamSinkCallback) drains the ring to
the second device. Backing is rendered once on the master clock and fanned to the
stream ring (never re-advances the transport / touches backingLock). Default off →
zero behaviour change; the sink reopens across restarts (reopenDesiredStreamSink,
mirroring reopenDesiredExtraInputs).

Surface: NodeAddon setStreamOutputDevice/clearStreamOutput/setStreamBus/
setStreamBusGain/getStreamSinkLevel/isStreamOutputActive/getStreamUnderflowCount
→ audio:* IPC → preload → a new "Streaming & Extra Outputs" section on the Audio
page (device picker, game/guitar toggles, gain, a meter mirroring what OBS/Discord
receives; persisted to localStorage). v1 rejects a sample-rate-mismatched sink with
a clear error (async SRC is PR3).

Scope (PR1): ONE stream bus = game ± the guitar monitor mix. Per-source A/B mixes
(re-amped DI vs wet as separate OBS tracks) and per-bus mute that lets a local
monitor-kill (#47) NOT silence the stream are PR2 (see the doc). No virtual driver
shipped — route to a spare output / virtual cable / Go-Live capture.

NOT compiled or run on the author's box — this is native C++ (AudioEngine /
NodeAddon) that needs a desktop build. Renderer JS verified with node --check;
TS bridge/preload are additive (AudioModule is an index type so the calls
typecheck). Draft pending a build + a tester pass (see the PR checklist).

Refs got-feedback/feedBack-desktop#48 (tracking), #46/#47 (audio-engine family).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

* fix(audio): harden streamer-mix sink lifecycle/RT-safety (review on PR #49)

Addresses the P0/P1/P2/P3 findings from the Codex + manual review.

P0 — shutdown UAF: ~AudioEngine() never tore down the stream sink, and
StreamSink declared `manager` before `callback`/`ring`, so the manager
could be destroyed after the callback/ring it drives. stopAudio() now
closes the sink (and the dtor calls stopAudio()), and `manager` is
declared LAST so it destructs first even if a teardown path is missed.

P1 — stopAudio() ignored the sink: the 2nd output device kept running and
underflowing while "stopped". It now closes via closeStreamSinkDevice()
(intent preserved → startAudio() reopens, like extra inputs).

P1 — split-path producer buffers could realloc under a live callback:
streamGuitarScratch/streamMixScratch are now sized to a fixed capacity
(>= the ring) so a same/smaller-block device restart on either clock never
reallocates them mid-use.

P1 — split path read backingBuffer OUTSIDE backingLock (duplex held it):
composeAndPushStreamMix in audioOutputCallback now runs inside the lock
scope, so backingBuffer is read under the lock that guards its resize.

P1 — live setStreamOutputDevice() broke the SPSC single-writer invariant:
streamSinkAboutToStart() resets the ring while the producer might still be
writing. It now clears `active` before reconfiguring so the producer
stops, and only re-arms after a clean open.

P1 — failed open left stale state: a shared `fail()` path now closes the
device and drops the desired intent, so a deterministic failure (e.g. SR
mismatch) isn't retried every start and never reports active with no
device. The renderer keeps its own persisted choice.

P2 — streamSinkStopped() was empty: now marks the sink inactive (and
clears the meter) on an unplanned device loss, preserving intent.

P2 — no ring-capacity guard on the duplex path: composeAndPushStreamMix
skips (and counts) a block larger than the ring instead of wrapping.

P2 — gain NaN/Inf + bridge bool coercion: native sanitizeStreamGain()
(finite, clamped 0..8); the TS bridge requires real booleans (no
Boolean("false")===true) and a finite gain.

P3 — drop-oldest now counted via streamSink.overflowCount, exposed as
getStreamOverflowCount() through the addon/bridge/preload (mirrors
underflow) for drift diagnosis.

Still NOT compiled here (needs a desktop build). TS typechecks clean
(tsc --noEmit); renderer node --check clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(audio): make stream scratch fixed-capacity; document reconfig tail

Follow-up to the review-fix commit, closing the two residual edge cases
from the Codex re-review:

- Producer scratch (streamGuitarScratch/streamMixScratch) is now sized to a
  FIXED capacity == the ring and never grown with the block size. Oversized
  blocks are already skipped by the capacity guard, so a fixed cap is
  sufficient and means the buffers allocate exactly once — they can never
  realloc under a live split-mode producer for ANY later/hotplug block size
  (previously a larger restart block could still realloc).

- Reworded the setStreamOutputDevice() comment to stop overstating the
  active=false barrier: it prevents NEW producer pushes, but a block already
  in flight can finish one push before the (much slower) device reopen drives
  streamSinkAboutToStart's ring reset. Net worst case is one imperfect block
  on the stream bus (never the local monitor) during a manual device switch —
  atomic, no data race, no UAF. Documented as a known PR1 limitation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(audio): count oversized stream blocks (capacity guard before scratch guard)

Codex re-review nit: with the fixed-size scratch (== ring), an oversized
block tripped the undersized-scratch guard first and was dropped without
being counted. Check the ring-capacity guard FIRST so oversized duplex
blocks are always counted as stream overflows; keep the scratch guard
after it as cold-start/reconfig defense.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: byrongamatos <xasiklas@gmail.com>
2026-06-29 00:49:25 +02:00
9facf78c98 Add "Disable input monitoring" (full monitor kill) for own-rig players (#47)
* audio: add "Disable input monitoring" (full monitor kill) for own-rig players

The "Mute direct monitoring" control only mutes the DRY pass-through: by
design it's bypassed when the signal chain has processors
(SourceChain.cpp — `monitorMuted && !hasProcessors`). So with an amp sim
loaded (the opt-out default), the processed signal still reaches the
output and the mute is a no-op — you can't silence in-app monitoring, and
an idle input through a high-gain amp sim is a constant distorted buzz.

Add an additive, default-OFF "monitor kill" that silences the guitar bus
unconditionally (dry AND processed), independent of the dry-mute and not
subject to the song-load suppression guard. It runs after the chain so the
pitch detector / metering still see real signal, and before the backing-
track mix so playback is unaffected. Wired end to end:

  SourceChain (flag + processBlock gate) -> AudioEngine facade
  -> NodeAddon setMonitorKill (IsBoolean-guarded) -> audio:setMonitorKill
  -> preload setMonitorKill -> Audio settings "Disable input monitoring"
  checkbox (persisted/restored like monitorMute).

Default off means existing amp-sim monitoring is byte-for-byte unchanged;
fail-soft at every layer (IsBoolean guard / typeof guard / optional call)
so a downlevel addon or renderer is a clean no-op.

Addresses got-feedback/feedBack-desktop#46 (the monitor-kill half). The
amp-sim/NAM opt-in onboarding remains a follow-up tracked there.

NOTE: not compiled/run on the author's box — the native addon needs a
desktop build. Logic mirrors the existing setMonitorMute path; verified by
inspection + `node --check` on the renderer. Needs a build + tester check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

* audio: fix monitor-kill persistence + make it global; clarify mute copy

Addresses review findings on the "Disable input monitoring" PR.

P1 (blocker): monitorKill never persisted across restart. Both
normalizeDeviceSettings whitelists (renderer screen.js + main
audio-bridge.ts) and the AudioDeviceSettings type only carried
monitorMute, so the saved flag was stripped on every load before the
restore block could read it. Carry monitorKill through both normalizers
and the TS interface, mirroring monitorMute.

P2: the kill is a global "play through my own rig" preference but
AudioEngine::setMonitorKill only touched source0(), so additional active
sources (multi-input) stayed audible while the UI claimed it silences
"all in-app monitoring". Apply it to every pooled source; addSource
never resets the flag, so later-activated sources inherit it. Pool
pointers are fixed and these are atomic stores, so the control-thread
iteration is race-free.

P3: clarify the existing "Mute direct monitoring" helper text so the two
controls aren't confused — it mutes the dry passthrough only and a
loaded amp sim is still heard; point users to "Disable input monitoring".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: byrongamatos <xasiklas@gmail.com>
2026-06-28 22:22:42 +02:00
e7b7a08f44 audio: tag input device labels with driver type (ASIO/WASAPI) on Windows (#44)
The setup wizard's audio-input picker showed one entry per device with no
way to tell ASIO from WASAPI/DirectSound — testers asked to see the driver
type "to really figure out their setup." The renderer registers one source
per (driver type x device) but put the type only in the logicalSourceKey,
not the label, so every variant shared an identical name. Core's input_setup
then de-dupes by label and collapsed them to one — silently pinning whichever
variant sorted first (often not the low-latency ASIO one).

Append the driver type to the source label (and the redaction pseudonyms) so
the variants read "Focusrite (ASIO)" vs "Focusrite (Windows Audio)" and the
label de-dupe stops collapsing them. Gated on more than one driver type
actually exposing inputs, so macOS (Core Audio only) shows no redundant suffix.

Renderer-only; verified by syntax check. The node test suite covers src/main
config logic, not this path; ASIO/WASAPI enumeration is verified on a Windows
desktop build with a real interface.


Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 20:25:47 +02:00
59e1c1cb0e fix(preload): expose desktop bridge as window.feedBackDesktop (#40)
* fix(preload): expose desktop bridge as window.feedBackDesktop

The core feedback app reads window.feedBackDesktop, but the desktop
preload exposed the bridge as window.slopsmithDesktop. On the desktop
build window.feedBackDesktop was therefore undefined: the DLC-folder
Browse button stayed hidden in both the first-run wizard
(#v3-ob-songdir-browse) and Settings (#btn-pick-dlc), and the rest of the
bridge silently fell back to browser mode.

Finish the rebrand: rename the exposed global slopsmithDesktop ->
feedBackDesktop, plus the internal api object, the renderer +
plugin-manager consumers, the private __feedBackDesktopAudioHooks scratch
namespace, and the comments/migration doc. No compatibility alias — the
ecosystem moves to the new name (TARGET-CURRENT).

Plugins that still read window.slopsmithDesktop are renamed in their own
PRs; nothing ships until the next desktop build bundles them together, so
there is no broken shipped artifact.

Fixes the "Select DLC Songs Folder — No Browse" report (wizard + Settings,
Mac + Windows).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

* fix(preload): also expose bridge under legacy slopsmithDesktop name

Keep plugins/community code built against the pre-rename bridge working
after the rename. Same isMainFrame gating. See got-feedback/feedBack-desktop#41.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: byrongamatos <xasiklas@gmail.com>
2026-06-27 13:16:03 +02:00
4d19398a50 build: bundle feedback-plugin-virtuoso (replaces slopscale-fork) (#31)
* build: bundle feedback-plugin-virtuoso (replaces slopscale-fork)

The practice plugin relaunched as Virtuoso (id virtuoso) at got-feedback/feedBack-plugin-virtuoso. Repoint the bundle list off the stale feedback-plugin-slopscale-fork snapshot. The clone-dir derivation strips feedback-plugin- -> dir 'virtuoso', matching plugin.json id; default-branch clone = main. Requested by @xasiklas.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: tidy bundled-plugins list (review follow-up)

Addresses the two minor notes on this PR:
- Sort virtuoso into its alphabetical slot (after update-manager); it was
  left in the old slopscale-fork position between setlist and song-preview.
- Fix the stale dirname comment: the prefix stripped is "feedback-plugin-",
  not "slopsmith-plugin-" (pre-existing since the rename; the code at the
  ${owner_repo##*/} / #feedback-plugin- step is unchanged).

No functional change — clone order/dirname resolution is unaffected.

Signed-off-by: ChrisBeWithYou <16130099+ChrisBeWithYou@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Signed-off-by: ChrisBeWithYou <16130099+ChrisBeWithYou@users.noreply.github.com>
Co-authored-by: ChrisBeWithYou <chris@rifflarr.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: ChrisBeWithYou <16130099+ChrisBeWithYou@users.noreply.github.com>
2026-06-22 15:07:04 -05:00