8000 feat(editor): filled Triage-style waveform on the master audio lane by johannboehme · Pull Request #47 · johannboehme/tk-1 · GitHub
[go: up one dir, main page]

Skip to content

feat(editor): filled Triage-style waveform on the master audio lane - #47

Merged
johannboehme merged 1 commit into
mainfrom
claude/elated-lewin-d85e56
May 25, 2026
Merged

johannboehme merged 1 commit into
mainfrom
claude/elated-lewin-d85e56

Conversation

@johannboehme
Copy link
Copy Markdown
Owner

Summary

  • The Editor's master audio lane drew one 1-px bar per peak, which a tester read as scattered vertical ticks rather than an audio track.
  • Replaced it with the Triage screen's filled-envelope look so it's unmistakably audio: a filled body with a vertical gradient glowing from the centreline plus a subtle ground line for silent stretches.
  • Bumped peak resolution 1500 → 4000 for crisper detail when zoomed in.

How it works

  • Builds a per-pixel-column min/max envelope by inverting the view mapping (x → arr-T → peak index) instead of stamping one bar per peak — so every column a segment covers gets a value and there are no gaps between ticks.
  • Peak-hold when ≥1 peak/pixel (zoomed out); linear interpolation between neighbours when <1 peak/pixel (zoomed in), mirroring the Triage waveform.
  • 3-tap smoothing folds peaks into curves without losing transient silhouettes.
  • Drawn per contiguous arrangement-segment run, so long-form gaps stay real gaps and smoothing never smears across them.
  • Stays inside the existing palette (warm ink #5C544A); no new hue.

Files

  • frontend/src/editor/components/Timeline.tsx — waveform draw block rewritten.
  • frontend/src/pages/Editor.tsx — peak bucket count 1500 → 4000.

Verification

  • tsc --noEmit clean; waveform-peaks unit tests pass.
  • Rendered the exact new draw algorithm headless against synthetic peaks across scenarios — old vs new, full view, moderate + tight zoom (sub-sample interpolation), and long-form two-chunk. Filled, smooth body with no gaps or smearing in every case.
  • A real in-app browser check wasn't automatable here (needs a persisted job with decoded audio in IndexedDB), so reviewers should eyeball the master lane in a real Editor session.

Test plan

  • Open a job with master audio in /job/:id/edit; confirm the master lane reads clearly as a filled waveform.
  • Zoom in/out; confirm the body stays smooth (no gaps zoomed out, no aliasing zoomed in).
  • Long-form job: confirm each chunk renders a filled body and gaps between segments stay empty.

🤖 Generated with Claude Code

The master audio lane drew one 1-px bar per peak, which read as scattered
ticks rather than an audio track. Replace it with the Triage screen's
filled-envelope look: per-pixel-column min/max (x -> arr-T -> peak-index
inverse so every column is painted, no gaps), 3-tap smoothing, a vertical
gradient glowing from the centreline, and a subtle ground line for silent
stretches. Drawn per contiguous arrangement-segment run so long-form gaps
stay real gaps. Bump peak resolution 1500 -> 4000 for crisper detail when
zoomed in.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@johannboehme
johannboehme merged commit c21bdc0 into main May 25, 2026
1 check passed
@johannboehme
johannboehme deleted the claude/elated-lewin-d85e56 branch May 25, 2026 13:04
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

0