Lightningbeam/lightningbeam-ui
Skyler Lehmkuhl 0050c18623 Timeline types stage 2: fix editor seconds↔beats at every clip boundary
Thread Beats/Seconds through the editor now that lightningbeam-core is typed.
The timeline UI is seconds-domain (pixels_per_second, viewport_start_time,
playback_time, drag_offset), while ClipInstance.timeline_start/duration/
loop_before are beats — the compiler flagged every place the two were mixed.

Fixes the reported bugs and the whole class behind them:
- Recording placement (audio + MIDI + webcam): the new clip's timeline_start
  was written from playback_time (seconds) into a beats field, so a second
  recording landed at the wrong time. Now converted via the tempo map.
- Drag/move: introduce snapped_move_offset -> Beats (snap in the seconds/pixel
  domain, express the anchor's movement in beats) and moved_start(); the group
  clamp, live preview, and commit all use one uniform beats offset instead of
  adding a seconds delta to a beats position.
- Trim/loop drag preview + commit: overlap limits come from the timeline
  (beats) but trims are content seconds — converted at the boundary.
- Drop (asset drag, stage + timeline), paste, duplicate, split-at-playhead:
  all convert the seconds drop/playhead position to beats before placing.
- Stage playback gates + clip-local time remap: compared seconds playback_time
  against beats timeline_start; now both in seconds.
- Piano roll / infopanel / effect export: clip_dur is Seconds; effect and
  waveform data converted at use.

Core API refinement (motivated by the above): find_max_trim_extend_left/right
now return Seconds (the content-seconds gap) instead of raw Beats, since every
trim caller wants seconds; loop-extend callers convert to beats. Added a
beats_to_x() timeline helper.

Whole workspace compiles; 299 core tests pass.
2026-07-11 14:10:38 -04:00
..
beamdsp Code cleanup 2026-02-19 11:19:44 -05:00
egui_node_graph2 highlight node connections directly 2026-02-20 11:13:34 -05:00
gpu-video-encoder Address code-review findings across export, decode, and data model 2026-06-26 17:47:32 -04:00
lightningbeam-core Timeline types stage 2: fix editor seconds↔beats at every clip boundary 2026-07-11 14:10:38 -04:00
lightningbeam-editor Timeline types stage 2: fix editor seconds↔beats at every clip boundary 2026-07-11 14:10:38 -04:00
.gitignore Add text layers 2026-06-27 18:14:47 -04:00
Cargo.lock SVG export: emit text layers as real glyph outlines 2026-07-09 07:10:59 -04:00
Cargo.toml Add animated GIF export 2026-07-09 06:02:47 -04:00
GPU_VIDEO_DECODE_PLAN.md export: cache the static background + bilinear video, add render profiling 2026-06-25 23:30:51 -04:00
build-static.sh Video export 2025-12-07 13:17:21 -05:00
build-windows.bat windows build fixes 2026-02-24 14:40:16 -05:00