Commits
Commits on
cc667e6819d96fdfa32fc2debfcf76352e10da4cFiltered to crates/engine/src/playback.rsClear filter2026-08-11
✨ feat(colorspace): a file says which matrix and curve its numbers are in, and edith reads itAhmet Kaan Gümüş · 070ffe6
✨ feat(colorspace): a file says which matrix and curve its numbers are in, and edith reads it Three tiers, per field: the container's own tags (Matroska `Colour`, mp4 `colr`), then the bitstream's (H.264/HEVC SPS VUI, AV1 `color_config`), then the ffmpeg/mpv resolution rule -- 720 lines or taller is BT.709, below it BT.601, limited either way. A code that says nothing, or says something with no implementation here, falls to the next tier rather than answering wrongly. `VideoMeta` carries the answer; nothing consumes it yet. Everything still renders through the hardcoded BT.601 it always did, which is the bug this is the foundation for fixing. The bit-level walks are where this can quietly go wrong: an SPS whose scaling lists are counted wrongly lands the VUI read in the middle of a coefficient. Both are measured -- H.264 and HEVC against hand-built parameter sets (no encoder here writes SPS scaling lists), the rest against fixtures tagged in the container, tagged only in the bitstream, and tagged nowhere, plus the two real films: a 4K HDR remux that reads BT.2020/PQ and a fully untagged 720p one that reads BT.709.
🐛 fix(timeline): a dropped row lands where the hand let it go, not after the last clipAhmet Kaan Gümüş · 0d1c2c1
🐛 fix(timeline): a dropped row lands where the hand let it go, not after the last clip
A library row dragged onto the open bed past the last clip was appended to
the end of the timeline wherever it was released: the ghost promised one
frame and the release committed another.
`Project::paste` clamped the frame it was asked for to `timeline_frames()`
-- the clipboard's rule ("put it here", never "here with black in front"),
imposed on every caller of the primitive. A drop names a place on the bed
and means it, and `Project::place` (the audio/further-lane half of the same
drop) already honoured one, so V1 was the odd lane out.
The clamp moves to the clipboard's own door, `PlaybackSession::paste_at`,
and the grouped branch of `place_stream_at` goes to `Project::paste`
directly with the frame the pointer named. Nothing else changes: a paste at
the playhead cannot be past the end anyway.
Pinned by `a_row_dropped_on_the_open_bed_lands_under_the_pointer`, which
walks the release's own chain -- `landing` as `place_frame` composes it,
the frame back through the rate as `insert_source` hands it over, and the
one engine door a row goes through -- and lands frame 300 where it used to
land 150.🐛 fix(subs+eos): the plate reads the map the file is written from, and a knob past the end leaves the end aloneAhmet Kaan Gümüş · 2bee9c3
🐛 fix(subs+eos): the plate reads the map the file is written from, and a knob past the end leaves the end alone The overlay and the timeline strip drew every subtitle track on the raw timeline clock while the export carried an embedded track through the cuts (export::timeline_cues), so a rippled timeline previewed one thing and wrote another. Both now ask that one map through PlaybackSession::timeline_cues -- preview and file agree by construction, and a standalone .srt keeps the timeline clock it always had. And the end of stream: is_eos promised that "any edit after the end revives the session", which a sound-only edit never did. The transport's own model says it should not -- eos means the picture worker ran out, reseek_audio starts no picture worker, and reviving on an EQ tweak would spend the Ended state that makes the next press restart from the top. The doc now states that rule and a test pins it.
🔀 merge(D2): edits invalidate what they dirty and nothing more — color drags stay audible, the clock anchors on real soundAhmet Kaan Gümüş · 874f762Browse files
Merge remote-tracking branch 'origin/main' into worktree-agent-a70e2dff6f1316489Ahmet Kaan Gümüş · 288629aBrowse files
✨ feat(export): the subtitles leave with the fileAhmet Kaan Gümüş · df92458
✨ feat(export): the subtitles leave with the file A Matroska export now carries the picked subtitle track as S_TEXT/UTF8: a TrackEntry beside the picture and the sound, and one BlockGroup per cue — Block plus BlockDuration, because a SimpleBlock has nowhere to say when a line goes away. Interleaved into the clusters as the AAC packets are, so a player has the cue by the time it needs it. The cues are put on the exported timeline first. A track that came out of a media file is timed against that file, so it is carried through the spans that still play it: a cue over a stretch that was cut out is gone, one straddling the cut keeps the half that is still there, and everything after a rippled delete moves back with the picture it belongs to. A standalone .srt has no clip to hang on and no offset to shift by, so it stays on the timeline's own clock — the one the overlay drew it at — clipped to the exported length. A cue nothing clipped keeps its own microseconds, so an untouched timeline exports the times the source states, to the millisecond the file is written in. An mp4 says so instead of pretending: tx3g is a different beast and nothing here writes one, so the export card carries a Subtitles row that reads "test_subs.srt → embedded", "mkv only — an mp4 carries none" or "none" before the button is pressed. Exports without a picked track are the files they always were: the track entry and the blocks are written only when there is one.
🔀 merge(C6): the frame rate is picked, and the whole edit list conforms to it exactlyAhmet Kaan Gümüş · 3a1b47dBrowse files
✨ feat(rate): the project frame rate is a list to pick fromAhmet Kaan Gümüş · d2e25cc
✨ feat(rate): the project frame rate is a list to pick from The panel could only ever read the rate out. Now it opens the rates the way the resolution button opens the sizes -- 23.976 through 60 with the media's own cycled in and the one in force marked -- and picking one conforms the whole timeline to it. PlaybackSession::set_frame_rate maps every frame number on every lane through one Rate (Project::retime), so a take keeps its seconds, its footage and its sync while being counted on the new grid; every source is re-read through a Rate against it and an export comes out at it. The v9 fps line now governs a video-scaffolded project too, so a project cut at 24 reopens at 24 instead of at the media's 30 with every clip number still counted in 24ths.
✨ feat(engine): an edit rebuilds what it dirtied, and nothing elseAhmet Kaan Gümüş · c2e62a3
✨ feat(engine): an edit rebuilds what it dirtied, and nothing else Every param change went through one funnel -- edit() -> seek() -- which flushed the audio ring, reopened every track, respawned the feeder and rebuilt the video decoder. Dragging a colour slider therefore cut the sound ~40 times across one gesture, and every restart re-anchored the clock onto an empty ring, so the silence of the restart was counted as timeline time: a permanent A/V offset, re-rolled by every edit made while playing (the resolution-change desync). Edits are classified by what they dirty now. A grade, a fit policy and the project resolution rebuild the picture where it stands and never touch a sample. An equalizer rebuilds the sound and never touches the picture. A fader and the master ceiling rebuild nothing at all: they live at the mix sum, so the running mixer picks them up between two blocks (MixControls), and the limiter is retuned rather than restarted so its delay line -- and the sample count the master clock is made of -- keeps running. Only a structural edit still reseeks both halves. And a restart no longer costs an offset: the feeder stamps the device position its first real sample was queued at, and the clock anchors there instead of on the first poll after the seek, so the silence before the content is never timeline time. Also: a span whose source will not open no longer presents the old channel's frames under the new mapping, and the feeder stops parking 10 ms on a ring that is merely waiting out a flush.
🔀 merge: origin/main into E1, and the Sound row becomes a choice listAhmet Kaan Gümüş · 3992bff
🔀 merge: origin/main into E1, and the Sound row becomes a choice list Conflicts were the three the coordinator called: keymap's FIXED count (union of my `b` and C5's 26, so 27), the tests' use-list in main.rs (theirs plus AUDIO_KBPS, DEFAULT_AUDIO_KBPS, next_audio_kbps) and two tests added at the same line of audio_export.rs (both kept). Four rates is one more than a button may be clicked round, so the Sound row opens C2's picker (`Pick::AudioRate` over `AUDIO_KBPS`, rows naming what each rate buys) instead of stepping under the pointer. `b` still steps, the way ctrl+r still steps the resolution the same list offers -- and a list open over the card is what the first stroke closes, so escape cannot take the card out from under it.
🔀 merge(A5): main (b10235a) into the import-policy branchAhmet Kaan Gümüş · 685d4e6
🔀 merge(A5): main (b10235a) into the import-policy branch Clean: A1's Track::open rework routes codecs (MkvAc3Track before symphonia) and A5 handles absent tracks -- the two compose, and git merged them without touching either. C1's main.rs churn moved the refusal test's neighbourhood, not the test.
🔀 merge(D1): the transport tells the truth at the end — one state machine, and the clock stops where the timeline doesAhmet Kaan Gümüş · d9fd7cfBrowse files
🔀 merge(A5): main (dfd4ffe) into the import-policy branchAhmet Kaan Gümüş · cbb0f62
🔀 merge(A5): main (dfd4ffe) into the import-policy branch No conflicts: A6's waveform/demux work and the subtitle lane do not touch the import gate.
🔀 merge(A5): main (de15818) into the import-policy branchAhmet Kaan Gümüş · d17f345
🔀 merge(A5): main (de15818) into the import-policy branch The rate gate main landed (`Rate`) and this branch's codec gate removal are the same function: `matches_timeline` keeps main's `Rate` return and loses the codec equality, with the decoder probe in its place. The refusal tests that named a rate or a silence now name the one thing left -- one output device, one rate and one layout.
✨ feat(export): the sound has a bitrate you pick, in every file that codes oneAhmet Kaan Gümüş · 2169fb8
✨ feat(export): the sound has a bitrate you pick, in every file that codes one The rate was 256 kbps in two places nobody could reach: the AAC a video export re-encodes and the MP3 the audio row writes. Both now take `ExportSettings::audio_kbps` -- 128, 192, 256 or 320 -- and `None` is still 256, so an export nobody touched writes the bytes it always did. The card grows a Sound row on `b`, cycling like the container row. It dims with the reason where there is no rate to pick: no sound on the timeline, a lossless format (WAV, FLAC code samples and not a rate), or an AAC track that is copied packet for packet and carries its source's. The MP3 quality refusal stopped claiming a fixed 256 kbps, since the Sound row can now change it under the summary. Probed rather than promised: an mp3's frame headers declare 128/256/320 as asked, and an mp4's AAC track measures within a fifth of the request.
✨ feat(engine): subtitles come in with the film or beside itAhmet Kaan Gümüş · f4b5fd8
✨ feat(engine): subtitles come in with the film or beside it A subtitle track was a track this engine walked past: the Matroska track walk kept video and audio and dropped type 0x11, and a `.srt` next to the media was a file with no door. Now both arrive as the same thing -- a list of timed cues -- and a project keeps them. `subtitle`: the cue model plus the two ways in. Standalone `.srt`, `.vtt` and `.ass`/`.ssa` go through `oxideav-subtitle` and `oxideav-ass` rather than through a fresh parser here; an embedded track carries its timing on the block and its text in it, so each codec is put back into the shape its own parser reads -- which is what makes an embedded track and the file it was muxed from come back as the same cues. What cannot be read is refused by name and still listed: the four PGS tracks of a BluRay remux are four rows saying they are pictures, not an empty list and not a file that would not open. A `.srt` that has gone missing since the save is the same story, and a re-save keeps its row. `.edith` 10 writes `subtitle <track> <path>` -- the reference only, the cues stay in the file they came from. v9 and every older dialect load as the projects with no subtitles that they are.
🔀 merge(D1): origin/main into the transport state machineAhmet Kaan Gümüş · 33f72b4
🔀 merge(D1): origin/main into the transport state machine Five conflicts, all in main.rs and all the same shape -- main moved the transport's neighbours while this branch replaced what they read: - toggle_or_restart: main's empty-timeline guard (nothing_to_play -> notice, and pause if it is playing) kept ahead of the state machine, since an empty timeline is Ended from its first black frame and would otherwise restart a clock against nothing. - playhead(): main extracted the clamp into its own method; it now asks the transport instead of the deleted done flag. - panel(): main's zoomed view, its resolution button, its "put a clip on a lane first" tooltip and its enablement rule all kept, reading state.is_playing(). - live_decode(position, playing) takes state.is_playing(). - close_session: the two flag resets are gone with the flags -- no session is Stopped. - tests: both import lists folded, Transport and transport added.
✨ fix(transport): the clock stops where the timeline doesAhmet Kaan Gümüş · d93bb5f
✨ fix(transport): the clock stops where the timeline does At EOF nothing stopped the clock: wall time took over and `now()` walked off the end of the timeline for as long as the window stayed open (measured live: a 5 s timeline recognised its end with the clock at 17.5 s under a slow renderer). The playhead is what a cut, a paste, an insert and the analyser all act at, so every one of them was aiming into empty space. `PlaybackSession::halt_at_end` pauses and puts the clock on the out point -- where the timecode and the playhead have been showing it all along -- and leaves end of stream set, so the transport still reads Ended and the next press still restarts from the top.
✨ feat(import): mixed codecs and silent takes join the timelineAhmet Kaan Gümüş · 9bc3bd4
✨ feat(import): mixed codecs and silent takes join the timeline The two refusals a user hits for no reason are gone: a file coded differently opens its own decoder like every clip already does, and a file with no audio track contributes silence over its span like a gap already does. What the codec gate was really protecting against stays, moved to the one place that can answer it: import asks the file for a decoder, so a machine without the VA-API plugin refuses an HEVC take by the decoder's own name rather than playing black frames with the complaint on stderr. Rate and layout stay refused -- there is no resampler. Both audio paths now read a source with no track as the silence they already synthesise for a hole: the worker plays it, the packet copy writes it, so an mp4 export of a timeline with a silent take is as long as the timeline and quiet where the take is.
✨ 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.
✨ feat(backends): the decoder and the encoder say which one is runningAhmet Kaan Gümüş · bdcc2fb
✨ feat(backends): the decoder and the encoder say which one is running A source names its decoder in the library row before anything plays, the transport line names the running one while it does, and the export card names the encoders it would open before the button — the progress line naming the ones it did. Every answer is measured, never promised: `decode::probe` picks a seat by the very rules `open_worker` picks one, the worker publishes what it actually opened (so a hardware session that falls back to software says so), and `export::planned_video` opens the very VA-API encoder the export would and closes it again. `hw_seat` is now the single place that choice is made, so a card and a running job cannot drift apart.
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(export): an equalized mp4 re-encodes the sound the copy could not carryAhmet Kaan Gümüş · 33f7a15Browse files
Merge branch 'main' into worktree-agent-a46e3271de2d17ff3Ahmet Kaan Gümüş · 700a973
Merge branch 'main' into worktree-agent-a46e3271de2d17ff3 # Conflicts: # crates/app/src/keymap.rs # crates/app/src/main.rs
✨ 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".
✨ 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.
✨ feat(timeline): still images import and place as clipsAhmet Kaan Gümüş · 30d430d
✨ feat(timeline): still images import and place as clips A PNG, JPEG or WebP is a source like any other: it imports into the library, drags onto a video lane, shows at the playhead, trims, saves and exports. `engine::is_image` is the door, beside `is_audio`, and every choice it forces is made in one place. The decisions, spelled out: - Extensions: png, jpg, jpeg, webp -- exactly what the `image` crate is built with here. Anything else is refused by the door that refuses a .txt. - Length: an image has none, so it is *held to* ten minutes (600 s at the timeline's rate) and *placed* at five seconds. The cap is finite on purpose -- a u32::MAX sentinel would hand a trim drag a wall past anything the timeline can hold -- and it is recomputed identically at load, so a clip trimmed out to it reopens. - Image-first project: its own picture is the canvas (a still *has* a resolution, unlike a song) at 30 fps, silent, one 5 s clip on V1. The A2 audio-only precedent for everything else. - Scaling: none of its own. The still is decoded once to I420 and goes through the same grade, the same `Composer` and the same conversion a decoded picture does, so a 640x360 image on a 1280x720 canvas is letterboxed by its fit policy and never stretched. - Lanes: the mirror of a song. A still goes on the video lane it was asked for or on V1, never on an audio one, and never as a grouped take -- a clip on A1 playing a PNG is a segment the audio worker cannot open. Hand-written projects are refused by name. - The timeline's audio parameters are now the first source that *could* have any, so an image as source 0 no longer holds every later import to its silence. Playback opens a still worker (one conversion, then a memcpy per frame, as the black-gap worker does); the export's `ClipDecoder` hands the same planes out for as long as the span runs, so a mixed video/still timeline encodes at the cut. tests: engine/tests/images.rs -- import registers only, placed pixels match the file's own (top/bottom bands catch a flip, RGB order catches a swap), trim walls at the cap, .edith round trip incl. the audio-lane refusal, mp4 export pixel-checked at the cut, audio-lane placement lands on V1. Fixture: scripts/gen_fixtures.sh writes assets/test_still.png.
🔀 merge(import): library-only import meets the library row menuAhmet Kaan Gümüş · b514187
🔀 merge(import): library-only import meets the library row menu The row menu (C3) and the source lengths this branch made native meet in one place: the card's Length line and its "plays in N clips" count now read the engine's own `file_frames` and walk `session.lanes()`, since the app's clips-derived length helper and its free `lane_clips` walker are gone. Two tests assumed an import that places: `removing_a_source_takes_its_frame_ count_with_it` and `removing_a_row_is_refused_while_it_plays_and_takes_the_ row_away` both need a take on the timeline to have something to refuse, so each drags its import onto the end first. New coverage: the audio fork of `open_library` -- a song as the first import into an empty window. Empty timeline over the 1920x1080@30 song canvas, the row at its own 90 frames, not undoable, a file it never took in refused by name, and the drag that follows plays it on A1 alone.
✨ feat(import): imported files land in the library, never on the timelineAhmet Kaan Gümüş · 5cb33d8
✨ feat(import): imported files land in the library, never on the timeline An import is not a decision about where a file plays. It registers a source, notes its native length and stops there; the timeline changes when the user drags the row onto a lane. - `PlaybackSession::import`/`import_audio` probe, check and register only, returning the source index. No clip, no reseek, and no undo step -- a library row changes nothing playable, so there is nothing for `z` to take back, and the notice no longer pretends otherwise. - `PlaybackSession::file_frames` is the native length of a file this session has taken in, so a row that has never been placed is placeable at its full length. `place_stream_at` takes it from there instead of a `frames` argument, and the app drops the clips-derived guesser that returned 0 for a source with no clips. - `PlaybackSession::open_library` is the first import into an empty window: the file's canvas, rate and clock over an empty timeline. - Doors: the Import button, a file dropped on the window and every argv argument after the first fill the library. A file *named first* at launch is an open, not an import, and still becomes the timeline. - Fixture + tests: a 25 fps H.264 file, refused by name at both video doors.
🔀 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(playback): audio-only sessions carry their frame count for trimAhmet Kaan Gümüş · a3e9dc2
🔀 merge(playback): audio-only sessions carry their frame count for trim The audio-only branch predates the trim feature's per-source counts; open_audio_only now feeds them like open does (verifier-prescribed seam fix).
🔀 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(audio): a song opens as a timeline of its ownAhmet Kaan Gümüş · eb9a278
✨ feat(audio): a song opens as a timeline of its own An audio file could not start a project: `PlaybackSession::open` refused every `is_audio` path because a timeline was scaffolded from source 0's *picture*. It now scaffolds the canvas instead -- 1080p at 30 fps H.264, the rate a later video import is held to -- takes its length from the audio, puts the one clip on `A1` and leaves the video lane empty, so the existing gap path plays it black while the song keeps the clock. `open_project` does the same when source 0 has no picture, so an audio-only `.edith` loads. An mp4 of such a timeline is refused by name in `export::start` (it would be black over the sound) and the export card says so on the MP4 row before a destination is picked; WAV and FLAC export as they always did. The Export button now re-asks that question too, since mp4 is the default and a timeline can lose its picture after the format was chosen.
✨ 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.