Skip to content

Add the expanded Shaper window - #101

Merged
chrislaupama merged 1 commit into
mainfrom
device-windows-15
Nov 16, 2026
Merged

chrislaupama merged 1 commit into
mainfrom
device-windows-15

Conversation

@chrislaupama

Copy link
Copy Markdown
Collaborator

Summary

Clicking the window button on Shaper now opens its expanded window.

  • Layout
    • The lane tabs sit above the display.
    • The Shape, Band and Trigger strip sits on the display's caption row.
    • The curve editor fills the rest of the display. You can drag points and bends, add and delete points, and edit the lane's pills (filter type and resonance, bits and decimate, the High and Low cutoffs) in place.
  • Card below
    • Rate picker and Depth for the selected lane.
    • The trigger's Threshold, which is inert while the trigger is Sync.
    • Mix and Output.
  • How it works
    • The window reuses the card's editor. sh_draw and sh_hit read their geometry from ShScope, which holds either SH_CARD or SH_WIN.
    • The window's canvas sends its events as kind + 16, so they are hit tested in the window's geometry.
    • This is the same approach as the Trance Gate window.

Screenshots

Before (floating card) After (window)

Benchmark

Build time per frame (cargo test -p dstudio-app --release bench_dynamics_windows -- --ignored --nocapture):

Device Card (µs) Window (µs)
Shaper 518.3 547.0

The window costs about the same as the card. The card itself was already this expensive before this change.

Tests

  • New test: shaper_window_draws_the_editor_and_picks_lanes_in_its_geometry.
    • A point low on the window's curve adds a point in the window's geometry and misses in the card's.
    • A lane tab clicked in the window selects that lane.
  • All 329 app tests pass, and clippy is clean.
  • README, docs/devices.md and CHANGELOG are updated.

Generated by Claude Code

The window draws the card's editor in its own geometry (ShGeo: SH_CARD or SH_WIN, set by ShScope while drawing and hit testing): the lane tabs over the display, the Shape, Band and Trigger strip on its caption row, and the curve across the rest of the display, with the lane's Rate and Depth, the trigger's Threshold (inert while synced), Mix and Output in the card below. Window events carry kind + 16 so points, bends and tabs are hit tested at window size. Test shaper_window_draws_the_editor_and_picks_lanes_in_its_geometry; Shaper in the window bench; docs updated.
@chrislaupama
chrislaupama marked this pull request as ready for review November 16, 2026 03:28
@chrislaupama
chrislaupama merged commit d31d8b1 into main Nov 16, 2026
13 checks passed
@chrislaupama
chrislaupama deleted the device-windows-15 branch November 16, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant