Skip to content

Per-panel lyrics use the wrong arrangement; chord diagrams (fretboard) don't work in splitscreen at all #17

Description

@carochacs

Lyrics — renders twice per panel (bug) — fixed in #21

Correction: the original version of this issue claimed the bug was hardcoded arrangement=0 in the lyrics WebSocket connect calls. That's wrong — verified server-side that lyrics are song-level (song.lyrics, independent of which arrangement is resolved), so arrangement=0 vs any other index produces identical payloads. Not a bug.

The actual bug: splitscreen's per-panel lyrics overlay (a DOM band, meant to be the single lyrics display "regardless of which renderer owns the canvas") also synced the highway's built-in setLyricsVisible flag to the same on/off state. That flag isn't a small in-canvas cue as assumed — the default 2D renderer's drawLyrics() draws full lyric text when it's true, and viz plugins that read bundle.lyricsVisible (3D Highway) draw their own copy too. With the overlay on, panels showed the lyric line twice.

Fixed in #21: the built-in flag is now always forced false, so the panel's DOM overlay is the sole lyrics display.

Out of scope for this issue: making the lyrics overlay's on-screen position user-movable/draggable per panel. Worth doing, tracked separately as a v2 enhancement.

Chord diagrams — don't appear in splitscreen at all (missing per-panel support)

The fretboard/chord-diagram overlay plugin (feedBack-plugin-fretboard) is a global singleton: one canvas, bound to the single module-level highway object (highway.getTime()/getNotes()/getChords()), positioned absolutely over #player-controls. It has no per-panel concept.

In splitscreen mode, the main highway is hidden and each panel runs its own independent highway instance. The fretboard overlay has no way to attach to a specific panel's highway or render inside that panel's DOM, so it simply doesn't work while splitscreen is active — there's no toggle for it in any panel's control bar, and even if there were, the plugin's current architecture can only ever reflect one global highway.

Fix requires two coordinated changes:

  1. Refactor the fretboard plugin from a singleton into a factory that supports multiple concurrent instances, each bound to its own { container, highway } — while preserving today's singleton behavior for the normal (non-split) player.
  2. Add a per-panel "Chords" toggle in splitscreen that instantiates one fretboard overlay per panel, mounted in that panel's own DOM and bound to that panel's hw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions