Skip to content

keyboard migration: VirtualSynth + ModMatrix (Phase 1)

Created by: jedmund

Migrates the two tool-strip callers of `SynthKeyboardView` onto `KeyboardContainer`. Follows plan-v3 Phase 1. Stacks on #37.

Summary

  • VirtualSynth and ModMatrix swap `SynthKeyboardView(...)` for `KeyboardContainer(config: .contained(...))` with `labelMode: .whiteOnly` and the existing 3-octave pitch range.
  • Drop ModMatrix's custom `.frame(height: 120)` and `.background(RoundedRectangle...)` — `.contained` supplies both via its chrome.
  • Contained layout now caps container width at `maxWidth` when `whiteKeyCount * 60` would overflow, so tool-strip keyboards don't blow past their parent card. Keys compress naturally via `aspectRatio`.

Test plan

  • Playground → VirtualSynth: all octaves playable, audio unaffected, labels on white keys only, card sizing correct.
  • Playground → ModMatrix: keyboard renders inside the tool panel at the expected width; audio works; no visual regression from the chrome swap.

Merge request reports

Loading