Commits
Commits on
2b647ea0d8fa918193ee7424f4a366dffabf4b02Filtered to crates/engine/src/project.rsClear filter2026-08-11
✨ feat(mix): every track has its own volume and the mix has a ceilingAhmet Kaan Gümüş · dc7d07d
✨ feat(mix): every track has its own volume and the mix has a ceiling A fader per audio track and one master limiter over the sum of them, both applied where the lanes are added and nowhere else -- so what an export writes is what the room heard, by construction rather than by two call sites agreeing. A track's fader moves everything on it, every frequency: it is not the equalizer (one take, one band) and not the panel's volume (this machine's monitoring, which no file carries). The limiter is lookahead, soft-knee and per sample: the peak of an exported file is a measurement, not a hope, and the hard clamp stays behind it as the backstop. Flat settings are still the bit-exact passthrough: one lane at unity with the limiter off never opens a mixer thread, and an mp4 of such a timeline is still a packet copy. A mixed one re-encodes, and the card says so before the export starts. Both belong to the project, so `.edith` is v9: `fps`, `limiter` and `gain` lines, every older dialect still loading flat. The rate line pays an old debt with it -- a timeline of nothing but stills and songs now comes back at the rate it was cut at instead of the one its scaffold implied. UI: the mix card (f, or an audio track's own header), rows with steppers and hold-to-run arrows, and the track's level on its header.
✨ feat(timeline): a clip goes where you drop it, along its track or across themAhmet Kaan Gümüş · cdb0c4b
✨ feat(timeline): a clip goes where you drop it, along its track or across them A clip dragged along its own lane now lands on the frame the pointer let it go on, and a library row dropped on a lane goes in under the pointer instead of at the playhead. Project::move_to_lane becomes Project::move_clip(from, idx, to, start): the whole group travels the same distance, each half on its own lane, and start is clamped to the gap every member lands in -- a clip butts up against the take next door instead of overwriting it, and the tightest member's wall wins. A drop that changes neither lane nor frame is a click and costs no undo step. The front-end reads the frame under the pointer through the same View the boxes are drawn through, so it lands where it was let go at any zoom, less the offset the hand grabbed the box at, and snaps to a neighbour edge or the playhead within a few pixels.
🔀 merge(T3): mixed frame rates meet mkv HEVC, zero-source survival and the zoomAhmet Kaan Gümüş · 6b5fa2e
🔀 merge(T3): mixed frame rates meet mkv HEVC, zero-source survival and the zoom `main`'s `open_project` now walks every source with the scaffold in its own slot (T6), so the per-source `rates` table is built there frame by frame beside `counts` -- one table in two vectors, grown and shortened together. The codec gate T1 leans on stays; the frame-rate gate is still gone, and a Matroska file shot at another rate imports through the very same door an mp4 does, its rate read off the demuxer's `default_duration`. Grafted from the losing branch, which had the better arithmetic: * `Rate::from_fps` is exact. Built on `mux::frame_timing` -- the pair the muxer already counts an export's frames in -- divided by that pair and reduced, so 24000/1001 over 30 is `800/1001` and stays it however far the timeline runs. The milli-fps rounding it replaces was a frame off after seven hours; that ponytail is gone rather than documented. * A rate no timescale can *name* is an `Err` in `frame_timing`'s own words rather than a silent 1:1, and `matches_timeline` is where a file carrying one is refused -- it hands back the `Rate` it accepted the file at, so the number the refusal was decided on is the number the file plays by. * `file_frames` and `file_rate` ask one `source_of`, so a path that names a length names a rate too. * Five more tests in `tests/mixed_fps.rs`, in timeline frames: the exactness of the NTSC ratio, a trim of an off-rate clip to the room it was dragged to, the neighbouring 30 fps clip still read frame for frame, the linked sound placed at its picture's length, and the exported pictures measured against the file's own frames rather than merely counted. ...and the note the next builder needs in `copy_audio`: a lane holding a clip at another rate stays a packet copy on purpose. A clip counts the *timeline's* frames, so the window the copy trims a source's sound to is whole timeline seconds and the packets are already in sync; re-encoding it would buy nothing and cost a generation of loss. A speed is different, and still refused there.
2026-08-10
✨ feat(timeline): a clip shot at another rate plays at the speed it was shot atAhmet Kaan Gümüş · 26af1e4
✨ feat(timeline): a clip shot at another rate plays at the speed it was shot at A frame rate of its own is no longer a refusal at import. Every frame number in the edit list counts the *timeline's* frames -- a clip's in/out included -- and a file shot at another rate is converted once, at the decoder's door: `Rate` (milli-fps rational, `Speed`'s floor/ceil pair) says which frame of the file a timeline-rate frame is. Playback opens its worker through it and stamps the pictures coming back through its inverse; the export walks its span through it after the speed, so a 2x 24 fps clip on a 30 fps timeline is exactly both. Nothing in `project.rs` changed: placement, trim, split, paste and speed are the same arithmetic on one clock, and a single-rate project takes the identity map everywhere it used to take nothing. A library row now names the *file's* rate rather than the timeline's, which was true only while every source shared it.
🔀 merge(T6): the last media leaves, and nothing assumes source 0 stayedAhmet Kaan Gümüş · 7e4ead7
🔀 merge(T6): the last media leaves, and nothing assumes source 0 stayed Both sides kept: the library-removal slice (a project may name no file, the audio reference is never a still, the clipboard follows its file down the list, a silence edit drops the selection) and main's EQ audio export, image left-trim, track removal, volume slider, hold-repeat and EQ spectrum. The one textual conflict was the test import list; close_session now also drops the gestures and caches those slices added.
🐛 fix(library): the last media leaves and nothing assumes it stayedAhmet Kaan Gümüş · 96c9fbeBrowse files
🐛 fix(timeline): a still stretches out from its left edge like its rightAhmet Kaan Gümüş · bbc3499Browse files
✨ feat(timeline): a jumpcut reaches as far as you tell it toAhmet Kaan Gümüş · 88fbed0
✨ feat(timeline): a jumpcut reaches as far as you tell it to A ripple used to be the whole timeline's business. It is a choice now: the card's first row says whether an apply reaches this take (its picture and its sound), this track alone, or every track -- and a track nobody named does not move, which is how a podcast track loses its silences while the music under it stays where it was. The engine takes an arbitrary set of lanes, not a kind or a range, so what "selected" means stays the front-end's business. It refuses, by name, a scope that would take one half of a take with it rather than quietly widening to the other half: widening would edit a track the user did not name, which is the surprise scoping exists to end. Naming the take is a row, and detaching is the other answer -- the refusal says both. The notice names what it reached: "5 SILENCES CUT on A1 — other tracks untouched".
🐛 fix(timeline): a silence refusal names the file and the frame it meansAhmet Kaan Gümüş · 564ba30
🐛 fix(timeline): a silence refusal names the file and the frame it means
A still handed to the silence card answered in the mp4 demuxer's words
("a box with a larger size than it"), which is true of a container and
useless to a person: a picture has no sound for the same reason a silent
video has none, so it is refused in the same sentence, by name.
And a rate that cannot be cut at the *end* of a silence said the start
instead -- a frame the cut would have been fine at, and the wrong place to
send anyone looking.✨ feat(timeline): silences are cut out or played fast in one pressAhmet Kaan Gümüş · d4ac3fc
✨ feat(timeline): silences are cut out or played fast in one press A scan of the selected clip's own sound (RMS dBFS over 20 ms windows, off the decode path the waveform already takes) marks every silence on the lane before anything moves; `enter` cuts them all out with a ripple, `f` plays them at 4x with the room they no longer need closed behind them. Either way it is one edit and one undo press, however many it found. Four numbers, all keyboard-driven from the card: the threshold, the quiet short enough to forgive, the padding kept either side of speech, and the kept sliver short enough to swallow -- the last of which is what stops a breath between two silences surviving as one-frame confetti. `set_speed` does not ripple, so speed mode closes the gaps itself; a clip on another lane lapping over a silence is refused by name, because the lanes would shrink by different amounts. A source with no audio track at all is refused by name too rather than read as one long silence. Output is ordinary clips: `.edith` stays v8.
🐛 fix(timeline): a hole punched into a slow clip leaves no overlapAhmet Kaan Gümüş · c892972
🐛 fix(timeline): a hole punched into a slow clip leaves no overlap `place` punches a hole with `clear`, and `clear` handed the remainder whatever source range rounding produced. At a quarter speed one source frame *is* four timeline frames, so a punch three frames into such a clip left a head that reached past the hole and overlapped what was placed -- the lane invariant, broken by the one edit that is allowed to overwrite. `Speed::fit` now answers `None` for a room nothing fits in and both remainders go through it: no fit, no remainder. The sweep that found it found a second of the same shape. `set_speed` put one rate on a whole linked group without asking whether the group still covered one span: two halves of *different source lengths* can occupy the same frames at 4x (rounding collapses neighbouring lengths onto one footprint) and re-rating them pulls the halves apart, which is a project that will not load again. Refused by name now, like the collision is. The trim walls move with it: one frame of clip always survives, and at a rate below real time one frame of clip is several frames of timeline (`Speed::room`). A trim that cannot fit refuses before it snapshots rather than writing a range wider than its room. Both fuzz sweeps go to 2000 seeds -- 200 walked straight past this, and a sweep this cheap has no business being the narrow one -- and place now lands speeded clips over speeded clips on purpose. Falsified: with the guard removed, `place`'s own `sorted_disjoint` assert fires. Grafted from the rival build of this feature, which the judge preferred on these three points: - floor/ceil pairing on `Speed`: `source_at` (floor) is what an export encodes, `timeline_at` (ceil) is the stamp playback puts on a decoded frame, and the pair makes the frame the pump is holding *exactly* the frame the export writes, at every rate (`speed_maps_both_ways`, 3751 speeds). The floor/floor this had put the preview a whole held frame off the export at slow rates. - the picture now **honours** a rate: the export walk takes the source frame each timeline frame shows and encodes a held one again rather than decoding it twice. `Span::source_len` reads the last shown frame's own source frame and not one more. - the refusal narrows to the mp4's *copied audio lane* only. AV1 has no audio to copy and honours a speeded take whole; WAV and FLAC always did. EVIDENCE: a mixed-rate mp4 (2x then 1x on one lane) reopens as 135 frames at 30 fps and its bright frames are exactly [15, 16, 75, 76, 77, 78] -- the fixture's four-frame flash halved inside the fast clip, whole inside the slow one -- read back both by the engine's own decoder and by ffmpeg.
✨ feat(timeline): clips play at a speed of their ownAhmet Kaan Gümüş · f8effe8
✨ feat(timeline): clips play at a speed of their own A clip gains a rate (`Speed`, thousandths of real time, 0.25x to 4x) and every speed question is answered at the mapping seams that were already there: `Clip::frames` is the source range divided by the rate, `end` is built on it, and `map`/`span_at`/`composite_span_at` walk the offset through `Speed::source_at`. `in_frame`/`out_frame` stay *source* frames, so a trim and a split still address the file. The picture needs no new decoder: the span says how many source frames it reads, and `try_frame` brings the decoder's numbers back through the same rate -- at 2x two decoded frames land on one timeline frame and the display's drop-when-behind policy takes it from there. The sound is resampled per segment inside the worker playback and the audio export already share (linear interpolation, carried across packet seams), so the pitch moves with the rate: tape, not pitch-preserve, and the card says so. Each segment is told how much timeline it owes and pads or trims to it, which is what keeps a run of speeded cuts from drifting. Rounding is where a rate could break the lane, so it does not: `Speed::fit` never hands a trim more source than its room holds, and `Speed::split_at` refuses a cut a slow clip's rate cannot address rather than leaving two halves that no longer add up. The fuzz sweeps set_speed in with the rest. - card in the eq/colour pattern, on `j` and in the clip menu; a drag is one undo step for the whole linked group, 1.00x reachable by hand and by `r` - clip boxes carry a "2.00x" mark, and their width, waveform and details row are the timeline length - WAV/FLAC honour it; mp4 and AV1 *refuse* by name -- that path copies AAC packets and a resample is not a copy (ponytail names the upgrade path) - .edith v8 carries the rate; v7 and older load at 1.00x - `assets/test_speed_sync.mp4`: one flash, one beep, same instant. At 2x they still land together, to the frame.
🐛 fix(timeline): a pasted still never lands on the audio laneAhmet Kaan Gümüş · b586b85
🐛 fix(timeline): a pasted still never lands on the audio lane `Project::paste` routed by `is_audio` alone, so a *copied* still clip -- the one door that does not go through `place_stream_at` -- was pasted as a grouped take across `V1` and `A1`. The A1 half is a PNG the audio worker demuxes: "file contains a box with a larger size than it", which silences the whole session rather than that clip, and the save it writes is one `open_project` then refuses by name. An `is_image` arm mirrors the audio-only one. Same-shape sweep of every clip-level door that routes by source kind: - `Project::paste` (project.rs) -- this defect, fixed. - `PlaybackSession::place_stream_at` -- already routed, image arm returns on the video lane before the audio fork. - `PlaybackSession::open`/`open_project` -- both directions refused by name at load. - `Project::move_to_lane` -- refuses a move across kinds, so no clip can cross by drag. Clean. - `Project::place`, `split`, `regroup`, `lift`, `delete_in`, `trim` -- the caller names the lane or the lane never changes. Clean, and the loader is the backstop for a hand-written file either way. - `Player::insert_source` (app) -- guarded both ways already. Falsification: with the `(_, true) => &[LaneKind::Video]` arm removed the new test fails at the lane count (A1 1 -> 2), and with that assertion lifted it fails on the WAV export with the demux error above -- the two consequences the test names, both reachable. Two doc corrections found with it: `Still::open` now says alpha is dropped by `to_rgb8` (a transparent PNG lands opaque, with the blend as the ponytail), and `first_audio_of` no longer implies an image-first timeline accepts a later audio import -- it widens which source is asked, not what "the timeline is silent" means. tests: images 7/7 (new `pasting_a_copied_still_never_reaches_the_audio_lane` asserts no A1 clip, no audio clip from a picture, the WAV export still carries the sound, and the save reopens), engine lib 155, saveload 12, audio_files 16, lanes 5 (serial), bin 56.
🔀 merge(main): library row menu meets the edge-trim source lengthsAhmet Kaan Gümüş · 5f60e19
🔀 merge(main): library row menu meets the edge-trim source lengths Both sides appended a test at the same place in the app suite; both kept. Seam: `PlaybackSession::counts` (the per-source frame lengths a trim is walled by) is indexed exactly as `sources` is, and `remove_source` is the one thing that shortens that list -- so it takes the matching count out too. Left behind, the gone file's length walled the survivor and the next import landed its count one index late, tripping `note_frames`'s alignment assert.
🔀 merge(main): detach and group beside the colour drag and the edge trimAhmet Kaan Gümüş · 7cce619
🔀 merge(main): detach and group beside the colour drag and the edge trim The one conflict is the test module's import list: both sides added names to it, so the resolution is the union of the two.
🔀 merge(main): edge trim beside the colour drag on the root carriersAhmet Kaan Gümüş · dcd2d0f
🔀 merge(main): edge trim beside the colour drag on the root carriers Both features hang a drag off the root's mouse-move and mouse-up, which is where they collided. Kept both, in press-target order: equalizer, trim, colour, scrub. They cannot overlap -- a gesture belongs to whatever was pressed, and no two of those hitboxes are the same element.
✨ feat(timeline): a take detaches into halves and groups back togetherAhmet Kaan Gümüş · 0c00d5c
✨ feat(timeline): a take detaches into halves and groups back together
A music video's picture and its sound come apart on demand: Detach hands every
half of the group an id of its own, so each one selects, moves, trims and is
removed alone, and Group puts two clips covering the same frames back into one
take. Both are menu items and both are keys ("d" and ctrl+g), like every other
gesture here.
Engine: Project::ungroup(lane, idx) and Project::group(a, a_idx, b, b_idx), one
snapshot each, metadata only. A group id is one span on however many lanes
(links_are_consistent), so group refuses clips whose bounds disagree and names
the bounds to trim to; two clips of one lane, an index that is not there and a
pair that is already one take are refused in the engine's own words. Whatever
either side was grouped with is merged in, since all of it covers that span.
whole_take now reads the same rule on the picture as on the sound: a group id no
other lane carries is half a take on either lane, so Delete on a detached half
leaves the other half exactly where it is instead of rippling it away.🐛 fix(timeline): a ripple-closed clip's head no longer overflows on grabAhmet Kaan Gümüş · affa0a3
🐛 fix(timeline): a ripple-closed clip's head no longer overflows on grab `trim_room` read a clip's head room as `start - in_frame`, which assumes a clip never carries more source in front of it than the timeline has room for. A ripple delete leaves exactly that: cut at 5, delete the first piece, and the survivor slides back to frame 0 still holding in-point 5. Grabbing its left edge then subtracted with overflow -- a panic in debug on every pointer sample of the drag, and a wrapped `lo` in release, which is a clamp that means nothing. Saturating, because frame 0 is the other wall that room was always bounded by: a head can be pulled back to the start of the timeline and no further, whatever the file still has behind it.
✨ feat(timeline): clips are trimmed by dragging their edgesAhmet Kaan Gümüş · 222336b
✨ feat(timeline): clips are trimmed by dragging their edges A 6 px strip at each end of a clip box takes the press the body-drag would otherwise take (gpui `occlude`), so one gesture stays one thing: an edge trims, the middle still moves the clip to another lane, and both ends still select and open the clip menu. The box follows the pointer while the button is down and the engine hears about it once, at the release -- one edit, one undo step for the whole drag, exactly as an equalizer gesture works. `Project::trim` clamps rather than refuses: one frame of clip always survives, an edge never crosses its neighbour on the lane, an in-point never walks back past the source's first frame, and an out-point never runs past the file's own last frame -- a clip ending past it is a project that will not open again. `Project` does not know how long a file is, so `PlaybackSession` now keeps the frame counts it already computes at every import and fills them in. Linked halves trim together to one clamped edge, the tightest wall of the group winning, because a link is one span on however many lanes. `trim_room` is the same clamp without the mutation: the drag asks it where the edge may land, so the width drawn is the width the release commits. A timeline drawn to fit the window has no room past its own last frame, so while a tail is dragged the bed is drawn out to as far as that tail may go -- without it the last clip could be pulled in and never let back out.
✨ feat(colour): sliders are dragged and the graded frame is drawn over themAhmet Kaan Gümüş · 8d8d880
✨ feat(colour): sliders are dragged and the graded frame is drawn over them The colour card loses its stepper buttons: each row's bar is now pressed and pulled straight to a value, which is what a slider is for. The press takes the undo step and every sample after it is a live write (`set_color_live`), so a whole drag is one `z` rather than one per pixel -- and because a live write reseeks like any other edit, the picture regrades under the hand. Above the rows, an RGB histogram of the frame on screen: counted off the BGRA the decoder handed over, which is already through the grade, so pulling brightness tilts the graph as it moves. Every 253rd pixel of a 1080p frame (HIST_SAMPLES), 64 bins a channel, square-rooted so a flat black area does not draw the rest as a line. The arrow keys still move the same values, on the same 0.05 grid a drag snaps to, and the bar is 4 px to look at but a whole row to hit.
✨ feat(library): a right-click on a media row opens its own menuAhmet Kaan Gümüş · 97d941e
✨ feat(library): a right-click on a media row opens its own menu Add at playhead, Remove from library, Reveal in files and Properties, built like the clip menu down to the scrim and the clamp -- a click away or any stroke closes it. Remove goes through a new `Project::remove_source`, which refuses by name while clips still play from the file (the refusal names the lanes and how many clips each holds), keeps the last entry standing, and renumbers every clip that indexed past the one that went. It retires the undo stack: the history holds lanes alone, so a snapshot older than the removal could name a source that is gone -- the notice says so, and the ponytail names the upgrade path.
✨ feat(timeline): the last clip deletes and the timeline emptiesAhmet Kaan Gümüş · 9a6ef81
✨ feat(timeline): the last clip deletes and the timeline empties The never-empty-TIMELINE invariant is gone: an emptied timeline is now a state of the model, not an edge case a refusal kept unreachable. Emptiness is honest all the way down -- `PlaybackSession::span` is an `Option<Span>` whose `None` *is* the empty timeline, and `start_span` feeds it one black frame, so the viewer shows the nothing that is there rather than the last picture of the clip that was deleted. * `Project::lift` and `Project::ripple_delete` refuse only what is not an edit (a bad index, an empty range, a delete with nothing left to take -- the last so a no-op still costs no undo step); * `Project::from_parts` and the `.edith` loader take an all-empty project and refuse a *laneless* one instead, which is the invariant that was really being defended; * `without_orphan_sources` keeps source 0 when no clip names anything: it carries the frame rate the timeline counts in, and pruning it wrote a project that could not be loaded back; * the app's two "the timeline cannot be emptied" notices are gone, and an export of an empty timeline is refused by name instead of writing a file of no frames. The never-empty-CLIP invariant (len >= 1) is untouched.
✨ feat(timeline): clips drag from one track to anotherAhmet Kaan Gümüş · 28fe52d
✨ feat(timeline): clips drag from one track to another A clip already on the timeline is now a drag source, and a lane bed takes one: dropped on another lane of the same kind it moves there, keeping the timeline frames it covered, as a single undo step. Its group id travels with it, which desyncs nothing -- a link means "one span, however many lanes" and names no lane -- so a picture moved to V2 is still the take its sound belongs to. Refused by name rather than overwriting: a picture let go on an audio lane (and the other way round), and a landing that would touch a clip already there, which `place` would have painted over.
🐛 fix(engine,ui): paste respects lane kinds; bounds and rebind capture hardenedAhmet Kaan Gümüş · 11603ec
🐛 fix(engine,ui): paste respects lane kinds; bounds and rebind capture hardened Four bugs a hunter sweep found, each with the door it comes in through: - `Project::paste` put the clipboard clip in the first lane of *every* kind, so an audio-only clip copied off A1 landed on V1 too: a wav as a video source, a decode that fails, and a save the next open refuses. It now asks the source what it is, the same question `place_stream_at` asks an import, and reaches A1 only when there is no picture. - The `resolution` line was applied unbounded while the keystroke capped at 8K, so a crafted `resolution 4294967295 4294967295` panicked `open_black` with a capacity overflow. One bound now (`engine::is_resolution`) with both doors asking it, and the load door refuses by line like every other malformed line. - `open_room` shifted starts unbounded, and the file format permits a clip ending at the very last frame: a paste wrapped it round to the front of the lane -- a debug panic, or in release an overlap no reload accepts. The edit door refuses the paste that would push anything past `u32::MAX`; the load bound stays where it is, since the wrap was the edit's to prevent. - A rebind captured whatever gpui reported, so shift+= wrote `play +` and the next load threw the *whole* keybindings file away, losing every other rebind. Capture now takes only a chord the file can spell and read back, and a line the parser cannot use costs that line alone -- the magic line is the only thing that still refuses the file.
✨ feat(timeline): clips select from the keyboardAhmet Kaan Gümüş · cc90921
✨ feat(timeline): clips select from the keyboard tab selects the clip under the playhead -- again for the next lane's -- and [ / ] walk the selection along its own lane, wrapping at both ends. shift+tab stays unspellable (a chord carries only ctrl and parse refuses an uppercase key), so the brackets are the pair. One selection and not a second: every door -- click, right-click, all three keys -- goes through Player::select, so the group-scoped tint a click draws is the tint a key draws. Project::lane_clip_at is what the walk asks, per lane, rather than the UI re-deriving where a clip ends. This is what makes delete, lift, the equalizer and the grade reachable with no pointer at all: the equalizer card had never been rendered live, because nothing but a click could select the audio clip it needs.
✨ feat(engine): project resolution stands apart from media resolutionAhmet Kaan Gümüş · 19e294a
✨ feat(engine): project resolution stands apart from media resolution A timeline had one resolution because its first source did: import refused anything else by name, and there was nowhere to say otherwise. A project now carries its own picture size and every clip is composed onto it, so media of different resolutions share a timeline the way they do in any editor. * scale::Composer is the one definition of that composition -- fit_rect, scale_i420, compose_i420 onto a black canvas -- and both playback and export call it, so what is written is what was watched. A canvas of the picture's own size is a pass-through that allocates nothing and touches no byte. * Grade first, place second: a grade belongs to the clip's pixels at the resolution they were shot at, and the letterbox bars are not the clip. * Per-clip fit policy (fit/fill/stretch/centre), one byte inline in Clip -- it lands in padding the clip already had. * .edith v7: a `resolution <w> <h>` line and a fit word per clip line. v6..v1 still load, defaulting to source 0's picture and Fit, which is what those projects always meant. * The fps refusal stays: mixing frame rates is resampling the timeline, a different problem, and a refusal is the honest answer until it is solved. * UI: `p` cycles the fit policy of the clip on screen (and a clip-menu item), ctrl+r cycles the project resolution through the usual sizes with the media's own among them, and the export card says which size it writes.
✨ feat(video): per-clip color grade is live in render and exportAhmet Kaan Gümüş · bd89527
✨ feat(video): per-clip color grade is live in render and export The grade a clip carries now reaches the picture. `Project::composite_clip_at` names the clip the composite shows at a frame and `composite_color_at` its grade, so playback's decode worker (folded into `i420_to_bgra_with`, free in the loop that was reading those samples anyway) and the export's encoder (onto per-span scratch, since the planes are borrowed) grade from one answer. `PlaybackSession::set_color` is an edit like any other, so it reseeks -- which is what repaints the frame already on screen, paused or playing. The card: `k` (or the clip menu's Colour…) opens four sliders on the selected video clip, or on the clip under the playhead when nothing is selected, so it is reachable with no pointer at all. Arrows pick and move a slider, r resets, esc closes; a slider walked back to the middle takes the grade off, which keeps an ungraded project byte-identical -- verified: the same two-clip export before and after this slice is md5 98522c19cefac2f7851b51de6416a493 both times.
✨ feat(audio): per-clip equalizer is live in playback and exportAhmet Kaan Gümüş · 4d92155
✨ feat(audio): per-clip equalizer is live in playback and export The model, the format and the filter have all existed with no callers. This wires them: `Project::audio_eqs_from` hands one curve per segment beside the play list `audio_segments_from` already builds, `open_mixed_streams_eq` gives each lane's worker those curves, and `emit` -- the one place both readers hand their samples over -- filters a segment after it is trimmed and before it is sent. Playback and an audio export therefore get the same filtered stream by construction rather than by two call sites agreeing. A parallel list, not a fourth element of the segment tuple: that tuple is what every opener, the packet-copy path and a dozen tests speak, and an effect is not part of which samples a segment names. A short list plays flat, so a mismatch can neither panic nor shift a curve onto the wrong clip. Live editing needs no channel into a running worker: `set_eq` is an edit and every edit reseeks, so the workers are rebuilt from the new curves where the playhead is standing. An mp4 export copies AAC packets and no filter can reach a copy, so an equalized clip is refused by name and by timecode rather than written flat. The card is the third of its kind (same scrim, width and rows as keys and export): a row per band, dragged from the middle out, with `q` to open it and 1-5 / up / down / r as its own keyboard, every one of them listed in the keys menu by the registry the guard test reads.
✨ feat(timeline): every lane draws and tracks can be addedAhmet Kaan Gümüş · 30e8aae
✨ feat(timeline): every lane draws and tracks can be added The panel drew V1 and A1 and nothing else, so the N-lane model, the composite playback and the v6 format had no way into the window. It now draws a row per project lane, labelled from Lane::label, and grows the panel per row up to a cap past which the lane column scrolls. + V / + A -- and the v / a chords, in the registry so the keys menu lists them -- add a track; undo takes one back like any other edit. The V1/A1 pinning the last two slices flagged is gone: delete_clip takes the lane its index belongs to (Project::delete_in), a drop names the lane it was let go over (place_stream_at's onto), and whole_take decides ripple-or-lift per lane -- a clip on an added track is a layer and is lifted, while the first pair keeps exactly the semantics it had. Project::paste now inserts into V1/A1 only while still opening room everywhere, or an Add with three lanes would have played one sound twice. The export card greys MP4 out with its reason when more than one audio lane carries sound, on the row and on the m chord both, so the engine's refusal arrives before a destination is picked.
✨ feat(engine): per-clip color persists in .edith v6Ahmet Kaan Gümüş · 0530fc9
✨ feat(engine): per-clip color persists in .edith v6 A clip names a colour grade the way it names an equalizer: an index into an append-only Project table, deduped on set, pruned at save, inherited by both halves of a split and carried by copy, paste and undo. The file format grows a color <b>:<c>:<s>:<t> line and a 7th clip field; v5..v1 still load and every one of them re-saves as v6. Clip grew from 32 to 40 bytes -- the eq index fit the padding hole, the colour one did not.
✨ feat(engine): N-lane compositing in playback and exportAhmet Kaan Gümüş · 08af6bc
✨ feat(engine): N-lane compositing in playback and export Video: the topmost video lane with a clip there wins, topmost being the last lane in display order (V2 over V1, the overlay convention). No blending, so exactly one lane is visible per frame and the composite is itself a span list -- Project::composite_span_at -- which one decoder plays. N video lanes never mean N decoders; a lane change costs the one decoder reopen a cut already costs. Audio: every audio lane that holds something gets a play list (Project::audio_segments_from) and AudioSession::open_mixed_streams sums them, clamped, each lane keeping its own gap rule so the master clock counts a sample per sample of timeline. One lane skips the mixer entirely and is the byte-for- byte path it always was. Export walks the same composite and mixes the same lanes for WAV/FLAC. The mp4 path copies AAC packets and cannot mix, so a timeline whose sound is spread over two lanes is refused there by name rather than silently exported without half of it.
✨ feat(engine): per-clip EQ persists in .edith v5Ahmet Kaan Gümüş · 782fc53
✨ feat(engine): per-clip EQ persists in .edith v5
A clip names its equalizer by index into a project-level table, the way it
already names its source: `Clip` stays `Copy`, so a split hands both halves the
same settings, a clipboard copy carries them and an undo restores whichever
index the clip had. The table is append-only within a session -- an index on a
clipboard clip or in an undo snapshot can never dangle -- and only a save prunes
it, exactly as an undone import leaves its source entry behind.
The file grows `eq <band>...` lines (freq:gain:q:shape, printed `{:?}` so every
f32 comes back bit for bit) and one more clip field naming one of them. v4, v3,
v2 and v1 still load and re-save as v5.♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..AnAhmet Kaan Gümüş · b474a9b
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..An Merge of the multi-lane winner (candidate B) onto the S5a main, plus the three grafts the judge picked out of candidate A and the delete-selected fix it flagged: * LaneData::two_lanes(), one place for the pair single() and from_parts() both build; * a_group_may_span_any_lane: hand-built lanes driving links_are_consistent directly -- one take on V1 + A2 with the lanes between it empty is legal, and both ways to break the rule are asserted by their exact message; * add_lane doc: an empty new lane is legal even though from_parts refuses an all-empty project -- the lanes that were there still hold the timeline; * delete_selected is exhaustive over lane.kind and explicit about ord: it hands V1/A1 indexes to engine calls that mean V1/A1, so a second-lane selection would have deleted a different clip under a _ => false wildcard. Conflicts, all against the S5a Source model: without_orphan_sources keeps B's crate::Result and its >1-lane-per-kind refusal but returns Vec<Source>, and Lane::Audio in place_stream_at/import_audio became Lane::A1.
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..AnAhmet Kaan Gümüş · 154fd69
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..An
The edit list was a fixed pair -- `Lane` {Video, Audio}, `lanes: [Vec<Clip>; 2]`
and seven hundred lines of methods walking that pair by hand. Multi-lane UI,
per-lane compositing and per-clip EQ all want lanes to be a list, so make them
one now, while the model is small enough to change in one sitting.
`Lane` becomes a handle -- a `LaneKind` plus a 0-based `ord`, so `Lane::V1` is
the first video lane and `Lane::new(Audio, 1)` is A2 -- and the project stores
`Vec<LaneData>`, a struct that per-lane state (mute, compositing mode, a name)
can grow into. A handle naming a lane that is not there reads as an empty lane
and refuses every mutation, so a front-end that only ever asks for V1/A1 needs
no bounds check of its own. Every method is a walk over the lane list now
instead of two hand-written cases.
The grouping rule generalises rather than pairing lanes off: a link id names at
most one clip per lane and every clip carrying it covers the same span, on
however many lanes. So a split hands out one id per group of lanes whose halves
line up -- one helper, used by split and regroup alike.
Playback, export and the audio worker still read V1 and A1: compositing is its
own slice. So is the file format, which holds one lane keyword per kind, so a
save of more than two lanes is refused by name instead of silently dropping
one; a two-lane project writes exactly the bytes it always did.✨ feat(library): every audio stream is a row, and the picked one plays and exportsAhmet Kaan Gümüş · ecb5e06
✨ feat(library): every audio stream is a row, and the picked one plays and exports A file with one audio track per language is one row per track now, not one row per file. The engine carries the pick end to end: a source is a (file, audio stream) pair, .edith v3 writes the stream on the source line, playback opens it and — the trap this closes — the export copies *that* stream's packets rather than always stream 0. Streams that cannot go on the timeline are listed greyed with the reason instead of hidden: a codec we cannot read, or a rate/layout that cannot share one output device and one copied AAC track with the rest of the timeline (there is no resampler here and no AAC encoder to write a join with). place_stream_at is the one door a row goes through, and it refuses those in the engine's own words. - v2 and v1 files still load: no stream field means stream 0, which is all those dialects could play; saving either writes v3. - Waveform peaks are keyed by file *and* stream, so two tracks of one file cannot draw each other's envelope. - Library swatches and clip tints follow the *file*, so a file's streams share one colour in the panel and on the lanes. - assets/test_multilang.mp4: two AAC 44.1k stereo streams (und, fra), the shape real multi-language media has and the one where a second stream is placeable.
🐛 fix(engine): group ids only where the lanes agree, priming for a leading gapAhmet Kaan Gümüş · 07cd3d3
🐛 fix(engine): group ids only where the lanes agree, priming for a leading gap Two states the verifier panel reached that saved but would not load again. `split` and `regroup` handed one fresh id to whichever clip each lane had at that frame, but the lanes are edited apart: the clip being cut may start or end somewhere else in the other lane, and a group id whose two clips disagree about their span is not one take. Each side of the cut now asks the question separately, so the halves that do line up stay one take and the ones that do not get ids of their own. The exported audio of a timeline that opens on a hole played every sound after the hole 23 ms early: a reader drops the first packet of an AAC track as priming, and with no packet to spare that drop came out of the hole. The gap at the head now carries one extra silent packet, which owes the rounding debt nothing. Tests: both panel repros, a seeded random-op sweep that reloads the project after every edit, and the leading-gap onset measured off the exported file (44032 of an expected 44100; 43008 without the packet).
✨ feat(engine): real silent AAC for export gaps, link + overflow guardsAhmet Kaan Gümüş · 301e29b
✨ feat(engine): real silent AAC for export gaps, link + overflow guards Grafts the losing candidate's hand-written AAC-LC silence into the offset-placed lanes: a gap in the audio lane is copied as max_sfb=0 access units (4 bytes mono, 7 stereo, verified against our own decoder) instead of being spent as stts duration on the packet in front of it. That retires the 23 ms leading-gap misplacement, so every packet is one 1024-frame sample table entry again and the muxer takes no duration. from_parts becomes the release-active untrusted door it claims to be: per-cause errors, an end-overflow bound, and the grouping rules -- a link id names at most one clip per lane, and a pair covers one span. The parser bounds the same overflow by line number, `place` strips the incoming group id, and the two lane surgeries (`clear`, `open_room`) drop the id from what they cut, which is where duplicates came from.
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2Ahmet Kaan Gümüş · 59eb78e
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2 Project gains two lanes; a Clip now carries `start` (its timeline placement) and `link` (group id), so a gap is simply the absence of a placement rather than an object anyone has to keep in sync. Moves and trims become arithmetic on start/in_frame; the lane invariant (sorted, non-overlapping) is checked in from_parts, at the .edith parser, and asserted after every mutation. split cuts every lane and hands the two sides fresh group ids; regroup is its exact inverse. delete still ripples both lanes (the app keeps its behaviour), lift removes one placement and leaves a hole, place is the per-lane overwrite that can make one. A video gap plays as black frames from a worker that opens no file -- same channel, backpressure, cancel and retire path as a decoder -- and exports as encoded black. An audio gap is synthesised zero chunks, real ones, so the master clock keeps counting through it; on the export side it is spent as stts duration on the packet beside it, since there is no AAC encoder to make silence with. .edith v2 writes one line per placement per lane; v1 files still load, as fully-grouped gapless lanes, and save as v2.
2026-08-09
✨ feat(engine): .veproj save/load — relocatable, validated, atomicAhmet Kaan Gümüş · ac60b80
✨ feat(engine): .veproj save/load — relocatable, validated, atomic A project file is line-based text: `veproj 1`, an optional playhead, one `source` line per file and one `clip` line per range. Text because a path is bytes on this platform and a JSON string could not carry one losslessly, so the path field is byte-escaped instead; paths under the project's own directory are written relative to it, which makes a folder of media plus its .veproj movable anywhere. The parser is strict and every refusal names its 1-based line, and writing goes through .part + rename as an export does. Loading is a new session, never a mutation of the old one: source 0 defines the timeline, every other source passes the same checks import applies (in the same words), and every clip has to still fit inside the file it plays from -- a source that vanished or shrank is a refusal that names it, not a silently shorter timeline. Sources no clip plays from are pruned at save, so an import that was undone cannot leave a file behind that blocks a future load.