Skip to content

About

TiLiE, the TimeLineEditor: a browser editor and visualization tool for TimeToAlign! timelines

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TimeLineEditor (TiLiE)

TiLiE is a local browser editor and visualization tool for musical timelines represented by the Python timetoalign library. It edits a workspace, a canvas of blocks. A block places one manifest on the canvas: a TimeToShare manifest of the one shape every manifest has, holding root timelines (each with exact coordinates, child offsets, conversion maps, regions and flow control), optionally grouped into timeline groups, beside the measure maps its conversion maps read, and the statements that say what the manifest, its timelines and its regions stand for: works, recordings, editions, the people involved. A manifest knows nothing about where it is shown.

Status: alpha. The editor described below is in the source tree. The tilie-server release on PyPI predates it and serves only the application shell: it installs, serves the bundled editor on 127.0.0.1 with a fresh token for each run, and reports its health.

What works in the source tree:

  • Manifests and workspaces (core). Manifests of TimeToShare schema 0.2.0, the current version, with exact numbers:
    • validated load of any manifest in YAML or JSON, completed with every default it leaves out, and save in the complete or the minimal form, with or without its styling, in canonical YAML, pretty JSON or RFC 8785 JSON;
    • unknown keys kept and written back, and timelines of unknown length;
    • the statements of TimeToShare's description specification, property–value pairs with their provenance, on the manifest, its timelines and its regions, each element's set as a whole; a held manifest keeps of its JSON-LD @context only the prefixes it declares itself, and every file it is written to carries the full context;
    • element addresses, and the workspace view with its blocks, ids and order keys;
    • the four commands add, set, remove and style over addresses, under the library's invariants;
    • FlowMaps, the orders in which a root's stretches are played, and the virtual timelines that apply them, resolved exactly in the browser as timetoalign resolves them;
    • a store whose command journal gives undo and redo;
    • the workspace file <name>.tle.json (format version 8; older versions are refused, their manifests imported again), named by default after the workspace.
  • Drawing (layout, writers). Every manifest is drawn as one block opened by its title, a manifest without timelines as that block and title alone:
    • groups as frames, and each timeline as a root in a card; a member of several groups gets a card in each of their frames; the groups, then the ungrouped roots, then the placed virtual timelines follow one another in name order (a group's title or a timeline's name, else its ID), and the bundle's Timelines list follows the same order;
    • a member that is a child timeline drawn with the lines of its ancestors beside it, each on the side opposite to that ancestor's children band (below the member by default), which its timestamps' lines cross, and its root drawn whole as an ancestor card behind the group's frame, unless a style rule hides it;
    • elisions, stretches of a timeline left out of the drawing: every row crossing the stretch stops where it starts and resumes where it ends, at full scale on either side, with a narrow gap between that holds one ellipsis (three dots) centred in it (a stored elision's gap draws it however narrow it is) and, below it, the elision's name (its timeline's name where it has none; where the names of neighbouring gaps would run into each other, one moves a line down, never widening its gap); its ID, its elided coordinates and grey continuations of the rows across the gap are shown on request. An elision on a timeline in no group elides the cards that draw its root whole: an ungrouped root's card and its ancestor cards. An elision on a timeline that lies in a group elides that group's frame at one place in every member card, and the ancestor cards behind the frame carry its gap. A style rule on a root's cards chooses what they draw: Full (no elision), Custom (the stored elisions) or, on an ancestor card, Proportional, where the card elides by itself what lies outside its member, one gap for each stretch that the member's ancestors and their other children cover there, on the rows chosen, each such timeline keeping its start and end at full scale, at a proportion that by default fits the card into the view; by default a root's cards draw their stored elisions (Custom), so no ancestor card is shortened until Proportional is chosen;
    • arrangements, a block's groups and ungrouped timelines placed in an order instead of at their own places: Vertical, one under another, or Horizontal, side by side in one row, where every root that two or more groups hang on (one of their members lying inside that root) is drawn once behind the row, on lines one under another, several such roots side by side on one line where they fit, and each group stands where its first member inside the root lies on it, while a root only one group hangs on keeps its card behind that group's frame and moves with it. Along every such shared root the groups follow the row from left to right without overlapping (touching is allowed), and in every group those members lie in the order of their roots; where no row satisfies both, Horizontal is refused with the reason ("Theme A" and "Theme B" overlap on "Score" (8–16 ♩)) and the groups are drawn one under another. The root drawn once keeps, over each group, the scale of that group's frame, and changes it only between two groups: in a gap that leaves out what the room between their frames cannot show, or, where the two members touch or lie too close for a whole unit, at a seam, which leaves out nothing and across which the root's line runs on; past its outer groups it runs on at most 40 units, cut by a gap where it is longer, and it draws no elision of its own. An arrangement is placement, stored with the block, never in the manifest;
    • a timeline of unknown length scaled to its content and ending in three chevrons;
    • flow control drawn once per root, in the root's flow control band, for its whole tree: each repeat, segno, coda, dal segno, da capo and double or final barline as its music symbol, each jump's volta endings as a fork of arrows, one per ending with its passes, breaks, section breaks and barlines as lines (only a break red; a section break dark blue-grey and dashed, with its final barline symbol, a barline dark grey), each element's name and label by default, its ID too where a style rule asks; the arcs of the jumps hidden unless a style rule shows them; a member that is a child timeline showing its root's flow control on its own stretch, and hiding a root's flow control band hiding that of its whole tree;
    • regions in rows of their own, a child's included, atomic sections hidden unless a style rule shows them, and a label that does not fit beside its neighbour moved to a further tier, joined to its region by a thin leader line;
    • children whose band orders agree drawn in rows that lay out their bands together, each child keeping its row whatever the width of its labels, which the row's label tiers keep apart, with leader lines where they move;
    • named timestamps, each wedge turned about its tip by its rotation, and groupstamps, whose dashed line runs across every member card of their group's frame;
    • named MatchStamps, each alignment anchor a line between its two match timestamps, the MatchStamp's name at the middle one;
    • virtual timelines as cards of their own, in their groups' frames and wherever the block places them: the FlowMap's chunks laid end to end as the segments of the card's line, each labelled above the line by its source (a Region, a child timeline or another virtual timeline), a short tick where one chunk follows another, a gap as a grey stretch of the line, in the line's own width and dash, labelled with its length and drawn at least 32 units wide on a card the block holds, a chunk repeated n times in a row drawn once and labelled "× n"; each chunk's window shows what its source holds in the stretch it plays (children, regions, conversion maps, flow control, named timestamps), hidden by default, so a virtual card is first drawn stripped down to its line, chunks and own timestamps, until the band list's From the sources turns a band on; what a window shows is the source's own region, map or timestamp, so selecting it selects every drawing of it, and a window's region takes handles that move the source region; the card named after the timeline it is unfolded from (Allegro, default · unfolded from Allegro), and the elisions stored on a virtual timeline drawn on its placed card, or across the frame of each group holding it;
    • switched cards: a root's card, or a group's frame through one of its members, drawn on the axis of one of the root's FlowMaps instead of as written, keeping its bands: every region, child, timestamp, conversion map and flow-control element at each of its played positions, a jump's arc only where both its ends are played in one stretch, and no elision;
    • element descriptors, SVG and TikZ as the TimeToShare drawing specification defines them.
  • The canvas (arranger), built on Svelte Flow. Each completed gesture is one undoable command.
    • Blocks are dragged with snapping, reordered, selected and deleted, and so are timelines, groups and the other elements of a manifest, except segments, whose deletion is not supported yet, and flow-control elements, which are rejected with a belief instead.
    • A deletion that would also delete virtual timelines made from what it deletes asks first, naming them: Delete all, Hide instead (for virtual cards placed by the block, or for a single root, whose card then keeps its place undrawn) or Cancel; where they cannot all be deleted, the dialog says why and offers only Hide instead and Cancel.
    • A press on a box selects that box, a timeline's cards, a group's frame or the block; the card or frame under the pointer is highlighted, and so, in every view, is the band under it. A row name cut with … to its card's name width shows whole on an opaque box while the pointer lies on it; an export keeps the cut text.
    • Every block, frame and card is resized in the same three modes, Scale, Box and Stretch. A member's card is resized in the frame it is worked in, its size stated through that group. While a handle is dragged, the box follows the pointer at once and a block shows its last exact drawing stretched to it in Scale and Stretch, labels included (in Box at its own size); the exact drawing follows whenever the pointer rests, and the release stores the exact size.
    • A press on a gap, its ellipsis or its labels selects its elision. A selected stored elision shows a handle on each edge of its gap and, above it, a menu of two toggles in the resize modes' look, Coordinates (1) and Width (2), one or both pressed: dragging an edge with Coordinates moves the elided coordinate at that edge, snapping to the ends of the timeline and of its children, with Width it widens or narrows the gap, with both the gap swallows the line and what lies beyond the edge stays put. [ and ] choose the edge the arrow keys move by one grid step, and Delete removes the elision. An elision a card derives by itself is selected but not edited: choosing Custom stores it first. With Show coordinates on, a gap says what it leaves out. When elisions change, the card's elements slide sideways to their new places.
    • A selected region shows a handle at each end of its brace: dragging one moves the region's start or end, snapping to the ends of the timeline, of its children and of the other regions, with a flag showing the new stretch; the release is one undoable command.
  • Editors on the canvas. A double-click, a double tap, Enter or the Edit button in the Properties tab opens the editor of what is hit, by one rule in every view: a block's bundle editor, a group's from its frame, a timeline's from its line, its card or one of its bands, a timeline's children editor from its children band, and a root's flow-control editor from its flow control band or any flow-control element of its tree (below); a name, a label, a region or a stamp opens the editor of the card holding it; a chunk's label or boundary opens the flow-control editor of its FlowMap's root with that chunk's entry chosen; a region, a conversion map or a named timestamp a chunk's window shows opens the virtual card's own editor with that element selected, its edits changing the source and every drawing of it, and a child timeline a window shows opens the child's editor, where it is written. On a touch screen, a long press lists the editors under the finger in a menu.
    • Done, or a double-click outside the edited element, keeps the changes as one journal entry; Cancel discards them.
    • Undo takes back a closed editor's changes by runs: the consecutive changes made in that editor and not in one nested in it. In the open editor its own changes are undone one at a time. Redo re-applies what undo took back, step for step.
    • In a timeline editor, the edited timeline's bands (markers, conversion maps, children, regions and flow control, stacked above and below its line) are selected and moved by drag, or by Ctrl or Cmd and an up or down arrow. Each move is one command that sets the timeline's band order in its manifest.
    • In the timeline editor of a child, a read-only band below the child shows the flow control of its root's tree that lies on the child's stretch, as the root's band draws it, labelled "Flow control (from )". It is a view only: nothing in it is selected or moved, and it is no part of the drawing, its exports or the manifest.
    • The children editor, "Children of <timeline>", opened from a timeline's children band (also on top of its timeline editor), centres the view on that band and shows the inspector's Children tab, which lists the timeline's children with their offsets and lengths, a click selecting one; there a child is selected, deleted, set in the Properties tab, or opened by a double-click.
    • In the bundle editor, groups' frames and ungrouped timelines' cards are dragged freely while the block is not arranged. Dragging one that is in the selection moves everything selected by the same travel and keeps the selection.
    • Arranging. The Arrange button of the canvas toolbar opens a menu in the resize modes' look: on the arranger it arranges the blocks, Free (each at its own place), Vertical, Horizontal or Matrix, with its number of columns (− and +; at first the smallest number whose square holds the blocks), packed 32 units apart in the blocks' order from the top-left corner of all the blocks' own places, which reordering does not move; in a bundle editor it arranges the edited block's groups and ungrouped timelines, Free, Vertical or Horizontal, Horizontal disabled with its reason where they cannot stand side by side. While a level is arranged, nothing lies at a free place: dragging a block or an item shows the others at the places its drop would give them and the release stores the new order, and the arrow keys move the one selected block or item one place along the arrangement (in a Matrix, Up and Down one row). Side by side, a drop or a step that would put a group on the wrong side of another along a root is refused with the reason ("Recapitulation" stays right of "Exposition", "Development" on "Score"), and in a group's editor the cards anchoring the group on its roots cannot be dragged, and a drop that would change which member anchors it is refused (would anchor "coda" on "Score" instead of "Recapitulation"). Every choice, drop and step is one undoable command; Free puts everything back where its places state, which an arrangement keeps.
    • The flow-control editor. A double-click (or a double tap) on a root's flow control band or on one of the flow-control elements of its tree, on the arranger, in the bundle editor, in the editor of a group holding the root or in the root's timeline editor, or Enter on one of them selected, opens the editor of the root's flow control and FlowMaps, "Flow control of <root>" in the inspector's editing bar, whose Done keeps its changes and whose Cancel discards them; a double-click on the block closes it as Done does. Entering it shows the inspector's Flow control tab and moves the keyboard focus to it. There Add flow control adds repeats and endings (repeat start and end, first and second ending, volta brackets), jumps (da capo, dal segno, al fine, al coda, to coda, an ossia fork), signs (segno, coda, Fine, ossia), section breaks and barlines, and plain jumps, jump targets, breaks and barlines, on a timeline of the root's tree at a position typed or taken from the selection, each destination a jump needs chosen among the timeline's existing elements or created at a position of its own; the added elements are selected, one Add being one undoable step however many elements it adds, and the tab lists the tree's flow-control elements, a click selecting one. A selected flow-control element is renamed, believed or rejected, and its display toggled, in the Properties tab. The root's card stays as it is; under it a pane folds out with one row per FlowMap, computed ones first, each part sorted by name, a row keeping its place while the editor is open, each drawn to the card's scale as the virtual timeline it gives, so that a played stretch is as long as the written stretch it plays, its head naming its convention, whether it is canonical, how it was made and, with a server, how many findings its flow has, a long name cut with … and shown whole on hover. Opened by a double-click on a chunk, the pane shows that chunk's FlowMap: a row written by hand becomes the edited row, a computed one stays read only, and the chunk's entry is drawn selected and scrolled into view. Add + opens a new row with its own Done and Cancel. Drag into it a Region, a child timeline or the card's line itself (the whole root, which lands as a Region spanning it), a chunk of another row (it lands as its source) or a whole row by its name (it lands as the virtual timeline it gives); Shift-drag along the card's line sweeps a new Region that lands as a chunk; drag a chunk to reorder it, Alt-drag to duplicate it; + Gap adds a gap at once, as long as the row's last chunk plays (the root's whole length in an empty row), selected, with its length field open for an exact length in the timeline's unit; a click on a gap opens that field again, and the handle at a gap's right end drags its length, a flag showing it. Without a mouse, Insert and Enter add an entry of another row, Alt and the arrows move a chunk, D duplicates it and Delete removes it. The row's Done keeps the new FlowMap, its Cancel takes back everything done since Add +. A FlowMap written by hand is edited the same way after a click or Enter on its row; a computed one is read only, and Recompute (with a server) computes the root's flows from its flow control again, its atomic sections as Regions, the lengths of the virtual timelines playing them following. Drag a row out to make a card: a transparent copy of the row follows the pointer, more opaque the nearer its middle comes to the editor's border; released while its middle is still inside it flies back and nothing changes, released once its middle is beyond, the row's virtual timeline is written, named after the row, and its card stays where it was dropped, both one undoable step. "Place as card" puts the card at the height of its row, a little right of the root's card, so placed cards stand one under another, indented under the root once the editor closes. Over the pane the wheel pans the canvas as anywhere else, Ctrl or Cmd with the wheel zooms it, and rows wider than the room scroll by the pane's scrollbar.
    • Virtual cards. A virtual timeline's card is moved, resized and selected like any card. Hovering one of its chunks (its label, its stretch of the line or the space between them), or selecting its label, draws blue ribbons from the chunk to the stretch it plays on the root's lines and outlines the other chunks of the same source; hovering a written stretch on a line of the root draws the ribbons of every chunk that plays it at once; with Show coordinates on, the flag on a virtual card says which written position the hovered one plays and which occurrence it is, and on a root's line where each virtual card plays it. Delete on a selected virtual card placed by the block hides the card and keeps the virtual timeline; "Delete virtual timeline" in its Properties tab deletes it, leaving its FlowMap; the bundle's Timelines list shows a hidden card again. A selected chunk's Properties tab lists its entry of the FlowMap, its source, where it is written and played, and its occurrence. Its elisions are set in the Elisions tab as an ungrouped timeline's are. A selected root's card shows a Flow list beside its Scale, Box and Stretch menu, in one toolbar: "As written" and each of the root's FlowMaps once; choosing one switches the card onto that flow, its chunks moving from where they are written to where they are played, and "As written" switches it back, each choice one style rule in the manifest, so an export draws what the canvas shows. A group's frame shows no Flow list.
  • The editor (editor). One component that the page served by tilie uses, and that any other page can mount with pnpm build:embed's tilie.js (embedding). Among its options, storage.userKey and storage.profilesKey name the localStorage keys of the user and of the type profiles (the page served by tilie uses tilie.user and tilie.profiles; without a key nothing is stored), and lookup: false turns every lookup request off.
    • A header with a File menu (New workspace, Open…, Open folder…, Save, Save as…, Import manifest…, Export manifest…, Export package…, Your name…, Type profiles…), an Examples menu that adds one of four example manifests from TimeToShare as a new block or opens the example workspace "Timestamps" in place of the open one (asking first to save or discard unsaved changes), the workspace's name, renamed in place by a click on it, and an About button, the canvas, and an inspector drawer opened by a tab at the right edge.
    • Manifests are imported from TimeToShare manifest files in YAML or JSON, each as a new block at the centre of the view, moved right past the blocks it would overlap (an open editor is closed first, as Done closes it). A manifest the workspace holds already is not imported again: the same file in the same folder (the same folder chosen again counts as the same), or a file holding the same bytes as one picked alone; the warning names its block, which is selected. Export writes each bundle back as its file came: in the minimal or the complete form, with or without its styling, and in canonical YAML, pretty JSON or RFC 8785 JSON, the file named after the manifest's id, else its name, else bundle, followed by .tts.yaml or .tts.json. A new bundle is written minimal, with its styling, in YAML; the Manifest tab, and the inspector's first tab while one bundle is selected, set Minimal and Include styling for each bundle, and the workspace keeps these settings. Open… takes manifest files too: into an empty workspace they are imported at once, otherwise it asks whether to add them or to open them in a new, empty workspace, saving unsaved work first. Save (Ctrl+S) writes the workspace file back into the file it was opened from or last saved to, a restored workspace's included, and otherwise asks for a file; after a rename it asks again, offering the new name. Open…, Import manifest… and Save as… use the browser's pickers where it has them, else a file input and a download; a workspace file tilie was started on is saved back in place through the server (Open a folder, a package or a workspace).
    • Folders and packages. Open folder… opens a folder chosen in the system's folder dialog, and a folder, a zip file packing one, manifest files or a workspace file can be dropped anywhere on the editor. The import dialog lists what was found: every package (a folder holding a package.yaml) under its name, its manifests in its order, then the manifest files outside any package (named .tts.yaml, .tts.yml or .tts.json; in a folder holding none, every YAML or JSON file of at most 1 MiB that holds a manifest), what could not be read above them, each manifest with a checkbox. A package's unchecked manifests are imported as hidden blocks, other unchecked manifests not at all, and a manifest open already is shown checked, disabled and "already open". A folder opened so is granted to the editor until another workspace is opened: the workspace keeps each block's manifest file by the folder's name, the file's path in it and the SHA-256 digest of its bytes, and the tables a manifest names are read from beside it in that folder. Two folders of one name are told apart as data and data (2). Opened again, a workspace asks once for each folder its blocks name, chosen again in the folder dialog or as the zip file packing it (Choose folder…, Choose zip file… or Not now), since a browser keeps no access to a folder between visits; a folder or zip of that name opened or dropped later is taken for it. Files in hidden places (a name starting with .) and in node_modules folders are no part of a folder.
    • Hidden blocks are kept in the workspace and drawn nowhere: they take no place on an arranged canvas and cannot be selected. With nothing selected, the inspector's first tab, Arranger, lists every block with a Shown checkbox, each press one undoable step; Show matches loads a hidden block's table once it is shown again.
    • Export package… (with a server that answered its health check; otherwise disabled, with the hint "Exporting a package needs a running tilie-server.") exports the whole workspace, its hidden blocks included, or the selected blocks as one TimeToShare package, a zip file (decisions/0041): package.yaml, each manifest at the package's root under its own file's name (equal names numbered), and the tables the manifests name, composed by the server. An unchanged package exported whole comes out byte for byte, so it can be unpacked over a clone of its source and checked with git diff; files a manifest names that are no tables (recordings, scores, a parse's source) are not in the zip. A MatchClaim table holding beliefs not saved yet is exported as the block holds it.
    • The inspector's tabs wrap into rows where the drawer is too narrow for one. Its first tab follows the canvas selection and is named by what it shows: Arranger for the workspace (nothing selected); inside an editor with nothing selected in it (what entering the editor selected counts as nothing), the editor's level, Bundle, Group, Timeline, Children or Flow control; one selected thing by its kind, Bundle, Group, Timeline, Band or Element; several, Selection. Selecting never switches to the tab. It names what it shows and holds what applies to it: the Arrange menu's own buttons for the workspace or several blocks (the canvas's blocks) and for one block (its groups and ungrouped timelines), disabled with the canvas's menu while the canvas is locked; the blocks with their Shown checkboxes for the workspace; one bundle's Minimal and Include styling, as the Manifest tab has them; and, in a children or flow-control editor, what that editor edits (above). Its Export section writes what it shows as a graphic, in the browser without a server: with nothing selected every shown block, selected blocks whole, anything else cut to the boxes of what is selected (an element without a box to its card, else its block), placed as on the canvas, arranged or not. SVG (fonts optionally embedded), PNG (linked scale, width, height and dpi, quick 1×, 2× and 4×, transparent or white, the dpi stated in the file; refused above 32767 pixels a side or 268,435,456 pixels in all, with a warning above 16,777,216 pixels, the most Safari on iPhone and iPad draws) or TikZ (a standalone LuaLaTeX document, as a ZIP with the two font files and their licences or naming a font directory, or the tikzpicture alone). Export downloads the file; Copy copies the text or the PNG image. Its Properties tab renames the workspace or the inspected element, shows a selected region's start, end and length and a selected jump's destinations (each naming where it leads; choosing one selects the jump with its target), toggles how flow control is drawn (arcs, symbols, forks and the name, ID and label of a band's elements or of one element) and whether atomic sections are shown, each toggle one style rule in the manifest and one that would change nothing drawn disabled with its reason, edits the geometry of the selected block, frame or card, shows or hides each band of a selected timeline, a root, a child or a virtual timeline, with its Visible control: one box for the timeline's own band and, beside it, one for that band of the timeline's whole tree, mixed while they differ, showing a regions or conversion maps band also showing the regions or maps it holds (the atomic sections of a sonata's movements with one press on its root); a band's box is checked while the band is drawn, an empty band only once shown explicitly, and is never disabled: one press on an empty band draws it as an empty strip that is hovered, opened by a double-click and filled like any band, since showing an empty band is how content is added; beside it the control says why it shows nothing; a virtual timeline's bands have a third column, From the sources, one switch per band showing that band of every chunk's window; every press is one undoable step, also inside an open editor; lists a selected bundle's timelines with a Visible checkbox for each root and virtual card, opens the editor of what is selected with its Edit button, puts the selected timelines into groups or takes them out (a timeline may be in several groups), lists a selected group's members to change them, and creates a new group of the selected timelines. Its Regions tab lists the regions of the selected timeline and of its descendants, keeping that list while one of them is selected, renames, moves and removes them, and adds one over the whole timeline (Add region); atomic sections are listed read only. Its Metadata tab shows and edits statements (below). Its Manifest tab shows the selected block's manifest as Export writes it, as JSON, YAML or TOML, edits it, and lists unknown keys and the manifest's own warnings. Its Journal tab lists the journal, newest first. Its last tab, Elisions, sets the elisions of what is selected (below).
    • Elisions. Selecting one elision on the canvas, stored or one a card derives, shows the Elisions tab, as choosing it would: an open drawer switches to it, a closed one shows it when opened, and the tab stays once the selection leaves the elision. The tab shows up to three blocks, each collapsed to one line that names its kind (Timeline, Group or Elision), its title and its mode (with the number of elisions where it lists them), or an elision's stretch, and opens with a click; the block holding the selected elision and that elision's own are open from the start, a block the user has acted in (a mode, option or toggle chosen, a button pressed, a listed elision clicked) stays open once the selection leaves it, one closed while it held the selected elision stays closed, and a block stays open or closed while another tab is shown. The timeline block shows the elisions of the root the selection lies under, wherever that root is drawn whole: "Parent timeline" for a root drawn as an ancestor card behind its grouped children's frames, with a checkbox "Draw behind its groups" and the modes Full, Proportional and Custom, and "Elisions of" for an ungrouped root or the placed card of a virtual timeline, with Full and Custom; the mode shown is always the one drawn. Under the legend Proportional it sets the proportion (Automatic, or a number), the rows that are elided (Automatic, or the rows chosen) and what every gap shows (Ellipsis, Name, Coordinate, Lines). Custom lists the stored elisions the card draws, a click on one selecting it and × deleting it, with Add elision, which elides the middle third of the longest stretch of the selected timeline the card draws (outside the member's span on an ancestor card, outside the repeats it draws once on a virtual card), and Remove all; switching from Proportional to Custom stores the gaps the card derived exactly as they were drawn, and the stored elisions are kept while another mode is chosen. Custom is unavailable, with the reason, where the root is a member of a group, whose elisions are then that group's. A root drawn once behind a row of groups side by side shows the elisions of that one card, wherever the selection lies under it: no modes, only the line "Drawn once behind the row: its elisions are not drawn while the bundle is arranged side by side."; "Gaps between groups" lists, read-only, the gaps the row cuts in it between two groups, and the list of its stored elisions, each noted "not drawn while arranged side by side", keeps Add elision and Remove all, an added elision appearing once the bundle is free. Wherever the selection lies in a group's frame, or in its group editor, the group block, "Elisions in group", offers a checkbox "Draw the group's elisions", lists the group's elisions (one the frame does not draw, as in a frame switched onto a flow, noted "not drawn in this frame"), and adds and removes them in the same way. A selected elision is renamed in the Properties tab's Name field, and its own block is its form: From and To in its timeline's unit, typed exactly, what it shows (Ellipsis, Name, ID, Coordinate, Lines), for a group elision the stretches it also elides on the other timelines of the frame, and Delete elision; its gap's width is changed on the canvas, by the gap's handles; an elision a card derives is shown read-only ("Choose Custom to edit"). Each change is one undoable command, and every mode is a style rule stored in the manifest, so an export draws what the canvas shows.
    • Statements. The Metadata tab shows what the selected bundle, timeline or region stands for (with nothing selected, the edited element in an editor, else the bundle when the workspace holds one block), as property–value pairs that TimeToShare's description specification defines, each with its provenance: how it was made (who stated it, when and how) and who believes it (true, unlikely or false). One tile holds one verb about one thing (two values carrying the same label count as one thing), collapsed to its sentence, with the image of the first of its things that has one; the first one says what the element is ("Clair de lune, mm. 1–6 (MEI) is a printed or scanned edition."). One click on a tile's expand button shows its pairs, one row per vocabulary that states it (rel:prf, schema:byArtist, wdt:P175, …), each with a Provenance button, and "+ Add vocabulary"; an IRI is shown as a slug, prefix:local (mbid: for MusicBrainz), the full IRI on hover. Provenance opens the pair's paradata and beliefs and holds the actions: your own belief, True, Unlikely or False, and Remove; believing a pair false records your belief and leaves the pair stated. Below the tiles, the candidates (pairs held only in provenance, such as matches proposed for review) are listed with the same Provenance button, believing one true states it, and those you believe false are set apart. "+ Add statement" opens the composer, three fields each narrowing the next: the verb, the vocabulary, and the value, searched in Wikidata, the GND, YouTube or MusicBrainz, entered as an identifier, or a timeline or region of the manifest chosen from a list or picked on the canvas; a URL pasted into any field fills vocabulary and value, and "Other property…" states a property no vocabulary of the catalogue offers. "+ Add vocabulary" offers what other systems say the thing is the same as. "Propose matches for unreconciled names" looks up every name stated without an identifier and writes the best match as a candidate. Every action is one undoable command. What you add is stated by you and believed true by you: your name, "Gerhardt" until you give one under File, Your name…, is also the journal's author, and your ORCID iD, where you give one, names you in the provenance (else a tag: IRI made from your name); the browser keeps both. Type profiles (File, Type profiles…) are your own types of thing, with the verbs usually stated of each and the systems to look its values up in, any Reconciliation Service API endpoint among them; they are settings of the browser, exchanged as YAML files, never part of a workspace or a manifest.
    • Lookup and privacy. Text typed into a value field goes to the chosen system's service: Wikidata, the GND (through lobid) and YouTube's oEmbed are asked from the browser, MusicBrainz only through tilie-server (one request a second, a User-Agent naming the server and no person, answers cached for the run). Viewing the tab also resolves the IRIs of the things its tiles name, for their thumbnails, and "+ Add vocabulary" resolves a tile's thing for its cross-references, so the manifest's thing IRIs reach Wikidata, the GND, YouTube or the server. An editor mounted with lookup: false sends none of these requests.
    • Timestamps. A timestamp is a timeline's cross-section at a position: the timeline's coordinate, that of every segment and displayed descendant its cross-section line crosses, and the values of their conversion maps. With Show coordinates on (the canvas toolbar, or C), hovering a timeline or one of its maps shows that timestamp in a flag, the position picked on the hovered row (an ancestor line is read as its ancestor's line, and the lines of an ancestor card where the card is seen beside the frames and cards in front of it, everywhere while it is raised), and a click pins it in the Timestamp tab: there its exact values are copied bare, with their unit written out (219/16 quarters) or pretty (13 11/16 ♩, 1′15.5″), shown as JSON, YAML or TOML, and edited, every coordinate and every map value that can be solved for a position. The flag and the tab also show the coordinates of the timeline's ancestors, every coordinate and map value listed top to bottom as it is drawn on the canvas (a map drawn above its timeline's line before that timeline's coordinate); inside an edition's skeleton (a root in ordinals whose meta lists its levels under skeleton, such as part, page, accolade and measure) each timeline is named by its level (page 129), its coordinate is an ordinal and the value is counted in the skeleton's unit (5/8 pages); while Show coordinates is on, named timestamps and MatchStamps let the pointer through to the lines beneath; a segment's boundary, selected alone, shows the segment's start in the tab; and on a timeline of an integer unit (samples, ticks, pixels) the pointer steps by 1. Giving a pinned timestamp a name stores it in the manifest as a named timestamp, whose Display toggles choose what every export draws of it: its wedge, its name, ID and coordinate as stacked labels, and its dashed cross-section line (Line). The Wedge slider turns the wedge about its tip from −180° to 180°, mirrored when its band lies above the line, with stops at −180, −135, −45, 0, 45, 135 and 180 (PageUp and PageDown move between them); Default removes the stated rotation. On a member of a group a named timestamp may be a GroupStamp (the GroupStamp toggle; on by default when it is named on the arranger or in a bundle or group editor, off when named in a timeline editor): its line runs across every member card of the group's frame, the other members' coordinates follow from the group and are never stored, and its coordinates on the other members are secondary coordinates, hidden unless a rule shows them. With Show coordinates off, a click on any of its lines shows the whole GroupStamp in the Timestamp tab; with it on, the flag reads a hovered member's line the same way above a timeline editor, listing every member of its group with its ancestors and the descendants its line crosses. Every new root timeline, and every root of an imported manifest without a graphical object, is given the named timestamps origin and length (when its length is known), each drawing its wedge and coordinate; a timestamp at a timeline's end follows the end when the length changes. With Show coordinates off, a click on a named timestamp shows it in the tab, where it is renamed, moved by editing its values, or deleted. Two settings at the bottom of the tab cap how finely a position is picked: Denominator (2520 by default) for fraction axes and Decimals (3) for float axes, which also sets how values are rounded in the flag; the pointer takes the simplest value inside its pixel on the hovered row's axis, and zooming in reaches finer ones. The message bar over the canvas lists every message as a card that names its level: information, such as "Copied" or the reason a gesture, a key or a choice was refused, vanishes after three seconds, a longer text after 300 ms a word; warnings (something asked for and left undone) and errors (an operation on a file or a server that failed) stay until dismissed.
    • MatchClaims and MatchStamps. A package's MatchClaims lie in its MatchClaim table, a Parquet file, or a folder of Parquet files, beside the manifest, which the manifest names in its resources; the editor reads one table per block through tilie-server, so matches need a running server: until one has answered its health check, nothing is asked: turning Show matches on while a table is missing says in the message bar, for as long as it takes to read, that matches need a running tilie-server and how to start it, and the disabled Load MatchClaims… and belief buttons and an expanded MatchClaim say the same; while the check has not answered yet, the message bar says nothing: once it answers, the tables Show matches asks for load, and if it fails, the message bar says once how to start a server. Turning Show matches on (the canvas toolbar, or M; it and Show coordinates take turns) loads the table each shown block's manifest names, without a question: from its URL where the manifest names it by an http or https URL, else from beside the manifest's file in the folder it was opened from. Only where that folder is not open does one small dialog ask for it, once per folder (Locate… for the folder, Locate zip file… for the zip packing it), and where the folder does not hold the table, for the table's file (Locate… opens the browser's file picker for one .parquet file) or its URL, or to cancel; a picked file is not remembered, so it is picked again after the workspace is reopened. Where no block holds a table afterwards, the message bar says "No MatchClaim table loaded.". A table can also be picked beside its manifest in Import manifest… or beside its workspace in Open…, and is read through the server too, or chosen with Load MatchClaims… in the Matchstamp tab, which opens the same dialog. A server that offers no files (its health answer says "files": false, as a public instance's does) still reads the tables, so Load MatchClaims…, Show matches, beliefs, provenance and events all work with it. A table that several manifests of a package share shows each block only its manifest's MatchClaims, those either of whose timelines the manifest's MatchClaim resource lists, and a belief recorded in one block keeps the other manifests' MatchClaims in the table. Tables are held while the workspace is open and never written into it.
    • The table's potential MatchStamps, the connected sets of alignment anchors its MatchClaims state, are drawn over the block as dashed grey lines, wherever a line of their timelines is seen; hovering one shows its coordinates in a flag, and a click pins it in the Matchstamp tab, the hovered and the pinned one drawn as naming would draw them, a GroupStamp's line across its group's frame. What naming stores is the same whichever editor is open. Giving it a name stores it in the manifest as a named MatchStamp, whole, as the table states it, even where the MatchClaim filter hides some of its timelines. The anchor lines of the pinned MatchStamp and of the named ones take your belief in the MatchClaims stating them: undecided blue, true green, unlikely dark orange, false red, the most critical belief where several MatchClaims state one anchor. A named MatchStamp that the table no longer matches is drawn entirely red, with an exclamation mark before its name; the Matchstamp tab lists what differs, and Update rewrites it from the table. With Show matches and Show coordinates off, a click on a MatchStamp's connector, or on one of its match timestamps' lines, selects it for renaming, Update and Remove.
    • The Matchstamp tab shows the MatchStamp's coordinates as the Timestamp tab shows a timestamp's, disabled, with the same Copy buttons, the coordinates its MatchClaims state set apart from those reached through groups, ancestors and crossed lines, or as JSON, YAML or TOML; its Lines, every dashed line it draws in screen order, each timestamp line with the Timestamp tab's display toggles and, on a timeline in a group, a GroupStamp toggle (a named MatchStamp's match timestamps on grouped timelines are GroupStamps by default), and each anchor line with Line and Name, which choose what every export draws; and its MatchClaims, each collapsed to its ID. Expanded, a MatchClaim shows the events on both sides, its certainty and every actor's belief; True, Unlikely and False record your own belief, which the server writes into a new table, kept only once Save MatchClaims… saves it (New workspace and Open… ask before they drop a changed table); Provenance opens how it was made. The MatchClaim filter at the bottom of the tab chooses the timelines whose MatchClaims are shown and, with four toggles, the beliefs that count: true, undecided, unlikely and false, all but false by default; the workspace keeps it for each block.
    • Unsaved changes are marked with • before the workspace's name in the header. A workspace's text is autosaved in the browser's IndexedDB, when the page is idle and never while a pointer is pressed, and offered for restoring when the editor opens again.

Not available yet: editing flow control in the editor beyond adding elements and setting an element's name, its label, the user's belief in it and how it is drawn (an added element is not moved or changed, and is rejected rather than deleted); a virtual timeline carried through a group (which timetoalign evaluates) is drawn as its line alone, and no card is switched onto it; loading sources through timetoalign on the server, which so far exposes /api/health, whose member files says whether the server offers the file routes, /api/measure-maps, the expansion of a manifest's measure maps, /api/match-claims, the manifest's rows of a package's MatchClaim table, those either of whose timelines its MatchClaim resource lists, checked against the manifest and answered as columns, /api/match-claims/provenance and /api/match-claims/belief, a MatchClaim's provenance read on demand and a belief recorded in a new table, which keeps the other manifests' rows, /api/match-claims/events, the events on both sides of given MatchClaims, /api/flows, a timeline's flow control played by timetoalign, /api/flows/flow-maps, the manifest with a timeline's flows written as regions and FlowMaps, /api/reconcile/musicbrainz, MusicBrainz as a Reconciliation Service API 0.2 endpoint, /api/packages, manifests and the tables they name composed into one TimeToShare package and answered as a zip, and, except on a public instance, /api/folders and /api/files, the workspace, manifest and table files below its root folder listed and read and workspace files written, nothing in a hidden folder.

Install and start

The tilie-server release on PyPI predates the editor described above. Until a release carries it, build the editor and start the server from the source tree, with TimeToShare and timetoalign cloned beside this repository as Development describes:

cd TimeLineEditor/app
pnpm install
pnpm build
cd ../server
uv sync
uv run tilie --static-dir ../app/packages/editor/dist

With a release that carries it, pip install tilie-server and then tilie do the same.

tilie starts the local server on 127.0.0.1, port 8000, and opens the browser (the release on PyPI, which predates this, chooses a free port each time). The browser keeps what the editor remembers, such as your name and your type profiles, for each port apart, so the port stays the same from run to run; while port 8000 is taken, tilie uses a free port and prints a notice saying so. Use tilie --check to verify an installed distribution. tilie --port 43129 selects a port, tilie --no-browser starts without opening a browser, and tilie --root <folder> names the folder the server reads and writes files in (by default your home folder, or the folder tilie PATH gives, below).

Open a folder, a package or a workspace

tilie PATH starts the server and opens what PATH names in the editor, as a desktop program opens the file it is started with:

  • a folder: the import dialog lists its packages and manifests;
  • a package.yaml: the import dialog lists that package alone;
  • a manifest file (.yaml, .yml, .json): it is imported at once;
  • a workspace file (.tle.json): it opens in place of the open workspace, after asking about unsaved changes, and Save (Ctrl+S) writes it back there.

Without --root, the root is the folder itself, for a manifest the folder of the package that lists it (the nearest folder at or above the manifest's own whose package.yaml lists it, so that the tables of the package are within reach), else the file's folder, and for a package.yaml or a workspace file their folder; with --root, PATH must lie in it. The root is the folder the editor reads through the server for the whole run, known by its name, in every workspace opened in that tab; a workspace that names folders beyond it asks for each. tilie / is refused: the editor names the folder by its last segment. A workspace autosaved in a run on a folder of another name is restored without its file, so Save then asks where to save it.

Without PATH, and in a browser alone:

  1. File, Open folder…, or a folder or a zip file dropped on the editor, lists the packages and manifests found in the import dialog; File, Import manifest… adds manifest files picked one by one.
  2. File, Save (Ctrl+S) asks once where to save the workspace and offers <name>.tle.json after the workspace's name; later saves write it back in place where the browser lets the page write files (Chromium's file pickers), else as a download. Save writes the workspace file alone, which holds its own copy of every manifest: the manifest files and their tables stay as they are; Export manifest… writes one manifest out, Export package… a package.
  3. A click on the workspace's name in the header renames it; the next Save then asks again, as Save as… does.
  4. File, Open… opens the workspace file again later, and asks for each folder its manifests lie in.
  5. Show matches (M) loads each manifest's MatchClaim table from beside the manifest's file in its folder, or from its URL where the manifest names the table by an http or https URL, without asking. Only when the folder is not open, or does not hold the table, does a small dialog ask.

