Lightningbeam/lightningbeam-ui
Skyler Lehmkuhl 6629adc7d2 Cycle recording: monitor the MIDI overdub on later passes
In merge mode every pass layers into the same clip, so a later pass has to
PLAY BACK what earlier passes laid down — otherwise you overdub against
silence, which defeats the point of merging (you can't put a hi-hat on a
kick you can't hear).

Two things stood in the way, and they turned out to be the same bug:

- The captured notes only reached the backend's MIDI pool clip at STOP, so
  during the session the sequencer had nothing to schedule. The wrap now
  folds the notes captured so far into the pool clip. Their offsets drop
  straight in: a cycle MIDI recording is anchored at loop_start, so they're
  already region-relative.

- The recording-progress block resizes the clip instance every audio buffer
  from `playhead - start_time`. The playhead jumps BACKWARDS at a wrap, so
  that duration collapsed to zero and grew again on every pass. It reset the
  clip bar to zero each pass (visible), and it shrank the clip instance back
  to nothing at each wrap (invisible) — so even once the notes were in the
  pool, the sequencer saw a zero-length instance and scheduled none of them.

Fixed at the root: once the transport has wrapped, the recording spans the
whole cycle region and STAYS there — it doesn't track the playhead at all.
`cycle_loop_len` (set at the first wrap) pins it, which both holds the clip
bar at full region length after pass one and keeps the instance stretched
across the region so the merged notes get scheduled.

Writing the events reuses the clip's existing Vec, so it's allocation-free
after the first wrap; mutating the pool from the audio thread is what
Command::UpdateMidiClipNotes already does.
2026-07-14 10:39:12 -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 Type the time domains: no raw f64 in any time-carrying API 2026-07-14 09:31:04 -04:00
lightningbeam-editor Cycle recording: monitor the MIDI overdub on later passes 2026-07-14 10:39:12 -04:00
.gitignore Add text layers 2026-06-27 18:14:47 -04:00
Cargo.lock Cycle recording phase 1: transport loop region 2026-07-13 02:13:06 -04:00
Cargo.toml Add animated GIF export 2026-07-09 06:02:47 -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