Skip to content

Tracks: enable the Pencil tool to draw MIDI regions (#154) - #158

Merged
fabox-os merged 1 commit into
mainfrom
fix/154-pencil-midi-region
Nov 22, 2026
Merged

fabox-os merged 1 commit into
mainfrom
fix/154-pencil-midi-region

Conversation

@fabox-os

Copy link
Copy Markdown
Owner

Closes #154

Agent: ui-agent (with mixer/midi data model in prowave-app)
Crate: prowave-app
Phase: Tracks area editing (Logic Pro parity: Pencil tool)
Logic Parity: Pencil tool draws an empty MIDI region on a MIDI or instrument track: click for a one-bar region, drag to set its length, both snapped to the grid.
Changes:

  • Pencil Tool is selectable in the Tracks area's left-click tool menu, with its own icon.
  • Project::add_midi_region adds the empty region; refuses audio/bus tracks and zero-length regions.
  • Lanes now sense drags; the Pencil uses them, other tools are unaffected.
  • Other tools in the menu stay disabled (Eraser, Scissors, Glue, Text, Solo, Mute, Zoom, Marquee, Automation, Flex).

Audio Thread Safe: yes (UI and model only; no audio-thread code touched)
WASM Build: not checked on this PR (no change to prowave-dsp or wasm-facing crates)

Test:

  • cargo test -p prowave-app pencil (model creation rules and tool-menu wiring)
  • cargo test --workspace: passes
  • cargo fmt --all -- --check, cargo clippy -p prowave-app --all-targets -- -D warnings: clean
  • cargo xtask check: every step passes except deny (advisories), which fails on existing dependencies (url stack-overflow advisory; yanked async-executor and clipboard-win). This PR does not change Cargo.lock or Cargo.toml.

Not yet checked: drag and click in the running window. Please try it on a MIDI track before merging.

🤖 Generated with Claude Code

The Left-click tool menu in the Tracks area had only the Pointer tool
working; the Pencil entry was a disabled placeholder, so a MIDI or
instrument track had no way to draw an empty region on the timeline.

- Pencil Tool is selectable and has its own toolbar icon.
- With the Pencil, a click on an empty stretch of a MIDI track adds a
  one-bar region; a drag sets its length. Both snap to the grid.
- Project::add_midi_region adds the empty region, refusing audio and bus
  tracks and zero-length regions, and tells the engine about it.

Other tools in the menu remain disabled for now.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
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.

fix/feat/bug : mising/diabled tools

1 participant