The server serves nothing in a hidden folder or with a hidden name (one starting with .), so keep the files you open with tilie PATH in folders that are not hidden. It writes only workspace files: Export manifest…, Export package… and the Matchstamp tab's Save MatchClaims… are saved by the browser, as a download or in the browser's own save dialog, never through the server.

Without a server, or in a tab that does not hold the run's token (the header then shows "offline"), the editor reads no MatchClaim table and exports no package (Status).

A public instance

tilie --public-host <host> serves the editor to anyone who reaches <host>, so that TiLiE can be tried without installing anything. The option names the host exactly as browsers send it in the Host header (tilie.example.org, or localhost:8000 for a trial on your own computer) and may be repeated for a server reached under several names. A public instance:

  • binds every interface, on port 8000 unless --port names another, opens no browser and prints tilie: public mode on port <port>, answering as <hosts>; no token, no file access;
  • answers only requests addressed to the named hosts, from no page but theirs (403 otherwise), and needs no token;
  • serves none of your files: Open…, Open folder…, Import manifest… and Save use the browser, while measure maps, Show matches, Export package… and the MusicBrainz lookup work as on your own computer;
  • refuses with 413 a posted body over 16 MiB and posted tables (a MatchClaim table, or the tables of a package export, counted together) of more than 1,000,000 rows or over 128 MiB uncompressed, runs at most two computations at once (further ones wait) and holds at most 32 connections.

