feat(timeline): DAWproject linear-subset XML importer#6467
Merged
Conversation
Import the DAWproject interchange format's linear foundation — tracks, clips, tempo, and time signature — into the timeline model. Parses a project.xml document with pugixml (DOM only; the lib is -fno-exceptions) and assembles a Project via the model's public construction API, deduplicating audio assets by package path and deriving a provisional ContentHash from that path (the bytes live in the not-yet-unzipped container; unzip + the CLI import verb are follow-ups). The documented subset is beats-timed <Notes>/<Audio> clips on flat tracks with a single tempo and meter. Everything outside it fails closed with a descriptive error rather than a silent partial import. The importer lives in core/timeline/import/ rather than src/ because the web timeline-source-closure gate sweeps every core/timeline/src/*.cpp into the WAM/WebCLAP wasm DSP lanes, which do not link pulp-runtime; the importer's pugixml dependency has no place in the browser RT-DSP binary. The timeline and web-plugins skills record the constraint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Foundation of Phase-3 item #7 (DAWproject import): a DAWproject
project.xml→ timeline-model importer for a documented linear subset.import_dawproject_xml()parses the XML with pugixml (DOM traversal) and assembles aProjectthrough the timeline model's public construction API. It is a pure model consumer — no model-layout change.Documented subset (the DoD "documented subset loads")
<Project version="1.x">root<Transport>single<Tempo unit="bpm">+<TimeSignature>→ single-point tempo/meter maps at bar one<Structure><Track>elements (no nested group tracks)<Arrangement><Lanes timeUnit="beats">→ per-track<Lanes track><Clips><Clip time duration>with<Notes>or<Audio><File>contentBeats are quarter notes → canonical ticks via
kTicksPerQuarter. Audio clips reference a deduplicatedMediaAsset; its durableContentHashis provisionally derived from the package path (bytes live in the not-yet-unzipped container), with the path preserved as aPackageRelativeAssetLocatorhint.Fails closed — no silent drops
Anything outside the subset (
<Warps>, nested group tracks,timeUnit="seconds", unknown arrangement/lane timelines, missing required attributes, out-of-range note pitch/velocity, danglingtrackrefs, duplicate track ids) is rejected with a descriptiveDawProjectImportError, never partially imported.Where it lives — and why not
src/The importer is in
core/timeline/import/, notcore/timeline/src/. Theweb-timeline-source-closuregate sweeps everycore/timeline/src/*.cppinto the WAM/WebCLAP wasm DSP lanes, which deliberately do not linkpulp-runtime. The importer's pugixml dependency has no place in a browser RT-DSP binary, so keeping it out ofsrc/keeps pugixml out of wasm. Thetimelineandweb-pluginsskills record this constraint.Tests
test/test_timeline_dawproject_import.cpp(72 assertions, 4 cases):linear_subset.dawproject.xml→ import → assert track count/order, clip placements (ticks), asset dedup, notes, tempo/meter, sequence durationout_of_subset.dawproject.xml(a<Warps>clip) must be rejected, not imported as an empty clip<File>, unsupported arrangement timeline)Deferred (follow-ups, out of scope here)
.dawprojectZIP unwrap + real-byte content hashingpulp importCLI verb (tools/cli)🤖 Generated with Claude Code
https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
🔎 Provenance
claudem3/Volumes/Workshop/Code/pulp-dawprojectc66f4a64-25ea-42e5-b184-d48611a066a2Resume
Jump to this tab
Relaunch (any agent)
Restore URL — https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
stamped 2026-07-22 13:02 UTC