Skip to content

Drum chart consumption: drum_tab/drum_hits + multi-part support #6

Closed

Description

@cchacs

Part of #2.

Consume the song's drum chart data already streamed by core so the calibration wizard (#4) and scoring engine (#7) have something to calibrate/score against.

Wire messages (confirmed in lib/routers/ws_highway.py):

  • song_info.has_drum_tab (bool) and song_info.drum_parts: [{id, name}] — a song can have multiple drum parts (different drummers/sections); ?drum_part=<id> on the highway WS URL picks which one streams. Always a list (empty = no drums, single entry = legacy one-drum pack) so a part picker can bind unconditionally.
  • drum_tab message: { type: 'drum_tab', version, name, kit: [{id, name}], total, part_id? } — the kit legend for the active part.
  • drum_hits message(s): { type: 'drum_hits', data: [{t, p, v?, g?, f?, k?}], total }, chunked 500/frame.
  • Legacy fallback: "drum sloppaks encoded as guitar notes" skip the drum_tab/drum_hits branch entirely and stream through the regular notes message instead — confirm whether this plugin needs its own legacy decoder or can treat legacy charts as "no drum_tab, skip MIDI scoring for this song" (prefer the latter for v1 unless legacy packs are common in this org's library — check before committing to a decoder).

Tasks:

  • Subscribe to drum_tab/drum_hits on the existing highway WS connection (check highway.js's public surface first — does it already buffer/expose these the way it does getNotes()/getChords(), or does this plugin need its own listener on the raw socket?).
  • Surface a part picker when drum_parts.length > 1.
  • Handle the "no drum_tab for this song" case cleanly (hide/disable the plugin's UI rather than erroring).

Acceptance:

  • Loading a sloppak with a single drum part surfaces its kit[] to the calibration wizard.
  • Loading a sloppak with multiple drum parts lets the user pick one, and switching parts re-resolves the active kit[].
  • Loading a song with no drum_tab degrades gracefully (no console errors, clear "no drum chart" state).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions