Skip to content

lib/ui: piano_keyboard is horizontal-only and a pressed key never releases — unusable as a piano-roll pitch sidebar #570

Description

@InauguralPhysicist

Found porting Deslan Studio's piano-roll panel (DeslanStudio milestone 4d) — the next entry in the lib/ui gap series (#561#569).

What the consumer needs: a DAW piano roll draws a vertical piano-key sidebar (one key per MIDI pitch, 128 rows, scrolled with the note grid) and, ideally, lets a key click preview/enter a note with press and release.

What piano_keyboard (ui_w_special.eigs) provides:

  1. Horizontal-only. The widget lays octaves left-to-right with vertical keys; there is no vertical orientation, so it cannot serve as the pitch ruler of a piano roll. DeslanStudio paints its own key sidebar on a canvas instead (upstream Qt port does the same, so this is survivable — but the widget then has no consumer at all in a DAW).
  2. pressed_note never clears. _mousedown_piano_kb sets pressed_note and fires on_note of [w, note, 1], but the registration has clear_pressed: null and no mouseup path touches it — the key stays highlighted forever and there is no note-off. on_note's third argument is always 1; nothing ever calls it with 0.
  3. No velocity / no release semantics means the widget can't drive note entry (a note needs a duration) — only fire-and-forget triggers.

Suggested minimal fix: clear pressed_note + fire on_note of [w, note, 0] on mouseup (dispatch already has the drag-release seam), and either a vertical: 1 mode or a documented note that the widget is a horizontal trigger strip only.

Context: DeslanStudio src/client/piano_roll_view.eigs (4d) documents the probe result and paints the sidebar on canvas; ledgered in its PORTING.md gap table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions