Lightningbeam/daw-backend/src
Skyler Lehmkuhl 053a77cfa1 Timeline types stage 1: make lightningbeam-core Beats/Seconds-typed
Type ClipInstance.timeline_start/timeline_duration/loop_before as Beats and
thread Beats/Seconds through core so the compiler catches the seconds-vs-beats
mismatches behind the audio-clip placement/drag/trim bugs.

Fixes latent mixups surfaced by the types:
- add/remove/split clip instance: the audio "effective duration" fallback was
  the content-seconds span treated as beats (clips stopped early off 60 BPM);
  now converted via the tempo map at the clip's start.
- trim validation: extend-left/right clamped a content-seconds delta against a
  timeline-beats gap (and moved trim_start + timeline_start by the same raw
  amount, assuming 1:1). Now the gap is converted to content seconds and the
  timeline moves by the beats-equivalent.
- split content-split point mixed beats into a seconds trim value.
- set_keyframe: visibility-start fallback returned beats where seconds expected.
- hit_test: timeline_time (s) compared against beats without conversion.

Typed backend boundaries that were passing beats/seconds as bare f64:
add_audio_clip (start/dur Beats, offset Seconds), move_clip/extend_clip (Beats),
set_offset (Seconds). Command enum transport stays f64.

Serialization is unchanged (Beats/Seconds are #[serde(transparent)]).
lightningbeam-core builds; 299 core tests pass. The editor call sites
(recording/drop/paste/drag placement) are updated in stage 2.
2026-07-10 09:36:07 -04:00
..
audio Timeline types stage 1: make lightningbeam-core Beats/Seconds-typed 2026-07-10 09:36:07 -04:00
command Timeline types stage 1: make lightningbeam-core Beats/Seconds-typed 2026-07-10 09:36:07 -04:00
dsp Add state-variable filter 2026-02-20 00:20:59 -05:00
effects Fix oscillator/synth phase wraparound drift 2026-07-02 01:15:45 -04:00
io Massive tempo refactor - make beats canonical time rep and allow them to be non constant 2026-04-02 10:26:01 -04:00
tui Massive tempo refactor - make beats canonical time rep and allow them to be non constant 2026-04-02 10:26:01 -04:00
lib.rs Make beats canonical representation rather than seconds 2026-06-02 13:06:36 -04:00
main.rs midi hotplug 2025-11-03 09:48:38 -05:00
tempo_map.rs Make beats canonical representation rather than seconds 2026-06-02 13:06:36 -04:00
time.rs Massive tempo refactor - make beats canonical time rep and allow them to be non constant 2026-04-02 10:26:01 -04:00