--check, --root, --no-browser and PATH cannot be combined with --public-host. A public instance has no rate limit, one MusicBrainz queue shared by all its visitors (one request a second for all of them), and no accounts, and it stores nothing: a visitor's work lives in their browser and in their downloads. decisions/0038 records why it is built so.

To try it from the source tree, build the editor as above and start, from server/, uv run tilie --public-host localhost:8000 --static-dir ../app/packages/editor/dist; then open http://localhost:8000/ (127.0.0.1:8000 is a host it was not given).

The container image. The Dockerfile at the repository root builds the editor and the server into one image that starts a public instance. The build fetches timetoalign and TimeToShare from GitHub at the commits named by the build arguments TIMETOALIGN_REF and TIMETOSHARE_REF, by default fixed ones (timetoalign's the commit server/uv.lock was locked against). From the repository root:

podman build -t tilie .        # or: docker build -t tilie .
podman run --rm -e TILIE_PUBLIC_HOST=localhost:8000 -p 127.0.0.1:8000:8000 tilie

The image runs as an unprivileged user and reads TILIE_PUBLIC_HOST, the host it answers as (else RENDER_EXTERNAL_HOSTNAME; with neither it refuses to start), and PORT, the port it listens on (8000 by default). It speaks plain HTTP and expects TLS to be terminated in front of it, as a hosting platform does. To host it on a platform:

  1. Let the platform build the Dockerfile from this repository.
  2. Leave PORT to the platform, which sets it.
  3. Set TILIE_PUBLIC_HOST to the public host name of the service. Render sets RENDER_EXTERNAL_HOSTNAME, which the image reads by itself.
  4. Address a health probe to that host name: a probe sent to the container's internal address is refused with 403. Use /api/health only where the platform sends the public Host with its probe, else a TCP check.

The image was designed for Render's free web service and for Google Cloud Run. A free Render instance has 512 MB of memory, sleeps after 15 minutes without traffic, takes about a minute to wake and keeps nothing on disk; Cloud Run scales to zero when unused, lets you choose the memory and needs a billing account. These terms change: see Render's free instances and Cloud Run pricing.

Status

Started as tilie, the server binds only to 127.0.0.1, creates a random bearer token for each run, rejects foreign Host and Origin headers, serves the bundled application, protects every /api/ route, and sends Referrer-Policy: no-referrer with every response. tilie prints and opens http://127.0.0.1:<port>/#token=<token>, followed for tilie PATH by &folder=<the root's name>&open=<PATH in it>: the token and what to open travel in the URL fragment, which the browser never sends to the server. The editor reads them, removes the fragment from the address bar (so a reload opens nothing again), and sends it with its health request. The editor keeps the token in the tab's session storage, never in a path, a query or localStorage, so a reload of that tab stays connected; a new tab, or a tab of an earlier run, shows the "offline" mark: open the URL tilie printed. Started with --public-host, it keeps the Host and Origin checks for the named hosts and the referrer policy, and gives up the token and the file routes (A public instance).

Of the six application packages, core implements the workspace, block, and manifest model described in the architecture guide. It reads and writes manifests of schema 0.2.0 only, the one version TimeToShare supports, and migrates nothing. layout exports draw(manifest, placement, layers, metrics), which returns one derived drawing. writers exports toDescriptors(drawing), page(placed, cut?), writeSvg(placed, options), and writeTikz(placed, options); a placed drawing has drawing, x, y, and scale, a page may contain more than one, and a cut draws one rectangle of the canvas, everything outside it clipped. arranger exports the canvas and the functions that turn its gestures into commands (the canvas); editor is the application around it (the editor); client connects to the server, lists and reads the workspace, manifest and table files below its root folder and writes workspace files there, and asks its health, the expanded rows of a manifest's measure maps, the columns of a package's MatchClaim table, the provenance of some of its MatchClaims, the events on both sides of some of them, the new table holding a belief, a timeline's flows, played or written as FlowMaps, and an exported package. There is no generated API client or server-side loading yet.

Architecture

TiLiE keeps a small browser editing core and treats the local Python server as an equal peer for loading, computation, and exports. TimeToShare manifests remain exact and schema-validated, while the screen drawing is derived from them. The package structure prevents UI dependencies from leaking into the core. Read the architecture guide for the complete design and the distinction between current behavior and intended behavior.

Development

Every application package that uses the TimeToShare schema package, @timetoalign/timetoshare, takes it through a link: to the js/ directory of a checkout beside this repository until schema 0.2.0 is published on npm, and ^0.2.0 from npm once it is. Clone TimeToShare there and build its js/ package first (see CONTRIBUTING.md), then install and validate the application workspace:

git clone https://github.com/TimeToAlign/TimeLineEditor.git
cd TimeLineEditor/app
pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm build

To render the writer review sheet, install rsvg-convert and run this from the repository root:

pnpm -C app/packages/writers review

The command writes SVG and PNG renders plus index.html under app/packages/writers/review/. It confines fontconfig to the DejaVu Sans and Noto Music files bundled by TimeToShare and refuses to render when another font is visible.

To draw any manifest file as the drawing fixtures are drawn, into an SVG file and a standalone TikZ document:

pnpm -C app/packages/writers draw path/to/op106.tts.yaml --out path/to/folder

Relative paths are read from app/packages/writers; --name, --length and --scale are described in AGENTS.md.

Set up, test, and build the server separately. Until a timetoalign release carries the measure-map expansion, the server installs timetoalign from a checkout beside this repository, so clone timetoalign there first; until a TimeToShare release carries schema 0.2.0, the timetoshare package that timetoalign checks statements with comes from the TimeToShare checkout cloned above (see CONTRIBUTING.md):

cd ../server
uv sync
uv run pytest
uv build

The writer compile test needs lualatex with TikZ, standalone, and fontspec; it uses the DejaVu Sans and Noto Music files bundled by TimeToShare. Without lualatex the TikZ compilation is skipped, and with TILIE_REQUIRE_LUALATEX=1 set its absence is a failure, as in CI. The same test parses every review SVG as XML.

The server wheel bundles the built app. From server/, uv run tilie --check --static-dir ../app/packages/editor/dist checks a development build. From the repository root, python3 scripts/check_versions.py --tag vX.Y.Z checks that a release tag matches both declared versions.

Releasing

Release preparation, version checks, the tag-triggered workflow, and PyPI trusted publishing are documented in CONTRIBUTING.md.

License

TiLiE is released under the MIT License. It depends on the timetoalign library, which is distributed separately.

About

TiLiE, the TimeLineEditor: a browser editor and visualization tool for TimeToAlign! timelines

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages