# SuperDoc Sessions: a document that performs the song

This musical Word editor uses SuperDoc 2.29.0. Lyrics, native tables, embedded original artwork, tracked formatting changes and occasional comments belong to the editable Word document. Surrounding vector and media choreography follows the recording clock.

The fit-width document is visible from the start. Its personalized CD opening disappears on Play. A compact branded music bar replaces the native full toolbar. Edit exposes public headless formatting commands, undo/redo, motion and timing settings. Cursor placement and typing do not pause music; paragraph following continues independently. Verse and chorus spacing is native paragraph formatting and survives DOCX export.

## Make a session

Paste a YouTube or Spotify track URL. Metadata research identifies the artist and recording; LRCLIB provides matching line timing. Ambiguous or unavailable matches need correction or an MP3 plus pasted lyrics. Spotify is a reference, with a separately selected YouTube recording. The default YouTube-link route imports public audio on the server with yt-dlp, then aligns the exact recording with OpenAI. Alternatively, a visible embedded player uses its actual clock. Restricted recordings may require another recording or an uploaded file. Native Spotify synchronization is not used.

MP3 upload sends the authorized recording and supplied lyrics through the server to OpenAI for transcription/alignment and researched creative direction. Timing caches and versioned creative caches are separate. Remix regenerates direction without retranscription, preserving human text and existing Word structures.

Each generated performance has 6–10 explicit set pieces and quieter passages. The renderer supports kinetic native typography, cue cards, original actors, spotlight, ink, paper transitions, collage, native images, contrast tables, tracked formatting reversals, sparse lyric-driven comments, and an uploaded-audio equalizer painted over stable native cells. Media assets preload and retain provenance and attribution. GIPHY is optional; open media and original vector fallback work without its key. GIF decoding depends on browser support.

## Featured arrangement and sources

Unwritten uses Josh’s supplied recording and lyric text, aligned to that file. It preserves the opening erasure, sunlight, native distance shrink, letter rain, book initials, tracked reversal and fresh-page reprise. Timing may be approximate during overlapping vocals. Human edits are protected from reveal replacement.

- [Session metadata and timed lyrics](/session.json)
- [Readable timed transcript](/session.md)
- [Executable featured composition](/composition.json)
- [Agent discovery index](/llms.txt)
- [SuperDoc editor documentation](https://docs.superdoc.dev/editor/quickstart)
- [LRCLIB API](https://lrclib.net/docs)
- [YouTube player requirements](https://developers.google.com/youtube/terms/required-minimum-functionality)
- [Spotify developer policy](https://developer.spotify.com/policy)

Server credentials, private timing caches, generated plans and reference transcripts are not publicly indexed or served as static assets. Word export is the actual edited DOCX. Browser tests and package inspection do not establish Microsoft Word rendering conformance. Live YouTube availability depends on the recording’s embedding rights and the browser environment.

## Updated playback and review surfaces

The comments/revision experience is now a custom, independently scrolling page rail outside native document zoom. It uses SuperDoc’s public headless subscriptions and actions. Adding/replying/resolving comments and accepting/rejecting tracked changes edits the real Word document. The page refits when the rail opens; there is no horizontal scrolling. Mobile uses a compact bottom rail.

Link creation defaults to server-side public audio import through the open-source yt-dlp 2026.10.26 runtime, then OpenAI alignment to that exact recording. Visible embedded YouTube remains an option. Imported audio stays in private R2 storage for seven days. The importer does not use YouTube account cookies or provider authentication. Private/restricted or blocked imports may need another recording or a user-supplied file. Spotify remains a track reference with separately chosen playback.

The current composition vocabulary uses one restrained lyric-triggered light, ink, paper, caption or table-linked treatment at a time, with quiet gaps and occasional native document jokes. The featured composition is recorded in [composition.json](/composition.json).

Creation starts with the prominent **New song** action. Playback choices are **Audio only** (server-side public audio import) and **Embedded video player**. Both retain the same real Word document and source-clock synchronization.


## Final pacing and timing

The personalized CD now inserts and spins before audio starts. Lyrics wait for the recording’s vocal cue, including its instrumental introduction. The corrected Dylan edition uses six restrained cue-card moments and a fixed native 22pt typescript, with quiet gaps, short dry asides and native table wordplay. Review opens on request rather than automatically during a song.

Timestamp validation and versioned caches prevent the old instrumental-intro timing from being reused. The verified Dylan recording opens at 8.96 seconds, corroborated by full-recording and intro-excerpt transcription. Other recordings receive their own alignment. Most lines use recording-specific timestamps; one uncertain line uses a calibrated catalog boundary, explicitly marked in the session’s timing report.

## Build this

The music bar code icon opens a compact implementation guide, following the SuperDocSend and investor portal pattern. It explains native DOCX capabilities, application visuals, headless controls and export, with public API links and a copyable agent brief. [Readable implementation guide](/BUILD.md). Selective typing uses short character bursts within supplied word timestamps. Optional native table equalizers use song colors and real audio levels in chosen windows; a native header table repeats across pages, while body placement keeps an accent near the current lyrics.

## Session DOCX round trip

Export writes versioned metadata through the native custom XML API in namespace `https://superdoc.dev/sessions/v1`. The file carries a stable Sessions ID, YouTube URL when present, exact composition, seed, palette, lyric timing, current playback position and native document target map. New song includes Open a saved session DOCX. Restore validates the payload and native paragraph identities, retains Word edits, and resumes the saved plan without retranscription or redirection. Audio bytes and credentials are excluded. Hosted audio can replay through the saved read capability for its remaining seven-day lifetime. After expiry, or for an old laptop-local export, select the same original recording or saved YouTube source. Metadata is application data, not an instruction to execute arbitrary code.

## Hosted architecture

The Cloudflare deployment uses a Worker, one Node container with two generation slots and a twenty-job waiting queue, a Durable Object coordinator and private R2 storage. Audio and private artifacts expire after seven days. Anonymous creation uses Turnstile, per-visitor/IP quotas and a $25 daily AI admission ledger with conservative reservations. The model key is a server-only runtime secret. Creation can be paused independently from playback and native editing. Public audio imports remain subject to the recording provider accepting the hosted request; embedded playback and MP3 upload remain available.
