Found while testing crates/engine/src/score.rs:~150 (measure_grid, `if ub <= ua { break; }`), used by layout()
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With start now optional, {end} alone resolves the start from the
selection; the empty-range fallback still went through event.tempo,
which put the tempo at tick 0. CodeRabbit flagged this.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found while testing crates/engine/src/cmd.rs:326-336 (range_param), used by crates/engine/src/cmd/event.rs:148 (insert_time) and :172 (cut_time)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collapse consecutive duplicate SMF tempos only if the session tempo at
the event tick already matches, so existing session tempo markers are
overridden as expected.
import_midi_bytes capped meter changes at MAX_MIDI_METERS (10,000), but
left imported tempo events and synth tracks unbounded. Dense MIDI files
inserted unlimited tempo markers into the session tempo map, degrading
linear tick-to-sample conversions across playback and audio processing,
and instantiated up to 4,096 synth tracks for controller-only tracks.
Add MAX_MIDI_TEMPOS (10,000) and MAX_MIDI_TRACKS (512) caps checked
before session mutation, and collapse consecutive equal tempo events.
is_take_header compared only the format chunk and the data chunk's
place, so a WAV with its own metadata in the reserved chunk passed and
recovery overwrote that metadata. It now rebuilds the recorder's header
for the frame count the file claims (RIFF or RF64) and accepts only an
exact match, as its doc comment already said.
The recorder wrote each take into one float WAV with no length cap, but a
file is read back whole only up to 1 G samples (the decode and import
limit). A longer take stayed on disk and no clip was placed.
Each take file now holds at most take_file_samples(): the import limit,
and when the input runs at another rate than the session, no more than
the rate conversion keeps per channel. A take that fills its file goes on
in the next one, named by take_part() (Vox_01.wav, Vox_01-2.wav, ...).
Placing a recording reads a track's files in order as one take: its clips
are cut where one file ends and the next begins, loop passes and punch
ranges run across the files, and a file nothing is kept from isn't added.
Crash recovery finds and repairs every file of an unfinished take. A next
file that can't be made stops the take with a disk error, as a failed
write does, and keeps everything written up to there.
main split crates/mix/src/lib.rs: the clip-FX gain clamp now lives in
clips.rs and the send-level automation clamp in automation.rs (via
crate::SEND_LEVEL_MAX_DB). Adds tests for the send-automation clamp and
the load-time sanitize clamp (#884).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 10-sample fade-out was already shorter than the processed clip, so the
fade-out clamp went untested. Use 40, as CodeRabbit suggested.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bare group path leaves the folder empty, so an absolute audio path
passed the starts_with check. Reject root and prefix components too,
as CodeRabbit noted, and cover it in the regression test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>