Drawing a TimeToShare manifest#
This specification states how one TimeToShare manifest is drawn: the
graphical object of style rules (section 2), the arithmetic of
positions (section 3), the default style (section 4), the fonts that
measure every text (section 5), the layout that turns a manifest into a
drawing (section 6), and the writers that serialize a drawing as SVG and
TikZ text (section 7). Two implementations that follow it draw the same
manifest, with the same inputs, as the same SVG and TikZ text, byte for
byte.
A drawing is derived and never stored: there is no drawing schema, and no JSON form of a drawing is exchanged. This specification pins the drawing.
Sections 1 to 7 specify the drawing of one timeline, called the root,
with all its descendants: a member drawing. Section 8 specifies the
block that holds member drawings. Every manifest is drawn as one block,
whether it holds one timeline or many, groups or none: its groups as
frames and its ungrouped roots as cards, and the virtual timelines it
places as cards too (section 8.10). Terms in code are JSON members.
The block draws the bundle, a frame a group, a card a timeline drawn as a root, and a band a facet of a timeline (README, “Containers”); these four containers are the boxes of a drawing.
1. Inputs and output#
draw(manifest, placement, layers, metrics, reading) returns the manifest’s drawing.
manifest: a TimeToShare manifest, read in its complete form, every key the manifest leaves out taking its default (README, “Defaults”), and in canonical order (README, “Canonical order”), whatever form and order it was written in. Itsgraphicalobject holds the manifest’s own style rules and itsorder(section 2). The drawing reads the manifest alone, never a table that itsresourcesname.placement: chosen by whoever places the drawing, such as an editor’s canvas or a script:length, the graphical lengthLof every item of the block without a length of its own (section 8.6), in canvas units (default 400): the distance from a root’s start to its end;spacing, the block’s spacing, the gap in canvas units between its items that lie at their defaulty(section 8.6), a finite number ≥ 0 (default 8);margin, the block’s margin, empty space in canvas units drawn above its first item and below its last (section 8.4), a finite number ≥ 0 (default 0). A frame’s and a card’s spacing and margin are entries ofplaces(section 8.6); none multiplies another;widthandheight, the requested block size in canvas units, ornull(the default) for the content’s own size;places, the places of the block’s items and the sizes of its members’ cards (section 8.6): an object keyed by the ID of a group (its frame), by the ID of an ungrouped root (its card) and by the ID of a virtual timeline that is a member of no group (its card, which is drawn only whereplacesholds its ID, section 8.10), each value an object with any of the membersx,y,length,scale,spacing,margin,widthandheight; a group’s value may also holdcards, an object keyed by the ID of a memberT, whose value states thewidth,height,spacingandmarginofT’s card in that group’s frame, so thatplaces[G].cards[T]is the card of memberTin the frame of groupG(default{});arrangement, the block’s arrangement (section 8.6):null(the default), each item lying at its place, or an object{direction, order}that places the items in an order instead:directionis"vertical", the items one under another, or"horizontal", the items side by side in one row, every root that groups hang on drawn once behind the row (section 8.8, Drawn once);orderis a list of the IDs of groups, ungrouped roots and placed virtual timelines, the order to take the items in. Like every input here, an arrangement says where the drawing places things and is never part of the manifest;view, the view{width, height}, the screen area the drawing is meant for, in canvas units at the scale 1 (CSS pixels), each a finite number > 0 (default{width: 1280, height: 720}). It sets the proportion of the elisions a card derives where itselision-proportionisauto(section 8.9) and nothing else: an editor passes the area of its canvas, a script its own or the default, and the manifest stores nothing of it, so one manifest drawn for two views may differ in the widths of its derived elisions.
layers: the rule lists that style the drawing, from the lowest to the highest precedence: the defaults of section 4, then any lists an application supplies below the manifest (such as an editor’s settings), then the manifest’s owngraphicalobject. No layer lies above the manifest: a drawing’s own styling is its manifest’s. Section 2 defines them.metrics: the advance widths of the fonts of section 5.1.reading: the reading in force of flow control, the flow-control elements the drawing counts as read (section 6.4, Flow control):null(the default), or an object{believer, beliefs},believerthe IRI of an actor andbeliefsa non-empty list of belief states, a belief filter of the README (“Provenance and beliefs”). With an object, an element is read where its state forbelieveris one ofbeliefs, the state taken and the actors compared as the README’s belief filter takes and compares them; withnull, an element is read where no actor believes itfalse(README, “Flow control”). An element the reading does not read is unread, and the drawing applies to unread elements what the README’s flow control says of rejected ones: no destination lands on an unread element, atonaming one names nothing (section 3.1), and an unread element is drawn faded (section 6.4, Flow control). Withnull, unread and rejected are one. An editor passes its user and the belief states it keeps (the user’s own beliefs deciding where the user holds one, the workspace’s belief filter elsewhere), a script its own ornull; likeplacement, a reading is never part of the manifest.
The drawing is a block of width W and height H and a list of drawn
elements in block-local canvas units, origin at the block’s top-left corner,
y downwards, and the block-local position (Ox, Oy) of the place origin,
from which places are measured (section 8.6). Every element carries its
address (section 2.2) and, where it shows a coordinate, the exact
coordinate it shows, whatever its label’s text (section 5.2). A drawing
of an arranged block also states its arrangement: its direction, the
order of its items (for horizontal, the row) and the roots drawn once,
top to bottom, or, where horizontal is refused, the conflict, its
groups, its roots and its reason (section 8.8, Drawn once). Canvas units become
CSS pixels in SVG and points in TikZ (section 7).
A drawing does not depend on its position on a canvas, nor on its scale: a
canvas or a writer places the block at a position and scales it uniformly by
a scale factor z (section 7.1). The three ways of resizing a drawing
change one input each:
Resize |
Input changed |
Effect |
|---|---|---|
Scale |
scale |
everything scales, proportions kept, text included |
Box |
|
only the block changes; the content keeps its place at the top left; the block never becomes smaller than the content (section 8.4) |
Stretch |
|
horizontally, distances along time stretch; vertically, the gaps between the container’s contents grow or shrink, or, in a container with exactly one content, the equal margins above and below it; markers, line widths and text keep their size; the block follows the content (below) |
On a stretch, a requested block size larger than the content keeps its
proportion to the content, so the block follows the stretched content and
the room the request adds stretches with it: width (or height) becomes the
request times the stretched content’s size divided by the content’s size
before the stretch, multiplied first, in binary64 (an editor may round the
result to the grid it stores numbers on). A request no larger than the
content before the stretch becomes null, and null stays null. A
horizontal Stretch of the block scales every x, length and width that
places states by the ratio of the lengths, and keeps every scale.
A container’s contents are a block’s items, a frame’s cards, a card’s
root row, the root’s present bands (section 6.4) and its ancestor bands
(section 8.3), none, one or two. A vertical Stretch of a container with two
or more contents changes its spacing; with exactly one it changes its
margin instead, the gaps being none, so that the container grows or
shrinks by equal margins above and below its contents (sections 6.5 and
8.4), and its spacing is unchanged; with none it changes its
spacing. Scale, Box and the horizontal Stretch keep every margin. A
vertical Stretch of the block so changes its spacing or its margin
alone: it moves the items at their default y and keeps every stated y
and height.
Every frame and card of the block is resized in the same three ways,
changing entries of places only (section 8.6). An item, a group’s frame
or an ungrouped root’s card: Scale changes its scale, Box its width
and height, Stretch its length (horizontal), its spacing or margin
(vertical, as above) or both (a corner), its width and height following the stretched
content as the block’s do. The card of a member T in the frame of a group
G: Scale and the horizontal Stretch change G’s scale and length, since
the members of a group share them; the vertical Stretch changes the card’s
own spacing, or its own margin when the card has exactly one content, and Box its own width and height, the entry
places[G].cards[T], so the cards of the same member in other groups’ frames keep
theirs. An item’s or card’s content,
for this rule, is its frame or card without its own request (for a
member’s card, without its frame’s request too, since the frame’s width
widens its cards), in item coordinates: for width its right edge less its left (section 8.2), for
height its height of section 8.4. Every requested width or height
of a frame or card whose content a Stretch of an item or a member’s card
changes keeps its proportion to
that content by the rule above: a horizontal Stretch of a group, from its
frame or a member’s card, rescales every requested width of the frame and
of its members’ cards, so the members’ lines keep one length and the room
every request adds stretches with them; a vertical Stretch of a frame,
which changes only the gaps between its cards or the margins around its
one card, rescales its own requested height, and of a card, which changes
its gaps or its margins, its own and its frame’s.
2. The graphical object#
"graphical": {
"styles": {
"highlight": {"stroke": "#7F00FF", "fill": "#7F00FF"}
},
"rules": [
{"select": {"element": "label"}, "set": {"fill": "#404040"}},
{"select": {"element": "wedge", "within": "#performance"}, "set": "highlight"},
{"select": {"addresses": [{"id": "#region_1"}]}, "set": {"display": "none"}}
]
}
The object is optional; an absent graphical draws with the other layers alone.
styles maps a style name to a declaration, an object of properties
(section 2.4) and their values. rules is a list of rules,
each a selector (select, section 2.3) and either a declaration or the name
of a style in the same layer’s styles (set). The order of the
rules matters, so writers never reorder them. Every layer of section 1
has this shape. The manifest’s own graphical also holds order,
timestamps, matchstamps and elisions, which no other layer holds. order maps a group’s ID to the
display order of the group’s members (section 8.1) and the ID of a
timeline or of a virtual timeline to its band order (section 6.4).
timestamps is a list of named timestamps (default []), each an
object {id, timeline, coordinate, name, display?, matchstamp?, groupstamp?} naming one position of
one timeline: id is its ID (README, “Identity”), timeline the ID of a
timeline of the manifest at any depth, a segment included, or of a virtual
timeline (section 8.10), coordinate the
position on that timeline’s own axis, a number as the timeline’s number
type selects (README, “Values on a timeline’s own axis”), at least the zero
of that number type and at most the timeline’s length when the length is
a value, and name its name. A match timestamp, one with
matchstamp: true (default false), may leave out its name. A
groupstamp, one with groupstamp: true (default false), lies on a
timeline that lies in a group: the timeline or one of its ancestors
is listed in the group’s members, so that it is drawn in the group’s
frame, as a member or inside a member’s card; a virtual timeline lies in
the groups it is a member of. An ancestor of a member
lies in no group through it. The groupstamp’s line extends across the
frame of each group its timeline lies in, from the upper border of the
topmost member card drawn there to the lower border of the bottommost
(section 6.6, Cross-section lines); the members’ coordinates at that line
are derived from the group and never stored. A match timestamp may be a
groupstamp too. Their canonical order is by timeline,
compared by Unicode code point, then by coordinate, compared by exact
value, then by id, compared by code point.
A named timestamp’s coordinates in a card are what its cross-section
lines cross there (section 6.6): a coordinate on every timeline drawn in
the card whose line, as a root, a child or an ancestor line (section
8.3), spans the line’s x, its ends included, and on every map drawn
there that spans it, each read on that timeline’s or map’s own axis; a
segment without a line of its own (section 6.4) is crossed where its
segment line is crossed within the segment’s span. Its primary
coordinate is its coordinate on its timeline, the one its wedge and
its labels mark; every other is a secondary coordinate, a groupstamp’s
coordinates on the other members of its groups among them. The primary
coordinates of a named MatchStamp are those of the match timestamps its
alignment anchors name, the two of a MatchClaim to each anchor, and its
secondary coordinates are theirs. An application that lists a
timestamp’s coordinates, in a flag or a table, lists all of them, from
the top of the card down, and highlights the primary one.
Timestamps, groupstamps and match timestamps are drawn by one rule,
whether a timestamp is named on a root, on a child or on an ancestor of
a member: each draws what its display lists (below; a match
timestamp by default its cross-section line alone), its cross-section
line across the whole of every card that draws its timeline, as a line or
as an ancestor line, and its timeline decides only where its primary
coordinate’s wedge and labels stand: in that timeline’s markers band
(section 6.4, Markers), or beside its ancestor line (section 8.3). A
secondary coordinate on a timeline is drawn as the primary one is, by a wedge and the labels the timestamp’s
display lists, in that timeline’s markers band or beside its ancestor
line, its coordinate label read on that timeline’s axis and written in
that timeline’s number type: on an int axis the integer nearest the
exact value, ties to even, on a float axis the double nearest it, and on
a fraction axis the exact value (section 5.2); a map has no
markers band, and a coordinate on a map is listed but draws no wedge.
The words of display govern the elements of the secondary coordinates
as they govern the primary one’s. The defaults hide every element of a
secondary coordinate and turn its wedge −45 (section 4); a rule selecting
them by the selector member coordinates (section 2.3) shows them.
A groupstamp’s coordinates on the other members of its groups are read
at one proportion of each member’s drawn length (section 6.6), and only a
known length gives a value there: one member’s length is never carried
to another. So where the line crosses the card of a member whose length
is unknown, it gives that member, and every timeline its card draws, a
coordinate without a value; and where the member holding the
timestamp’s own timeline has an unknown length, the proportion is one of
its reach, and the line gives every other member, and every timeline
their cards draw, a coordinate without a value. A coordinate without a
value is drawn faded and without its coordinate label (section 6.6),
and an application listing the coordinates lists it, in its place, with
no value.
A named timestamp draws up to five kinds of element, each named by one word of its
display: wedge, its coordinate marker, at its primary coordinate and
at each secondary one (above); name, id and coordinate, its three
labels, stacked at the thick end of each wedge (section 6.4, Markers):
its name, its ID, and the coordinate the wedge marks in that
timeline’s unit (section 5.2); and cross_section, its cross-section
line, a vertical line across each card its timeline is drawn in, from
the card’s upper border to its lower border, with a gap where the wedge
and the labels of its primary coordinate stand (section 6.6). display is an array of distinct words from these five,
listing what the timestamp draws; when it is absent the timestamp draws
["wedge", "name", "cross_section"], a match timestamp
["cross_section"], and an empty array draws nothing. A timestamp
without a name draws no name label.
Its order means nothing: writers write it in the canonical order wedge,
name, id, coordinate, cross_section. An element whose word
display does not list is not displayed, whatever the cascade sets
(section 2.4).
matchstamps is a list of named MatchStamps (default []), each an
object {id, name, alignment_anchors, match_claims} (README, “Named
MatchStamps”). Each alignment anchor of alignment_anchors is an
object {id, timestamps, display?}: timestamps names two match
timestamps, and display lists what the anchor draws, distinct words
from line, its alignment_anchor element, and name, the MatchStamp’s
name as a label at the middle of that line (section 8.7); when it is
absent the anchor draws ["line"]. Writers write it in the canonical
order line, name. match_claims is never drawn. A match timestamp’s
cross-section line is an ordinary cross-section line (section 6.6).
The drawing draws the named MatchStamps as the manifest stores them, and the SVG and TikZ writers write them so. What an editor derives from a MatchClaim table, such as the potential MatchStamps it shows in grey or the anchors of a named MatchStamp that the current table no longer gives, which it marks in red, is the editor’s own and never part of a drawing.
elisions is a list of elisions (default []), each an object {id, timeline, start, end, name?, width?, display?} that leaves a stretch of
one timeline out of the drawing: every row drawn across the stretch stops
where the stretch starts and resumes where it ends, at full scale on
either side,
and a narrow gap lies between, holding one ellipsis, centred in
it, with the elision’s labels below it (sections 6.6 and 8.9). id is its ID (README,
“Identity”); timeline names the timeline the elision lies on, at
any depth, a segment included, or a virtual timeline (section 8.10),
with the meaning and the validation of a named timestamp’s timeline; start and end, start < end, are its
elided coordinates, positions on that timeline’s own axis, from its
zero to its length (and only from its zero when the length is null),
each a number as the timeline’s number type selects (README, “Values on a
timeline’s own axis”). An elision moves with its timeline when that
timeline’s offset changes. Nothing refers to an elision but an address in
a rule (section 2.2), and no timeline lists its elisions. An elision is a
container: it leaves out what lies on its stretch by position (section
2.4), so a child added inside the stretch later is elided without any
edit. name is its name, a string its name label shows; an elision
without one is labelled with the name of the timeline it lies on (section
5.3). Its natural width is the width its stretch has at full scale
(section 3.2), and width sets the gap’s drawn width in exactly one of
four forms:
|
The gap’s drawn width |
|---|---|
absent |
the standard gap of 32 canvas units |
|
|
|
the width of |
|
|
A width larger than the natural width is drawn at the natural width: an
elision never widens its stretch. display lists what the elision draws
besides its gap, distinct words from ellipsis, its ellipsis, name,
id and coordinate, its three labels, stacked as a named timestamp’s
are, and continuation, grey continuations of the rows across the gap;
when it is absent the elision draws ["ellipsis", "name"], an empty
array draws a bare gap, and writers write it in the canonical order ellipsis, name,
id, coordinate, continuation. Its order means nothing. Whatever
display lists, the gap leaves the stretch out. Elisions may overlap
each other and the span of a group member; neither is refused, and
section 8.9 states what is drawn. Their canonical order is by timeline,
compared by Unicode code point, then by start, compared by exact value,
then by id, compared by code point.
An elision on a timeline that lies in a group, as a groupstamp’s timeline does (above), is a group elision of that group: it is drawn across the group’s frame, at one place in every member card, and carried into the ancestor cards behind the frame (section 8.9). Every other elision is a card elision, drawn in the cards of its timeline’s root that draw that root whole: an ungrouped root’s card and the ancestor cards behind frames (section 8.8), and for a virtual timeline, its own root, its placed card (section 8.10). Which card elisions a root’s cards draw, and whether they derive elisions of their own, the four elision properties of section 2.4 decide, in a rule addressed to the root’s cards (section 8.9). Whether an elision is a group elision is read from its timeline, never stored.
A reader that meets rules naming styles its styles does not hold
issues one warning naming every missing style, and adds each to styles as
an empty declaration; such a rule then sets nothing, and the
graphical object is valid.
2.1 Elements#
Every drawn thing is an element of one type, and so is every band of a timeline, which draws nothing of its own:
Type |
What it is |
|---|---|
|
the block: the background of the drawing, holding everything drawn (section 8) |
|
a group’s frame (section 8) |
|
the raised container of a member drawing: one in the frame of each group that has the timeline as a member, or one for an ungrouped root or a placed virtual timeline in no group (sections 8 and 8.10) |
|
the card of a root that contains a member, behind the frame of that member’s group, at the proportions of the root’s axis; shown by default, hidden by a rule (section 8.8) |
|
the line of a timeline drawn in a card (section 8), a virtual timeline’s included (section 8.10) |
|
a child timeline’s line, at any depth |
|
one of the five bands of a timeline, each drawing one of its facets: its markers, conversion maps, children, regions or flow control (below; section 6.4) |
|
the start of a segment on its segment line, or of a chunk on the line of a virtual timeline or of a switched card (section 8.10), drawn as a thin vertical rule (section 6.4) |
|
the faded line of an ancestor of a member that is a child timeline, clipped to the member (section 8.3) |
|
a conversion map, drawn as a closed double line |
|
a region, drawn as a brace, and the brace of a chunk (section 8.10) |
|
a break, an element of |
|
a section break, an element of the role |
|
a barline, an element of the role |
|
a jump, an element of the role |
|
the symbol of a flow-control element: the glyphs of its manifestation, or of its destinations’ manifestations, in the music font on the flow row (section 6.4, Symbols) |
|
a volta fork: one per jump with destinations whose |
|
a leader line: a thin line joining a label moved out of its first tier to its element (section 6.6, Leaders) |
|
a coordinate marker: of a named timestamp of any timeline, at its primary coordinate or at a secondary one (section 2) |
|
the cross-section line of a named timestamp, a vertical line across each card its timeline is drawn in, as a line or as an ancestor line, from border to border, with a gap where the wedge and labels of its primary coordinate stand, and for a groupstamp also its lines across the frame of each group its timeline lies in (section 6.6) |
|
the line of an alignment anchor of a named MatchStamp, the shortest line between the cross-section lines of its two timestamps (section 8.7) |
|
the gap of an elision: the narrow rectangle in which a stretch of a timeline is left out, from its card’s top border to its bottom border, or for a group elision across the frame’s member cards; it draws nothing unless a rule fills it, and its stroke draws the continuations of the rows that cross it (sections 6.6 and 8.9) |
|
the ellipsis of an elision, three filled dots, one centred in each drawing of its gap (section 6.6) |
|
the name of a row, in the name column, or the title of a group or of the manifest (section 8) |
|
any other text: the name, ID or coordinate of a named timestamp, the name of a MatchStamp at an alignment anchor, the name, ID or elided coordinates of an elision, the label of a region, of a chunk, of an arc of a jump or of a segment, or the name, ID or label of a flow-control element (its stack, section 6.4, Flow labels) |
A drawing has two kinds of mark at a position, and they are never
confused. A coordinate marker marks a position of a timeline: it is a
wedge, and the wedges of the named timestamps’ coordinates on every
timeline, held by the markers band of that timeline or by its ancestor
line, are the coordinate markers this version draws. A flow line is a
break, a section break or a barline of a timeline’s flow_control, held
by the flow control band and drawn as a vertical line; the markers band
never holds one. A cross-section line is neither: it
belongs to its named timestamp’s timeline and is held by that timeline’s
line, never by its markers band nor by the timestamp’s wedge. Nor is a
symbol: it shows how a flow-control element is notated, and marks no
position of its own.
An element belongs to a timeline (section 2.2); the block, a frame,
the titles of a group or of the manifest, and an alignment_anchor, which
joins two timelines, with its label belong to none, and have no
domain, modality or class. A card belongs to the timeline it holds, and so
has its domain, modality and class. A band belongs to its timeline but has
no domain and no modality, so no selector naming them matches it, and what
it holds inherits through it its timeline’s values unless a rule
matches the band itself (section 2.5). An element has the domain
(graphical, logical or physical) and the modality (continuous
or discrete) of its timeline’s unit. A map instead has the domain and
modality of the map’s target_unit, so a map is drawn in the style of the
timelines it converts to. A virtual timeline’s elements, a chunk’s brace
and boundary included, take the domain, modality and class of the virtual
timeline’s own unit, and those a switched card draws on its root line
those of its timeline (section 8.10):
Domain |
Units |
|---|---|
|
|
|
|
|
|
ticks, samples, frames and pixels are discrete, every other unit,
css_pixels and user_units included, continuous. A map whose target_unit is null has no domain and no
modality, so no selector naming them matches it and it inherits its style
through its band (section 2.5). An element’s class is the timeline
class its timeline’s unit decides: Continuous or Discrete for the
modality, then Logical, Physical or Graphical for the domain, then
Timeline (seconds decides ContinuousPhysicalTimeline, ticks
DiscreteLogicalTimeline). A manifest writes no class; the unit decides
it. A map instead has the map’s type, one of the ten conversion-map
types of the schema (LinearMap, TableMap, ConstantMap,
PiecewiseMap, ChainMap, CombinationMap, MeasureRecordMap,
MeasureNumberMap, FloatingMeasureMap, MeasureBeatMap). A band has
no class; it has its facet instead: markers, conversion_maps,
children, regions or flow_control.
Elements form a tree that carries inheritance (section 2.5): the
block holds the timeline; a timeline or child holds its five
bands, and each band what it holds: the markers band the wedges of the
named timestamps’ coordinates on its timeline, primary and secondary
(section 2), and their labels, each label beside its wedge and not held
by it, the conversion maps band its maps, the children band
its child timelines, the regions band its regions, and the flow control
band its flow lines and jumps and the symbols of its jump targets; a
flow line or a jump holds its symbol and its stack (section 6.4, Flow
labels), a jump also its arcs’ labels and its fork, and a label or
stack moved out of its first tier holds its leader (the first label of
the stack); the flow control band of a timeline holds its timeline’s
elements in this tree, for the cascade, wherever they are laid out (the
root’s band lays out the flow control of its whole tree, section 6.4); a
timeline or child also holds
the cross-section lines of its timeline’s named timestamps and the gaps
of the card elisions and derived elisions lying on its timeline (section
8.9), each gap holding its ellipsis and its labels, directly and in no
band; any other element holds its own name and label where it has
one (section 5.3; a map and a band have neither), except that a segment’s
label and its boundary are held by its segment line, directly and in no
band, as parts of that line (section 6.4). A segment is a child timeline of
its segment line, held by its children band. One that is not a segment
line is a node of the tree although no line of its own is drawn, holding
its five bands, its named timestamps’ cross-section lines and the gaps
of the card and derived elisions lying on it as a line does, whose content is drawn at its segment line’s line (section 6.4), and
has no element type, so inside never names it; one that is a segment
line is drawn as a child (section 6.1). The line of a virtual timeline,
and the root line of a switched card, holds what a root’s line holds;
its regions band holds the braces of its chunks with their labels, before
any region, and the line holds the chunks’ boundaries directly, in no
band, as a segment line holds its segments’ (section 8.10).
Section 8 states the top of the tree: the block, frames, cards, ancestor
cards and ancestor lines; a frame also holds the gaps of its group
elisions; the block also holds every alignment_anchor, and an
alignment_anchor holds its label.
2.2 Addresses#
Every element of a drawing carries an address: an object {id?, facet?, part?} built from the IDs of the manifest (README, “Identity”)
and compared as a whole object. No address is a string composed from IDs.
id is an element’s ID; facet is one of the five facets markers,
conversion_maps, children, regions and flow_control, and names a
band; part is a non-empty array of the words start, end, name,
label, id, coordinate, card, line, elision, ellipsis,
symbol, fork and leader, and names a part of an element, or begins
with a chunk index, an integer from 0, and names a chunk drawn in a
regions band (section 8.10); end names no element in this version. facet stands only with id, and with part only where the part begins with a chunk index. The name or
label of an element is addressed by the element’s address with name or
label appended to its part; a named timestamp has no row and so no
name element, and the part name of its address names its first label,
a label element like its other two. One rule addresses every element of
every manifest, one timeline or many. This specification states IDs bare, as
the data-id attributes of the SVG hold them; in a manifest file the id of
an address, the within of a selector and every other ID reference are
written # followed by the ID (README, “Written in a file”), as the snippets
of section 2 show. In this table T is a timeline’s ID
and X an element’s ID:
Element |
Address |
Belongs to |
|---|---|---|
the block, which draws the bundle |
|
none |
the title of the manifest |
|
none |
the root, or a child timeline with ID |
|
|
the band drawing the facet |
|
|
a conversion map, region or flow-control element with ID |
|
|
the symbol of that flow-control element |
|
|
the fork of a jump with ID |
|
|
the labels of the stack of that flow-control element, all |
|
|
the leaders of the labels and stacks of an element with ID |
|
that element’s timeline |
the wedge of a named timestamp with ID |
|
|
the labels of that timestamp, all |
|
|
the wedge and the labels of that timestamp at a secondary coordinate on a timeline |
the same addresses as at its primary coordinate |
|
the cross-section line of that timestamp, and of a groupstamp each of its lines across a frame |
|
|
the line of an alignment anchor with ID |
|
none |
the MatchStamp’s name at that anchor, a |
|
none |
the gap of an elision with ID |
|
|
its ellipsis |
|
|
its labels, all |
|
|
the gap of an elision a card derives on |
|
|
its ellipsis and labels |
|
|
the name of an element with ID |
|
that element’s timeline |
the label of an element with ID |
|
that element’s timeline |
every card of a timeline with ID |
|
|
the boundary of a segment with ID |
|
|
the label of a segment with ID |
|
|
the ancestor line of a timeline with ID |
|
|
the brace of the chunk at index |
|
|
its label, its leader and the boundary at its start, a |
|
|
the frame of a group with ID |
|
none |
the title of a group with ID |
|
none |
So a region region_1 is {"id": "region_1"} and its label {"id": "region_1", "part": ["label"]}, whether the manifest holds its root alone
or many roots, and also when a member below its root is drawn as the root
of its own member drawing; a jump jump_1 is {"id": "jump_1"} on each
of its arcs, and the label of each arc, its destination’s label
(section 5.3), {"id": "jump_1", "part": ["label"]}, as is the line of
its stack that shows the jump’s own label, since a jump is one element,
whose every arc and arc label carries its address; its symbol, the
glyphs of all its destinations, is {"id": "jump_1", "part": ["symbol"]}, its fork {"id": "jump_1", "part": ["fork"]}
and its leaders all {"id": "jump_1", "part": ["leader"]}; a
named timestamp timestamp_1 draws its wedge {"id": "timestamp_1"}, its
labels {"id": "timestamp_1", "part": ["name"]}, {"id": "timestamp_1", "part": ["id"]} and {"id": "timestamp_1", "part": ["coordinate"]}, and
its cross-section line {"id": "timestamp_1", "part": ["line"]}, whichever
timeline it marks; its wedges and labels at secondary coordinates carry
the same addresses, and the selector member coordinates tells them
apart (section 2.3). A
band follows its timeline’s ID: the regions band of a child b is {"id": "b", "facet": "regions"}. A timeline perf that the groups g1 and g2
both have as a member lies in two cards, one in each frame, both
addressed {"id": "perf", "part": ["card"]}, and an ungrouped root
score in the card {"id": "score", "part": ["card"]}. The manifest’s
title is addressed {"part": ["name"]} whether or not the manifest has an
id: the manifest’s own id addresses nothing, so giving a manifest an ID,
changing it or naming the manifest changes no address. A jump target is
addressed like a region and draws its symbol alone, {"id": X, "part": ["symbol"]}. A MeasureMap belongs to no
timeline and is not drawn; {"id": X} with its ID X addresses it. A
derived elision has no ID: the elisions a card derives on T, one on
each of its pieces (section 8.9: none, one or several, on either side of
the protected span), share the address {"id": T, "part": ["elision"]},
as every element drawn more than once does. A
stored elision clipped into several pieces (section 8.9) keeps its one
address on each, and so does a group elision on each of its drawings: its
gap across the frame of each group its timeline lies in and every gap of
it carried into an ancestor card. Its ellipsis, one in each drawing of
its gap, keeps its one address in every drawing, as its labels do in
every card that draws them.
One timeline may be drawn more than once: as a member in the frame of each group that has it as a member, as an ancestor line of several members, in the ancestor card behind each frame holding a member below it (section 8.8), or in several of these. An element drawn more than once, such a timeline with its cards, descendants, bands, maps, regions, flow-control elements, named timestamps and elisions, an ancestor line, and the parts of each, keeps one address, which every drawing of it carries. No address names a group but the group’s own frame and title. So a rule selecting that address styles every drawing of it (section 2.5), and an application that selects or marks an element by its address marks every drawing of it.
2.3 Selectors#
A selector is an object with any of these members:
element: an element type;addresses: a non-empty list of distinct addresses (section 2.2); it matches an element whose address equals one of them as a whole object, so{"id": "score"}matches the line ofscoreand its ancestor lines, never its bands, cards or wedges. An address is open like every object: a member other thanid,facetandpartis an unknown key (README, “Unknown keys”), and the address holding it matches no element;domain,modality: a domain, a modality;class: a timeline class (section 2.1) or a conversion-map type, or the IRI of a class, compact or full, which matches every region whosetypestatement (README, “Describing a manifest”) names that class and no other element. The two IRIs are compared expanded: in a selector, of every layer, the prefixttsstands for the format’s namespacehttps://timetoalign.github.io/timetoshare/ns#, another compact IRI is expanded by the manifest’s@context, which must declare its prefix (the validators refuse it otherwise,iri), and a full IRI is itself; each value of a region’stypestatement is expanded by the manifest’s@context(Python’sexpand_iri, npm’sexpandIri), a value it does not expand being itself. So{"element": "region", "class": "tts:AtomicSection"}matches the atomic sections (README, “Atomic sections”), which the defaults hide (section 4), and the rule{"select": {"element": "region", "class": "tts:AtomicSection"}, "set": {"display": "inline"}}
in a manifest’s
graphicalshows them, as an editor’s toggle “Atomic sections”, in the properties of a regions band and of a flow control band, writes it and removes it. It is one rule, whichever band’s properties show the toggle: it shows every atomic section of the manifest, each held by the regions band of the timeline that holds it and drawn only where that band is displayed (section 2.4);facet: a facet (section 2.1); it matches the bands drawing that facet;within: a timeline ID; it matches the elements belonging to that timeline or to any of its descendants;inside: an element type; it matches the elements held, at any depth, by an element of that type in the tree of section 2.1 (so{"element": "name", "inside": "ancestor"}matches the names of ancestor lines and no other name).coordinates:primaryorsecondary; it matches the elements of a named timestamp’s primary coordinate, or those of its secondary coordinates (section 2):wedgeelements and thelabelelements of their stacks, the partsname,idandcoordinate. It matches no other element: not a cross-section line, which belongs to its timestamp as a whole and marks no one coordinate, nor an alignment anchor or its label, nor any element that is no named timestamp’s.
An element matches a selector when it matches every member present. The
empty selector {} matches every element. A band is selected as every
element is: {"element": "band"} matches every band, {"facet": "regions"} every regions band, {"addresses": [{"id": "score", "facet": "regions"}]} the regions band of score, and {"inside": "band"} everything that bands
hold, the bands of every timeline but a member drawing’s root included,
since a child is held by its parent’s children band.
A timestamp’s coordinates are selected so too: {"element": "wedge", "coordinates": "secondary"} matches the wedge of every secondary
coordinate of every named timestamp, and the rule
{"select": {"element": "wedge", "coordinates": "secondary"}, "set": {"display": "inline"}}
in a manifest’s graphical shows those wedges, which the defaults hide
(section 4), still turned −45 by the defaults, since the rule outranks
every default rule by its layer and sets no rotation (section 2.5); the
same rule with the selector {"coordinates": "secondary"} shows their
labels too, and one selecting {"element": "wedge", "coordinates": "primary"} restyles the own wedge of every timestamp at once.
2.4 Properties#
Presentation properties carry SVG’s names and values where SVG has the
property; the writers map them to TikZ (section 7.4). content,
max-width, shadow, rotation, label-display, flow and the four
elision properties are the format’s own; a turned wedge is written by its points, never with a
transform (section 7.2).
Property |
Values |
Inherited |
Read by |
|---|---|---|---|
|
|
yes |
every type but |
|
a number ≥ 0 |
yes |
as |
|
|
yes |
as |
|
|
yes |
|
|
a number from 0 to 1 |
no |
every type but |
|
a number > 0 |
yes |
|
|
a number ≥ 0 |
no |
|
|
|
no |
|
|
|
no |
every type but |
|
a text, or |
no |
|
|
a number > 0, or |
no |
|
|
an integer from −180 to 180 |
no |
|
|
|
no |
|
|
|
no |
|
|
|
no |
|
|
|
no |
|
|
|
no |
|
|
the ID of a FlowMap of the card’s timeline, or of a virtual timeline applying such a FlowMap to that timeline without |
no |
|
flow is read from the manifest’s own graphical alone: a rule of
another layer setting it sets nothing. Only a rule of its rules whose
selector names addresses alone, each the address {"id": T, "part": ["card"]} of the cards of a timeline T, sets it, and a style never
does; both validators refuse any other use (README, “Identity”). An
ancestor card shares its root’s card address (section 2.2) but reads no
flow: it is always drawn as written.
A rule may set any property on any element; an element ignores the
properties its type does not read. display: none is the filter: an element
that is not displayed is not drawn and takes no room. An element is
displayed when its display is inline, no rule of this list hides
it, and, for an element of a named timestamp, of an alignment anchor or
of an elision, the timestamp’s, the anchor’s or the elision’s own
display lists its word (section 2; for an elision’s ellipsis
ellipsis, for its labels name, id or coordinate, and for its
continuations continuation, while its gap has no word), and, for a
label of a flow-control element’s stack or of an arc of a jump, the
element’s cascaded label-display lists its word (section 6.4, Flow
labels). The two are independent filters,
both of which an element of a named timestamp must pass: its display
array chooses what the timestamp draws at all, and the cascade’s display
property may still hide any one element of it, its wedge, any of its
labels or its cross-section line, as it hides any other element, while a
cascaded inline never draws an element its array leaves out. The list
holds every way in which one element hides another, and the other sections
refer to it:
A band hides everything it holds. A band that is not displayed hides every element it holds, at any depth of the tree of section 2.1, and a root’s flow control band also every element it lays out, the flow control of the root’s whole tree in that card (section 6.4, Gathering).
An element hides its label. The label of a region, the labels of a flow line’s stack, the label of each arc of a jump, and each ellipsis and label of an elision, is displayed only when that element, the arc, the elision’s gap, is displayed. A named timestamp’s labels are not its wedge’s (section 2.1), and its wedge hides none of them; nor are a jump’s stack, symbol and fork its arcs’, nor a flow line’s symbol its line’s: a jump whose arcs are hidden, as the defaults hide them (section 4), still draws its symbol, its fork and its stack.
A label hides its leader. A leader (section 6.6, Leaders) is displayed only when the label it joins, or the first label of the stack it joins, is displayed.
A line hides its timeline’s whole drawing. A line that is not displayed, the root’s and a child’s alike, hides its name, the maps, boundaries and segment labels on it (section 6.4), the cross-section lines and the gaps it holds (section 2.1), and its five bands with everything they hold, at any depth, its children and its segments with everything of theirs included. It takes no room, its stroke included: a child whose line is not displayed is not placed and has no row (section 6.4, Children), and section 6.5 states what a member drawing whose root’s line is not displayed still draws.
A segment without a line hides its bands. A segment that is not a segment line has no line of its own (section 6.1); when it is not displayed, its five bands and everything they hold are not displayed either, nor are the cross-section lines it holds (section 2.1), so it adds nothing to its segment line’s bands (section 6.4, Segments without a line) and draws no cross-section line. The boundary and the label of a segment, of either kind, are parts of its segment line’s line (section 2.1): that line hides them, the segment never does.
An ancestor line hides its name and its timestamps. An ancestor line (section 8.3) that is not displayed hides its name and what it holds of named timestamps (section 8.1): the wedges and labels of the coordinates on it and the cross-section lines of its timeline’s timestamps in that card; it has no row.
An ancestor card hides its drawing. An ancestor card (section 8.8) that is not displayed draws nothing of its member drawing, takes no room, and the block does not grow for it.
An elision leaves out what lies on its stretch. A displayed gap (section 6.6, Elisions), of a card elision in its card or of a group elision across a frame and in the ancestor cards behind it, leaves out every element there that marks a position in the gap (section 3.2), whatever timeline holds it, and cuts every row that crosses it, whatever its
displaylists. A gap that is not displayed leaves out nothing: its stretch is drawn at full scale, as without the elision, and so is every stretch of an elision a card does not draw (section 8.9).
No other element hides another. A frame or card that is not displayed
keeps everything drawn in it (section 8.4); a member’s line keeps its
ancestor lines, which are not part of its timeline’s drawing; a named
timestamp’s wedge, each of its labels and its cross-section line are
displayed or hidden each on its own, so hiding a timeline’s markers band
hides its timestamps’ wedges and labels and keeps their cross-section
lines; an alignment anchor’s line and its label are displayed or hidden
each on its own too, whatever the cross-section lines it joins show,
though a timeline line that is not drawn gives an anchor no end there
(section 8.7); and no band
takes its display from another: hiding the band {"id": "score", "facet": "regions"} hides the regions of score alone, and the regions of a child of score are drawn,
at the child’s own line, only when the child’s own regions band is
displayed. An atomic section is a region (README, “Atomic sections”)
and so is held by the regions band of the timeline that holds it, never
by a flow control band, which neither holds nor lays out a region: hiding
a root’s flow control band hides no atomic section, hiding the root’s
regions band hides the root’s own atomic sections alone, and the atomic
sections of a child, such as the movements of a work hold, are drawn
only when the child’s own regions band, and its line, are displayed. The flow-control elements of a child are held by the child’s
own flow control band (section 2.1) though the root’s band lays them out
(section 6.4): hiding the child’s line or its flow control band hides
them, and hiding the root’s flow control band hides everything it lays
out, the flow control of the root’s whole tree in that card. The
defaults hide no band (section 4).
2.5 The cascade#
The value of a property on an element is found per property:
Of the rules matching the element that set this property, the highest-ranking sets it.
When none sets it and the property is inherited, the element takes its parent’s value in the tree of section 2.1.
Otherwise the property’s initial value applies:
strokenone,stroke-width1,stroke-dasharraynone,fillnone,opacity1,font-size9,rx0,shadownone,displayinline,contentnone,max-widthnone,rotation0,elision-modeauto,elision-proportionauto,elision-depthsauto,elision-displayellipsis name,label-displayname label, andflownone, which no declaration writes: the card is drawn as written.
The rank of a rule is, from the most to the least significant:
its layer: a rule of a later layer outranks every rule of an earlier one;
whether its selector names
addresses;the depth of its
within: none is 0, the root 1, its children 2, and so on; deeper outranks shallower;whether its selector names
class,facetorcoordinates;whether its selector names
element;whether its selector names
inside;how many of
domainandmodalityits selector names;its position: the later rule of one list wins.
The cascade runs on each drawing of an element at its own place in the
tree. Drawings that share an address (section 2.2) match the same addresses,
within and element, but each inherits from its own parent and matches
inside by its own holders: the name of an ancestor line matches
{"inside": "ancestor"}, the name of the same timeline’s row in a card
that draws its line does not.
3. Numbers#
3.1 Positions on the root’s axis#
A position derived from time is a value on the root’s axis: a
coordinate of a timeline is carried to the root by adding the offsets of
its ancestors, from the root down. The root starts at the zero of its
number type (0, or 0.0 for a float) and ends at its length; a child of a timeline starting at s, with
offset o, starts at s + o and ends at that start plus its own length; a
region, flow-control element or named timestamp of a timeline starting at
s lies at s plus its coordinate. Each arc of a jump runs from the
jump’s own position, its from, to its to, s plus the place of
its destination on the timeline’s axis: for a to, the coordinate of the
jump target, the start of the region or the offset of the child timeline
it names, or 0 for the timeline itself; for a by, the jump’s coordinate
plus by. For a destination without a place, the timeline played is the
root of timelines whose tree holds the jump, whose flow control band
draws that tree’s elements (section 6.4, Gathering), and the to is the
place the README (“Flow control”) states, found on that root’s axis and,
for a member that is a child timeline, carried to the member’s (section
8.3):
A destination without a place lands at the nearest section break, not
unread (section 1), before its Jump on the axis of the timeline played, among those
of that timeline and of all its descendants, but never before the start of
the timeline stating the Jump, which counts as a section boundary for it:
where no such section break lies from that start up to the Jump, the
destination lands at that start. A destination with by 0 draws no arc,
nor does one whose to names nothing or names an unread element: as a
to naming a rejected element names nothing (README, “Flow control”),
a to naming an unread element names nothing to the drawing, so no arc
is drawn to that element’s place. In a valid manifest only a rejected
jump names a rejected element; under a reading, any jump may name an
unread one.
Where a length is null,
section 3.4 says where the timeline ends. A virtual timeline drawn as a
root is an axis of its own, its positions its own coordinates; where its
chunks lie on it, and where a switched card draws its timeline’s
elements, section 8.10 states, by this same arithmetic.
A coordinate’s value is read as its number type selects: a float value is
a float, an int or fraction value is exact. Values combine as Python’s
numeric tower combines them: the sum of two exact values is exact; a sum
involving a float converts each exact operand to the nearest double (ties
to even) and adds in IEEE 754 binary64 arithmetic, rounding to nearest,
ties to even.
The midpoint of two positions a and b, on which section 6 centres
a segment label, a region’s brace tip and label and the label of a jump’s arc, is
(a + b) / 2 in the same arithmetic: the sum a + b combined as above,
then halved, exactly when the sum is exact and as a binary64 division by 2
when it is a float. On a float axis it is therefore the double sum halved,
not the exact midpoint of the two doubles rounded once.
The format and both validators accept a child whose offset is negative, which starts before its parent’s zero. The readers of timetoalign and TimeLineEditor refuse such a child as not supported yet, and this version of the specification does not draw it.
3.2 From the axis to the canvas#
A position t on the root’s axis, with λ the root’s length, or its reach
when its length is null (section 3.4), becomes the proportion u = t / λ: an exact quotient when both are exact, then
rounded once to the nearest double; a binary64 division when either is a
float; 0 when λ is 0. Its x in item coordinates (section 8.2) is
x(t) = x0 + L × u
in binary64, x0 the start of the root’s line (section 8.2). This is the
only step from an exact value to a double, at any depth of nesting. A
label is spelled from the coordinate (section 5.2), never from the double.
The elided axis. A card that draws gaps (section 8.9: an ancestor
card, an ungrouped root’s card, or a member’s card in a frame with group
elisions) has an x-axis that is linear piece by piece: a sequence of
runs, the stretches drawn at full scale, parted by gaps. Each gap
lies over a stretch [a, b] of the root’s axis, a < b, no two gaps of
a card overlap, and every gap comes from a stored elision or is derived
by the card (section 8.9). A gap’s natural width is n = L × ub − L × ua, ua and ub the proportions of a and b, the products formed
first; its drawn width g (section 8.9) is at most n, and its
shrink is n − g. A position t lies in a gap when a < t < b,
compared exactly: the ends of a gap lie in none, but in the runs on
either side. A position in no gap has the x
x(t) = x0 + (L × u − D)
D being the sum of the shrinks of the gaps with b ≤ t, compared
exactly, each shrink formed first and the shrinks summed from the left.
Before the first gap D is 0 and x(t) is the value above, x0 + L × u; so every run keeps the scale L / λ of the card, a gap is drawn
x(b) − x(a) wide, and every position right of a gap lies its shrink
further left. The end of a root of unknown length (section 3.4) lies at
x0 + (L − D), D the sum of every shrink. A position in a gap has no
x: an element marking it is not drawn (section 6.6, Elisions). Wherever
sections 6.7 and 8.2 write L × u for a drawn position, it stands here
for L × u − D. Gaps move x alone: section 6 lays the card out as
without them, its first fits (section 6.3) measuring every extent by L × u, so that the card’s rows, slots, widths and ordinates are those of the
card drawn whole, and an element that is not drawn because it lies in a
gap keeps its room; only the label stacks of elisions (section 6.4,
Markers) are added to the card’s markers bands, each as high as the
lines it reaches in its drawn tier, which the gaps’ x set (section 6.6,
Elisions).
Seams. An ancestor card’s axis may also jump where it leaves nothing
out. A seam at a position m of the root’s axis parts two runs: the
run left of it ends at m and the run right of it starts at m, its
width w ≥ 0 further right. On an axis of one scale, the card’s
L / λ, a seam counts in D above as the shrink −w of every position
right of it, so everything right of it lies w further right; where the
runs on its two sides have scales of their own (section 8.8, Drawn once),
the section placing it gives each run’s x. A position at m
itself lies on the side the section placing the seam states (section
8.8). A seam is no gap and no elision: it lies in no gap, leaves out no
stretch, has no address and draws no rectangle, ellipsis, continuation
or label: it is no element of the drawing (section 1), and an application
listing a drawing’s elisions lists none. A row that crosses a seam, starting before m and ending
after it, compared exactly, is drawn across it whole, its line or
outline running on from the one run to the other without a break; an
element at a position other than m takes the x of the run it lies on.
Seams lie where an ancestor card’s member lies behind its frame (section
8.8, step 2) and where an arrangement changes the scale of a root drawn
once without leaving anything out (section 8.8, Drawn once).
The frame’s elided axis. The member drawings of a frame share x0
and L (section 8.2). A frame with group elisions (section 8.9) has one
elided axis for all of them, over proportions of the frame: each of
its gaps lies over a stretch [p, q] of proportions, 0 ≤ p < q ≤ 1,
with the natural width n = L × q − L × p; a position of proportion u
(its proportion of its member drawing’s root, section 3.2) lies in the
gap when p < u < q, compared as doubles, and one in no gap has the x x0 + (L × u − D), D the sum of the shrinks of the gaps with
q ≤ u, compared as doubles, summed as above. So a gap lies at one x in
every member card of the frame, the rows of every card, their
descendants and their ancestor lines read x through it, and the frame’s
first fits are as without its gaps.
3.3 Canvas arithmetic#
Every other number of a drawing is a double, computed in IEEE 754 binary64
in the order its formula is written, left to right, multiplications and
divisions before additions and subtractions, and a constant factor such as
4/3, 9.5w, 8w, 5.5w, 4w, 2w, 1.5w, 1.2w or 2.5w formed before it multiplies
(1.2w is the double nearest the exact product of 6/5 and w, not the
binary64 product of the double 1.2 and w). A distance outwards is
summed whole, left to right as written and a label gap of 2 included,
before it becomes an ordinate yl − o or yl + o, yl the ordinate of
the line of the timeline whose band it lies in (section 6.4); the
boundaries and segment labels of a line are offset from that line (section
6.4), the wedges and labels of the named timestamps on an ancestor line
from that line (section 8.3), and the label of a flow-control element’s
stack from the flow row (section 6.4). A label’s baseline is then that ordinate plus
a(9) or minus d(9). max and min compare exactly.
3.4 Timelines of unknown length#
A timeline whose length is null has an unknown length: the manifest
does not say where it ends, and the drawing never invents an end for it.
A root of unknown length is scaled to its reach; the end of a timeline of
unknown length is found by the rules below, and is marked as open where
they say so.
The reach of a timeline T is a value on T’s own axis: the largest
of the zero of T’s number type and of every coordinate its content
reaches on that axis, which is
for each child at offset
o,oplus the child’s length, or, when the child’s length isnull,oplus the child’s own reach, recursively;the
startand theendof each region;the
coordinateof each element offlow_control, and the place each destination with abyreaches; every other to of an arc (section 3.1) is a coordinate counted here, a region’s start, a child’s offset or 0, so it adds nothing further;the
coordinateof each named timestamp ofT(section 2).
Sums combine as section 3.1 combines values. The values compare exactly;
of several equal largest values, an exact one (int or fraction) is
taken before a float. Content counts whether or not it is displayed, so a
style never changes a scale. Conversion maps are not content. A timeline
without content, or whose content reaches no further than its start, has
the reach 0. The reach is a coordinate on an axis; the distances that
sections 6 and 8 call the reach of a map stack, a line, a band or a mark
are canvas distances outwards from a line, and have nothing to do with it.
The end. Every drawn timeline T starting at S (section 3.1) ends
at a position on the root’s axis, and its end is either known or
open. The first of these rules that applies gives it:
T’s length is a value:Tends atSplus its length; known.Tis the root of its member drawing: it ends atλ, its reach; open.Tis a segment followed by another segment, in canonical order: it ends where the next segment starts; known, since the segment line fixes it.Tis the last segment of its segment line: it ends where its segment line ends; known or open as that end is.Otherwise:
Tends atSplus its reach; open.
The reach does not follow these rules. A segment of unknown length that is followed by another counts towards its segment line’s reach as every child of unknown length does, with its offset plus its own reach, never with the end rule 3 gives it; so when its content runs past the next segment’s start, that content counts towards the reach all the same, and is drawn where it lies, past the segment’s end.
Xe, x of the end, is x of the end’s position (section 3.2), except
for an end that is the root’s under rule 2, directly or through rule 4,
where Xe = x0 + L whatever the reach. So the reach of a
root of unknown length lies at the end of the graphical length, and a root
whose reach is 0 is still drawn L long, every position of it at u = 0
(section 3.2). A line whose end is open ends in three chevrons (section
6.6), never in a mark that would assert a position.
4. Defaults#
The defaults are the lowest layer; an application may supply layers
between them and the manifest’s own graphical object (section 1).
{
"styles": {
"graphical-domain": {"stroke": "#FF0000", "fill": "#FF0000"},
"logical-domain": {"stroke": "#00CC00", "fill": "#00CC00"},
"physical-domain": {"stroke": "#0050EF", "fill": "#0050EF"}
},
"rules": [
{"select": {"element": "block"}, "set": {"fill": "#F3F4F6", "rx": 10}},
{"select": {"domain": "graphical"}, "set": "graphical-domain"},
{"select": {"domain": "logical"}, "set": "logical-domain"},
{"select": {"domain": "physical"}, "set": "physical-domain"},
{"select": {"element": "timeline"}, "set": {"stroke-width": 3}},
{"select": {"element": "child"}, "set": {"stroke-width": 3}},
{"select": {"element": "timeline", "modality": "continuous"}, "set": {"stroke-dasharray": "none"}},
{"select": {"element": "timeline", "modality": "discrete"}, "set": {"stroke-dasharray": "3 3"}},
{"select": {"element": "child", "modality": "continuous"}, "set": {"stroke-dasharray": "none"}},
{"select": {"element": "child", "modality": "discrete"}, "set": {"stroke-dasharray": "3 3"}},
{"select": {"element": "map"}, "set": {"stroke-width": 1}},
{"select": {"element": "map", "modality": "continuous"}, "set": {"stroke-dasharray": "none"}},
{"select": {"element": "map", "modality": "discrete"}, "set": {"stroke-dasharray": "1 1"}},
{"select": {"element": "wedge"}, "set": {"fill": "#000000"}},
{"select": {"element": "region"}, "set": {"stroke": "#000000", "stroke-width": 1, "stroke-dasharray": "none"}},
{"select": {"element": "region", "class": "tts:AtomicSection"}, "set": {"display": "none"}},
{"select": {"element": "jump"}, "set": {"stroke": "#000000", "fill": "#000000", "stroke-width": 1, "stroke-dasharray": "1 1", "display": "none"}},
{"select": {"element": "break"}, "set": {"stroke": "#D62728", "stroke-width": 1.5, "stroke-dasharray": "1.5 1.5"}},
{"select": {"element": "section_break"}, "set": {"stroke": "#4B5563", "stroke-width": 1.5, "stroke-dasharray": "4 2"}},
{"select": {"element": "barline"}, "set": {"stroke": "#6B7280", "stroke-width": 1, "stroke-dasharray": "none"}},
{"select": {"element": "symbol"}, "set": {"fill": "#000000", "font-size": 12}},
{"select": {"element": "fork"}, "set": {"stroke": "#000000", "stroke-width": 1, "stroke-dasharray": "none", "fill": "#000000", "font-size": 9}},
{"select": {"element": "leader"}, "set": {"stroke": "#9CA3AF", "stroke-width": 0.5, "stroke-dasharray": "none"}},
{"select": {"element": "boundary"}, "set": {"stroke": "#000000", "stroke-width": 1, "stroke-dasharray": "none"}},
{"select": {"element": "cross_section"}, "set": {"stroke": "#1BA1E2", "stroke-width": 1, "stroke-dasharray": "3 3"}},
{"select": {"element": "alignment_anchor"}, "set": {"stroke": "#1BA1E2", "stroke-width": 1, "stroke-dasharray": "3 3"}},
{"select": {"element": "ancestor"}, "set": {"stroke-width": 3, "opacity": 0.35}},
{"select": {"element": "ancestor", "modality": "continuous"}, "set": {"stroke-dasharray": "none"}},
{"select": {"element": "ancestor", "modality": "discrete"}, "set": {"stroke-dasharray": "3 3"}},
{"select": {"element": "frame"}, "set": {"fill": "#FFFFFF", "stroke": "#D1D5DB", "stroke-width": 1, "rx": 6}},
{"select": {"element": "card"}, "set": {"fill": "#FFFFFF", "stroke": "#C4C9D1", "stroke-width": 0.75, "rx": 5, "shadow": "#B8BEC8"}},
{"select": {"element": "ancestor_card"}, "set": {"fill": "#FFFFFF", "stroke": "#C4C9D1", "stroke-width": 0.75, "rx": 5, "shadow": "#B8BEC8"}},
{"select": {"element": "elision"}, "set": {"fill": "none", "stroke": "#9CA3AF", "stroke-width": 1, "stroke-dasharray": "2 2"}},
{"select": {"element": "ellipsis"}, "set": {"fill": "#000000"}},
{"select": {"inside": "ancestor"}, "set": {"opacity": 0.35}},
{"select": {"element": "cross_section", "inside": "ancestor"}, "set": {"opacity": 1}},
{"select": {"coordinates": "primary", "inside": "ancestor"}, "set": {"opacity": 1}},
{"select": {"element": "label"}, "set": {"fill": "#000000", "font-size": 9}},
{"select": {"element": "name"}, "set": {"fill": "#000000", "font-size": 11, "max-width": 160}},
{"select": {"addresses": [{"part": ["name"]}]}, "set": {"max-width": "none"}},
{"select": {"element": "name", "inside": "ancestor"}, "set": {"fill": "#6B7280", "font-size": 9, "opacity": 1}},
{"select": {"element": "label", "inside": "elision"}, "set": {"fill": "#6B7280"}},
{"select": {"coordinates": "secondary"}, "set": {"display": "none", "rotation": -45}}
]
}
So a timeline takes the colour of its domain, dotted when discrete and
solid when continuous (dotted: dashes and gaps as long as the stroke is
wide); a conversion map takes the colour and pattern of the domain and
modality it converts to; wedges and braces are black and solid, and the
regions that are atomic sections are hidden (section 2.3 shows the rule
that shows them); the arcs of jumps are thin, black and dotted, and
hidden, so that a jump shows its symbol, its fork and its stack, of
its name and its label by default (label-display, section 2.5),
alone until a rule shows its arcs ({"select": {"element": "jump"}, "set": {"display": "inline"}} all of them, with addresses one jump’s);
a break is a dotted red line, a section break a dashed dark blue-grey
one, a barline a thin solid dark grey one, darker than the light blue of
a cross-section line; symbols are black, at the font size 12, forks thin, black
and solid with texts of size 9, and leaders thin, solid and light grey;
a name longer than 160 is
cut (section 6.6), but the manifest’s title, whose addressed rule
outranks the rule of every name (section 2.5). Segment
boundaries are thin black rules; a named timestamp’s cross-section line is
thin, dashed and light blue, a blue distinct from the physical domain’s
(its rule names element, which outranks the domain rules, so a
cross-section line of a physical timeline keeps it, section 2.5), and an
alignment anchor’s line is drawn alike; an
ancestor line is its timeline’s line,
faded, and its name small and grey, while a timestamp named on its timeline keeps
the opacity 1 of a timestamp named on the member: its cross-section line
(its rule names element and inside) and the wedge and labels of its
primary coordinate (its rule names coordinates and inside) each
outrank the fading rule (section 2.5), so that a timestamp named on an
ancestor is drawn in the member’s card as one named on the member is,
only beside the ancestor line; a secondary coordinate on an ancestor line,
where a rule shows it, stays faded with the line; a group’s
frame is white with a light grey outline; a card is white with a grey
outline and a grey offset shadow, so that it stands out from the grey block
and from a frame alike. A card has its timeline’s domain and modality, so
a rule can style the cards of one domain. An ancestor card looks like a
card and is shown; a rule setting its display to none hides it
(section 8.8). An elision’s gap is not filled, so it draws nothing of
its own; its stroke, thin, dashed and grey, draws the continuations of
the rows across it where its display lists continuation (section
6.6); its ellipsis is black and its labels grey, as an ancestor’s name
is. The rules selecting a gap and an ellipsis name element and so
outrank the domain rules (section 2.5): a gap is unfilled and an ellipsis
black on every timeline. A rule of a later layer setting a gap’s fill
draws it as a filled rectangle under its ellipsis.
No rule hides a band: every band of every timeline is shown, a child’s
regions band included, and a child’s flow control is drawn in its root’s
flow control band (section 6.4). A chunk’s brace is a region and the
tick at its start a boundary (section 8.10), so chunks take the black
brace of a region and the thin black rule of a segment’s start, and
neither the rule hiding atomic sections, which selects by class, nor
any other default hides them; a gap of a FlowMap is drawn in the grey
#9CA3AF of an elision’s continuations, keeping its line’s own stroke
width and dash pattern, solid on a solid line and dotted on a dotted one,
never dashed in a pattern of its own (section 6.6, Gap lines). The last rule hides every wedge and
label of a secondary coordinate (section 2) and turns such a wedge −45, so that a wedge shown by a later
rule points at its coordinate from beside the cross-section line; only
the primary coordinate of each timestamp is drawn by default (section
2.3 shows the rule that shows the others).
The default band order of a root of timelines, and of a virtual
timeline, when graphical.order has no entry for it (section 6.4), is
["children", "conversion_maps", "line", "markers", "regions", "flow_control"]
So by default a root’s conversion maps lie against its line above it and
its children beyond them, its coordinate markers (its named timestamps’
wedges, with their labels) against its line below it, then its regions and
its flow control; its descendants follow it, so every child’s maps lie
against the child’s line above it and its own children beyond them, and
its named timestamps’ wedges against its line below it. The ancestors of a
member that is a child timeline all put their children above their lines,
so their faded lines lie below the member, beyond every band of its below
side (section 8.3). A cross-section line crosses its whole card, in every
band order: it has a gap where its own timestamp’s wedge and labels stand,
and crosses every other wedge and label at its x (section 6.6).
5. Text#
5.1 The fonts#
Every text is drawn in DejaVu Sans 2.37, the file DejaVuSans.ttf of
that release (SHA-256
7da195a74c55bef988d0d48f9508bd5d849425c1770dba5d7bfc6ce9ed848954). Every
code point Noto Music maps and DejaVu Sans does not, such as those of the
Musical Symbols (U+1D100 to U+1D1FF), Byzantine Musical Symbols and Ancient
Greek Musical Notation blocks, is drawn in Noto Music 2.004, the
unhinted file NotoMusic-Regular.ttf of that release (SHA-256
26c0a28d7c6f96c70f1401db23066c5ea0ee1cdf155c79bc01ad2efb040de816), as
the whole note 𝅝 (U+1D15D) of a coordinate label is (section 5.2). Both
files are shipped in this repository under fonts/, with their licences
DejaVuSans-LICENSE and NotoMusic-LICENSE (the SIL Open Font License).
Kerning and ligatures are off everywhere.
Text is measured from the fonts’ advance widths, never from a rendering.
One table, fonts/dejavu-sans-2.37+noto-music-2.004.metrics.json, holds
them: units_per_em (2048), ascender (1901) and descender (483, as a
positive depth) from DejaVu Sans’s hhea table, fallback (the advance
of DejaVu Sans’s glyph 0, 1229), and advances, keyed by the code point
in decimal: the advance of every code point DejaVu Sans maps, and of every
code point from U+0020 on that Noto Music maps and DejaVu Sans does not,
Noto Music’s advance scaled to 2048 units per em and rounded to the
nearest integer, ties to even. No code point below U+0020 is listed: each
becomes a space before it is measured (the last paragraph of this
section), and DejaVu Sans maps none. With A the sum of the advances of a
text’s code points (an integer; a code point the table does not hold, one
neither font draws, counts fallback, and the drawing lists it), the text
at font size s has
Measure |
Value |
|---|---|
width |
|
ascent |
|
descent |
|
line height |
|
A name may hold any code point. Every code point from U+0000 to U+001F in a text becomes a space before it is measured or written, since SVG and TeX cannot carry most of them. IDs hold none: the schema refuses them.
5.2 Coordinates#
A coordinate is labelled with its pretty text, rounded for the
drawing: its number, a space (U+0020) and the pretty unit of its
unit, or, in seconds, a clock with no pretty unit after it. A pretty unit
is a symbol (♩, 𝅝), an abbreviation (ms, smp, uu), or else the
unit’s name (ticks, css_pixels). Only the text is rounded: the element carries the exact
coordinate (section 1), and no position is computed from its label.
Unit |
Pretty unit |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
any other unit |
the unit’s name ( |
css_pixels has no abbreviation, since px is the pretty unit of the
discrete pixels: a coordinate in CSS pixels is labelled with the unit’s
name, 800.0 css_pixels.
The value a label shows is a position of section 3.1, a float or an exact
value, or, on a secondary coordinate, that position written in its
timeline’s number type (section 2): a float on a float axis, an integer
on an int axis and an exact value on a fraction axis. Its number is
written as follows; a negative value is written
as its magnitude preceded by -.
A float is rounded to three decimal places as Python’s
round(x, 3)rounds it: the exact value of the double to the nearest multiple of 1/1000, ties to even, the result being the double nearest that multiple. The result is spelled as Python’sreprspells it. So 312.48979591836735 is written312.49, 6.718756.719, 0.06250.062, 6.06.0and 1e-050.0: a float shows at most three decimals and keeps the.0that marks a float axis.An integer on an
intaxis is written in decimal, its digits grouped by three from the right with one space between groups:514 041 smp,-1 234 567 smp,999 smp.Any other exact value is a fraction
n/din lowest terms. Whendis at most 2520 (the least common multiple of 1 to 10) it is written mixed: its integer part when that is not 0, then, when a remainderris left,r/d, with a space between the two when both are written. So 219/16 is written13 11/16, −3/8-3/8, 33and 10001000: the digits of a fraction are never grouped. Whendis greater than 2520 and has no prime factor other than 2 and 5, the value is written as its decimal, which ends, with every place it needs (1/4096 is0.000244140625). Otherwise it is written≈, a space, and the value rounded to twelve decimal places, ties to even, with all twelve places: 1/2521 is≈ 0.000396667989and −1/2550≈ -0.000392156863, the≈before the sign.
A value in seconds is written as a clock. Its magnitude, rounded as
above (a float to three places, an approximated fraction to twelve), is
split into whole hours, whole minutes and the seconds that remain, written
{hours}h{minutes}′{seconds}″ with the prime ′ (U+2032) and the double
prime ″ (U+2033): the hours only when they are not 0, the minutes when
they are not 0 or follow hours, the seconds always, and each part that
follows a written part with its integer part padded to two digits. The
seconds are written as the value is. Those of a float are the decimal its
repr spells, with only the places they need and none when they are
whole: 312.48979591836735 is labelled 5′12.49″, 42.5 42.5″, 75.0
1′15″, 3725.0 1h02′05″, 3599.9996 1h00′00″ and 1e-05 0″. Those of
an exact value are mixed, a decimal that ends or approximated, as above:
151/2 is 1′15 1/2″, 121/2 1′00 1/2″, 1/2 1/2″, 1/4096
0.000244140625″ and 153001/2550 ≈ 1′00.000392156863″; an integer’s
are plain digits, never grouped (3725 is 1h02′05″, −3600 -1h00′00″).
The sign, and ≈ before it, precede the whole clock.
5.3 Names and labels#
The name of a timeline is its name, or, when name is null, its whole
id, which is never parsed (original_score:dgt_1 is named
original_score:dgt_1). A
conversion map has no name or label in the drawing. A region’s label is its name, and a region whose name is null has none; the label of
each arc of a jump is its destination’s label, never that
destination’s manifestation, which its symbol shows (section 6.4,
Symbols), nor the jump’s own label, and an arc whose destination’s
label is null or absent has none; a flow line or a jump has a
stack of up to three labels, its name, its whole id and its own
label, each where it is not null, of which it draws those its
label-display lists (section 6.4, Flow labels), so that the jump’s own
label and name label the jump once, never each of its arcs; a jump
target draws no label; the text of a branch of a fork is its
destination’s passes as printed (section 6.4, Forks); a segment’s label is
its name, and a segment whose name is null has none; a named
timestamp has three labels, its name, its whole id, and its
coordinate, labelled as section 5.2 labels a coordinate, in its
timeline’s unit, and draws those its display lists (section 2). An
elision has three labels: its name label, its name, or the name of
the timeline it lies on where it has none (an elision a card derives
always the latter); its id label, its whole id (a derived elision has
none, so it draws no id label); and its coordinate label, the pretty
text (section 5.2) of the start of its gap’s elided coordinates without
its pretty unit, – (U+2013) and the pretty text of their end, both on
that timeline’s own axis, so 1–31 ♩ and 600–1 754 px; in seconds
both values are clocks, 55.5″–1′30″. The start and end are those of the
gap as drawn (section 8.9): a clipped elision shows the stretch of its
piece, a derived one the coordinates its gap leaves out. The title of a
group, or of the manifest, is its name, or, when name is null, its whole
id. A manifest with neither a name nor an id, an
anonymous bundle, has no title.
6. Layout#
6.1 Traversal#
The traversal lists the timelines in pre-order: the root, then each
child in canonical order (by offset, compared by exact value, then by ID,
compared by Unicode code point, whatever the order of the children keys), each followed by its own descendants.
A timeline whose is_segment_line is true is a segment line; its
children are its segments, contiguous from its start to its end. Every
segment lies on its segment line’s line, which shows where it starts by a
boundary and its name by a label (section 6.4), both hidden with that
line (section 2.4). A segment that is not a
segment line has no line of its own: wherever this section speaks of its
line, it is its segment line’s line.
A segment that is itself a segment line is drawn as a child line in its
segment line’s children band (section 6.4, Children), and its own segments
lie on that line; neighbouring
segments drawn so meet end to start, the start circle of one inside the
open diamond of the other (section 6.6).
6.2 Constants#
Distances marked with S depend on the card spacing S of the member
drawing (section 8.6), the gap between its rows and between its bands;
every other size is fixed. With the default S = 4 every distance is the
number it has always had.
Constant |
Canvas units |
|---|---|
padding |
8 |
gap between the name column and the root’s start |
8 |
gap between bands |
|
row pitch |
max(10 + S, h(s)) |
map double-line spacing |
2 |
map gap |
3 |
wedge: base, height |
6, 13 |
label gap (marker to label) |
2 |
label separation (horizontal, between labels) |
2 |
brace height |
6 |
region row pitch |
6 + 2 + Tk × h(9) + S |
first jump depth |
4 + S |
jump row pitch |
6 + S + Tk × h(9) |
flow label offset (from a flow-control element’s |
3 |
symbol gap (between a glyph box and the lines it meets) |
2 |
symbol row height |
2 + h(zs) + 2, |
fork: stem length, branch length, largest angle step, largest angle |
8, 18, 35°, 70° |
fork text offset (from a branch’s tip to the start of its text) |
3 |
fork row height |
(h(zf) / 2 + 18 × sM) + h(zf) / 2, |
boundary half-height |
8 |
gap line of a FlowMap’s gap (section 6.6): stroke colour, stroke width, dash pattern |
|
group frame padding |
8 |
card padding |
8 |
gap after the manifest’s title |
8 |
gap after a frame’s title |
4 |
card shadow offset |
2 |
standard gap of an elision |
32 |
ellipsis: dot radius, dot spacing, narrowest gap drawing one |
2, 6, 20 |
s is the name font size of children bands laid out together (section
6.4, Children): the largest font size of the names of the lines in their
rows, displayed or not (section 6.6); a child whose line is not displayed
has no row. A row whose lines contribute
no name (a row of segment lines, section 6.6) counts the font size the
name of its first line has under the cascade. The root’s row counts on
its own: its pitch p0 takes the root’s name size alone. A row’s name
size and pitch are the s and p of the children bands laid out
together whose row it is, at any depth, and the root’s name size and p0
for the root’s row; so all rows of children bands laid out together have
one pitch. Wherever h(9), a(9) or d(9)
appears in section 3.3, anywhere in section 6 or in section 8, 9 stands
for the largest font size of the drawn labels of the band in question, and
is 9 when the band draws no label; every line at level 0 (section 6.4)
counts as a band of its own, whose labels are its segment labels. So a
regions band whose regions have no drawn label still keeps the label room
2 + h(9) in each row pitch prk, and is as wide as one with labels of size
9. The labels of a flow
control band are the drawn labels of its arcs and of its stacks
together, so its jump rows and flow label tiers share one size; a
fork’s text is no label and counts for no h(9), its row taking
h(zf) instead.
6.3 First fit#
Several steps below place items one at a time, in a given order, into
numbered rows (or tiers) 1, 2, 3, …: an item goes to the lowest row
holding no item whose extent conflicts with its own. Extents are x
intervals measured from the root’s start, at any depth of the member
drawing, each end computed as L × u (section 3.2) and never as a
difference x − x0, so no row depends on x0; an extent named by
positions below runs from L × u of the one to L × u of the other.
[a1, b1] and [a2, b2] conflict when a1 < b2 and a2 < b1, or when
a1 = a2. So an item that starts where another ends shares its row, and
two items starting at the same point never do. The extent of a label is
[left − 1, right + 1], so labels keep the label separation apart: for a
label of width wi centred on a position of proportion u, [L × u − wi / 2 − 1, L × u + wi / 2 + 1], and for the stack of a flow-control
element, wi the width of its widest label, [L × u + 3 − 1, L × u + 3 + wi + 1], each end computed left to right. Every band fills its own
rows.
6.4 Levels and bands#
Every timeline’s bands. Every timeline drawn with a line of its own,
the root and every child at any depth alike, has its five bands, one for
each of its facets (section 2.1), at its own line, and this section lays them out for each such
timeline whose line is displayed (section 2.4) as for the root: a band’s timeline is the timeline it belongs
to, and “its line”, “above” and “below” are that timeline’s. yl is the
ordinate of a timeline’s line: y_root for the root (section 6.5), and for
a child the ordinate its row gives it (Children). A segment that is not a
segment line has its bands at its segment line’s line (Segments without a
line).
The band order. The band order of a timeline lists line, its
own line, and its five facets, each standing for the band drawing it, from
top to bottom. A timeline without an entry in the manifest’s
graphical.order (section 2; README, “Groups and the graphical
object”) follows its inherited order: its parent’s band order, and
for a root of timelines the default band order of section 4. A member
that is a child timeline follows its parent so too. Changing a timeline’s
band order therefore changes that of every descendant without an entry of
its own. An entry lists line and any of the facets; it is completed
against the inherited order: the listed entries keep their order, and
every facet it leaves out keeps the side of line it has in the inherited
order and lies beyond the listed entries on that side, in the inherited
order’s sequence, the facets left out above the line before the listed
entries and those below after them. For a root, ["markers", "line"] is
so ["children", "conversion_maps", "markers", "line", "regions", "flow_control"], ["regions", "line"] is ["children", "conversion_maps", "regions", "line", "markers", "flow_control"], and
["line"] the default; a child of that first root stating ["line", "children"] has ["conversion_maps", "markers", "line", "children", "regions", "flow_control"]. The bands listed before line lie above
its line, those after it below: up and down, whichever side of its
parent’s line it lies on.
What a band holds. A band draws what its own timeline holds of its facet (section 2.1), and what another timeline holds only where a segment without a line of its own joins its segment line’s bands (below), and in the flow control band of the root (below):
the markers band its coordinate markers (Markers): the wedges and labels of its named timestamps (section 2), and the label stacks of the elisions lying on its timeline, never their cross-section lines, which its timeline’s line holds (section 2.1); no timeline’s start or end is marked in it, and a flow line is drawn by the flow control band, never by the markers band (section 2.1), so the markers band of a timeline that draws no wedge and no label of a named timestamp or an elision draws nothing and is absent (Levels);
the conversion maps band its maps (Conversion maps);
the children band its children (Children);
the regions band its regions (Regions), and, on the line of a virtual timeline or the root line of a switched card, before them the braces of the chunks of its FlowMap and the labels of its gaps (section 8.10);
the flow control band of the root, the flow control of the whole tree (Flow control): its symbols, flow lines, forks and the arcs of its jumps, with their labels and stacks; the flow control band of any other timeline draws nothing and is never present.
Gathering. Flow control holds across descendants, so the root’s flow
control band draws the flow-control elements of the root and of every
descendant, at any depth, segments included, each at its position on the
root’s axis (section 3.1), whichever timeline states it; no other
timeline draws a flow control band. Each element keeps its place in the
tree of section 2.1, held by the flow control band of the timeline that
states it, so that the cascade, within and the hiding of section 2.4
treat it as that timeline’s: a child whose line or flow control band is
not displayed draws none of its elements, and they take no room. The
root’s flow control band is present when it is displayed and draws an
element, of the root’s or of a descendant’s; when it is not displayed,
it draws nothing of the whole tree it lays out and is absent (section
2.4). When
the root of the member drawing is a member that is a child timeline
(section 8.1), its flow control band draws, besides the elements of its
own tree, the elements of every other timeline of the tree of its
top-level root, the root of timelines above it, whose position on the
member’s axis (section 8.3: an ancestor’s coordinate plus ts, compared
exactly) lies from 0 to λ, both included, λ the member’s length or
reach (section 3.4); those of the elements that lie outside the member’s
own tree are held by the member’s flow control band. So a section of a
movement drawn as a member shows the repeats, the voltas and the jumps
of the movement and of the work that lie in its stretch. An arc is drawn
in such a band only where its to lies in that stretch too.
An element that is not displayed (section 2.4) is drawn in no band and takes no room.
Levels. A timeline’s line lies at level 0. A band is present
when it draws an element, and in a row of one band order also when the
band of its facet of another line of the row is (Children); the present
bands above the line are the levels
1, 2, … outwards, level 1 being the present band listed nearest before
line in its band order, and those below it the levels −1, −2, …,
level −1 being the present band listed nearest after it. An absent band
has no level and takes no room. A distance o outwards from a timeline’s
line lies at yl − o above and yl + o below.
Where a band lies. Each band is laid out from its start c, a
distance outwards from its timeline’s line, so that a band starting at c = 0 lies against the line; the paragraphs below place its content from
c. A band’s width is the distance its content reaches outwards from
c, and its outer edge is c plus its width, the width summed first.
The band at level 1, and the one at level −1, starts
at
c = 0when it is the markers band or the conversion maps band, each of which lies against the line and shares its room with the line’s own reach (Level 0, below): its outer edge is then the larger ofcplus its width and the line’s reach on that side;otherwise at
Sbeyond the larger of the line’s reach on that side andw / 2,wthe line’s stroke width, so that its content keeps the gapSfrom the line’s stroke even where the line reaches nothing.
Each further band starts at the outer edge of the band at the level before
it plus S. A children band’s own start is instead the larger of the
start these rules give it and pl / 2, wherever it lies, pl the row
pitch of its timeline, the pitch of the row its line lies in (section
6.2; p0 for the root), so that the rows of a side, its timeline’s
included, lie one pitch apart when nothing widens them; the band starts
as Children lays it out, together with the children bands of the other
lines of that row. A conversion maps band’s own start is the start these
rules give it, and the band starts as Conversion maps lays it out, together
with the conversion maps bands of the other lines of its row. The markers band
and the conversion maps band are two bands, never over each other: on one
side they lie at two levels, the outer starting at least S beyond the
outer edge of the inner. The outer edge of a side of a timeline is
that of its outermost band there, or, when no band is present there, the
line’s reach on that side.
The order of the starts. A band’s own start needs the outer edge of the band at the level before it, and the start of bands laid out together needs the own start of each of them. Children bands laid out together may lie at different levels; conversion maps bands laid out together lie at one level, and are kept apart where their lines’ children bands lie on different sides of them (Conversion maps). So no start needs itself, and the starts of one side of a row are found step by step, until every band is laid out: each step lays out a band, with every band laid out together with it, once every band that lies between one of them and its line is laid out. Every order of the steps gives the same starts.
Level 0. A timeline’s line reaches out on each side as every line does
(Segment lines, below): by its map stack (Conversion maps) and, when it is
a segment line or draws the boundaries of chunks (section 8.10), by its
boundaries, k both ways, and above by its segment
labels, which belong to the line and to no band, so its segment labels lie
beyond the maps against it. A drawn boundary spans k to either side of
the line, so a line with a drawn boundary reaches at least k on both
sides. A markers or conversion maps band at level 1 or −1 thus lies over
the line’s boundaries, and every other band beyond them and its segment
labels.
Conversion maps. The conversion maps band of a timeline holds its displayed maps (section 2.4) and those that its segments without a line join to it (Segments without a line). The present conversion maps bands of the lines of one row (Children) that lie on one side of those lines, at one level, are laid out together, also when there is only one, in one sequence of numbered slots that their maps share, except that those whose line’s children band on that side lies nearer the line are laid out together apart from the others, whose line’s children band lies further out or is not present there. Bands of one row on different sides, or at different levels of one side, are laid out apart. So no conversion maps band waits, through children bands, on its own start (Where a band lies, The order of the starts):
Their maps are taken in the traversal order of their lines (section 6.1), each line’s own maps in canonical order before those its segments join to it, segment after segment in traversal order, each segment’s in canonical order.
A map’s key is its
nameand itstypewhen itsnameis not null, else itstypealone. Keys are ordered by comparing Unicode code points: those with a name by name, then by type; those without after every key with a name, by type. An ID keys nothing: IDs are unique, so no two maps would ever share a slot.The maps of each key are placed, in the order they are taken, by first fit (section 6.3) into that key’s sub-slots, each with the extent of the timeline it spans, from that timeline’s start to its end (sections 3.1 and 3.4). The sub-slots of the keys, the keys in key order, are the slots 1 to
J. So maps of one key share a slot where their timelines do not conflict, and take the next where they do, whichever line of the row holds them; a band leaves empty every slot in which it holds no map.The bands start at one distance
c0outwards from their timelines’ lines, the largest of their own starts (Where a band lies), soc0 = 0at level 1 or −1. Withwthe largest stroke width of their lines, the map in slotjis centredc0 + w / 2 + j × (g + d) − d / 2from the line of its band’s timeline, on the bands’ side, so that slot 1 liesgbeyondc0 + w / 2and each next slotgbeyond the one before; and each of the bands ise = w / 2 + J × (g + d)wide, whichever slots its own maps take.
At level 1 or −1 a line’s conversion maps band is the line’s map stack
on that side, which reaches e from the line; on every other side the
line’s map stack is empty and reaches 0. A map spans its timeline, from
Xs to Xe. A band places its maps, and section 7.2 writes them, in the
order they are taken.
Which lines form a row is decided by Children: the root’s row holds the root alone, and every other row is one that the first fits of children bands laid out together fill. The slots depend on nothing else of the layout: only on which lines form the row, the displayed maps their bands hold, the extents of the timelines those maps span, and the side and level of each band and on which side of it its line’s children band lies.
Segment lines. Every segment of a segment line except its first (in
canonical order) has a boundary: a thin vertical rule at x of the
segment’s start, k to either side of the segment line’s line. A line’s
boundaries are those of its own segments, drawn on it; the boundary of a
segment that is itself a segment line lies on its segment line’s line, not
on its own. The labels
(section 5.3) of the segments of one segment line, in canonical order, are
placed by one first fit into segment-label tiers above its line, each
centred on x of the midpoint (section 3.1) of its segment’s start and end (the
end of section 3.4, so a segment of unknown length ends where the next
segment starts, and the last where its segment line ends). Tier
n has its baseline at y − (m + 2 + (n − 1) × h(9)) − d(9), y the
line’s ordinate and m the largest of the reach e of the line’s stack
above, the width of its markers band when that band lies at level 1, and,
when the line has a drawn boundary, k, so that the segment labels lie
beyond the band against the line above, whichever of the two it is. A segment
that is not a segment line has no row, no name in the name column, and no
element type: a selector naming element never matches it, only its
boundary or label. A line therefore reaches above m plus 2 + T × h(9) when its labels fill T ≥ 1 tiers, and m when they fill none; and below the larger of its stack’s reach below and,
when it has a drawn boundary, k. “Above” is up whichever side of its
parent’s line the line lies on, as for every band.
Segments without a line. A segment that is not a segment line has no
line of its own, and its bands lie at its segment line’s line: what each of
its displayed bands holds joins its segment line’s band of the same facet,
after the segment line’s own content, segment after segment in
traversal order, and that band draws it and lays it out as it lays out its
own. So the segment’s maps lie in its segment line’s conversion maps band,
each spanning the segment and taking a slot by its key and extent as every
map of that band does (Conversion maps), not after the segment line’s own
maps, so that the maps of one key on two segments may share a slot; its
children in the children band, its regions
in the regions band, and its named timestamps’ wedges and labels in the markers band, each at
the segment’s start plus its coordinate (section 3.1); its own band order
places nothing. Its named timestamps’ cross-section lines, which it holds
itself (section 2.1), are drawn as every cross-section line, across the
card, their gaps where their wedges and labels stand in its segment
line’s markers band (section 6.6).
Section 2.4 states when a segment adds nothing. A band of a segment line
is present when it draws anything, of its own or of its segments, also
when its own display is none, since each segment’s bands are displayed
or hidden on their own (section 2.4).
Markers. The markers band of a timeline draws its named timestamps, in
canonical order (section 2), and after them those that its segments
without a line join to it, segment after segment in traversal order, each
segment’s in canonical order (Segments without a line): of each timestamp
its wedge and its labels (section 5.3), those that are displayed (section
2.4), at X, x of its position (section 3.1). After them it draws the
secondary coordinates (section 2) on its timeline and on those segments,
of every named timestamp whose cross-section lines cross its line in the
card, in the canonical order of their timestamps, each by its wedge and
its labels at X, x of the line, as a timestamp of the band is drawn;
the defaults hide them (section 4), and one hidden takes no room. A
timestamp’s displayed
labels form its stack, one label per line in the order name, ID,
coordinate, the first nearest the wedges; a timestamp without a
displayed label has no stack. The stacks are placed by one first fit
(section 6.3), in the order of their timestamps, into tiers: each stack
is one item, as many lines high as it has labels, whose extent is that of
one label as wide as its widest label, centred on X. A tier is as many
lines high as its highest stack, and each of its stacks starts on its first
line. Counting lines outwards from the wedges’ room (section 6.6), from
1, the label j of a stack in tier k lies on line n = m1 + … + m(k−1) + j, mi the
height of tier i in lines. The band is w / 2 + 13 wide when it draws
no label, or w / 2 + 13 + 2 + T × h(9) (left to right) when its tiers
hold T ≥ 1 lines together, w the stroke width of its timeline’s line,
T the line count here; section 6.6 places
the wedges and the labels from the band’s start. This is each stack’s
unturned place, where it lies when its timestamp’s wedge has the
rotation 0: at the thick end of the wedge, beyond its base. The room of
the wedges lies between the line and the labels whether or not a wedge is
displayed, so that showing or hiding a wedge moves no label; a band whose
timestamps draw labels and no wedge is as wide as with them. A turned
wedge carries its stack round with it, from its unturned place to the
thick end of the turned wedge (section 6.6, Labels of named timestamps);
the tiers, the first fit and the band’s width are those of the unturned
places, so that turning a wedge moves no other label and takes no room
in its band.
After the secondary coordinates the band takes the room of the label
stacks of elisions on its timeline: of every gap the card draws for an elision
lying on the timeline (section 8.9) whose display lists a label, a card
elision’s and a derived one’s in the card that draws the gap, a group
elision’s in the card of its own timeline in each frame that draws its
gap, never a gap carried into an ancestor card, in the order of the gaps
from the left. Each gap has one stack, its labels in the order name, ID,
coordinate, the first at the top, the words of the elision’s
display, of a derived elision the card’s elision-display, choosing
them. A stack enters the band’s first fit after the stacks of the named
timestamps’ coordinates, primary and secondary, as their stacks do, one
item as many lines high as the lines it reaches in its drawn tier
(section 6.6, Elisions): m1 + … + m(k − 1) + j for a stack of j
labels in drawn tier k, mq the height of drawn tier q in lines, so
j in drawn tier 1. Its extent is that of one label as wide as its
widest label centred on L × um, um the proportion
(section 3.2) of the midpoint (section 3.1) of its gap’s piece on the
root’s axis (section 8.9), and for a group elision (p + q) / 2 of its
piece in the frame, in binary64: its place at full scale,
so that its tier in the band does not depend on the widths of the gaps;
its height does, through its drawn tier. It lies at
its unturned place beyond the room of the wedges, which an elision leaves
empty. The band takes the stack’s room there, so the stack’s room sets
the band and the card’s rows, but the stack is drawn centred below its
gap’s ellipsis, in its drawn tier (section 6.6), whether or not the
ellipsis is drawn, so that showing or hiding an ellipsis moves no label. A band holding a
displayed elision label is present, and its width counts the tiers as for
a timestamp’s labels.
A child’s present markers band is one of its bands like any other: it takes a level, widens its side and so its edge, and its row takes that room (Children). The band never holds a cross-section line: a named timestamp’s cross-section line is held by its timeline’s line (section 2.1), is drawn when it is displayed, whether or not its wedge, its labels or this band are, and takes no room in any band (section 6.6).
Children. The children band of a timeline places its displayed children that have a line of their own, every child that is not a segment and every segment that is a segment line, in canonical order, by first fit. Each is placed as a whole: its line together with everything its own bands draw, at any depth, laid out from its line by this section.
A child has two extents, each found from its own subtree alone, from the deepest timelines up, before any first fit of its parent’s band:
its line extent, the smallest interval that holds the extent of its line and the line extents of its own children that have a line of their own, at any depth: what its lines alone reach;
its whole extent, the smallest interval that holds its line extent and the extent of every item that a first fit of its own drawing places at any depth (its segment labels, the stacks of named timestamps’ labels, the regions and region labels of its bands, each at its own extent whichever tier it lies in, and the whole extents of its own children; a child draws no flow control, section 6.4, Gathering), a stack where its wedge carries it, its extent’s centre moved by its carry
vx(section 6.6, Labels of named timestamps):[(L × u + vx) − wi / 2 − 1, (L × u + vx) + wi / 2 + 1], and the extent[L × u + a, L × u + b]of every wedge it draws,uthe proportion of the position it marks andaandbthe smallest and the largest of 0,13 × s − 3 × kand13 × s + 3 × k, the offsets of its points fromX(section 6.6, Wedges), so[L × u − 3, L × u + 3]for a wedge not rotated. These items are those of the child’s drawing laid out alone, the child the one line of its row and its descendants’ bands laid out together only among themselves (Rows of one band order, below), so that a turned wedge carries its stack from the tier that layout gives it (section 6.6), whatever tier the drawing as a whole gives it.
The cross-section lines a child draws add nothing to either extent: each
lies at a position of its timeline and takes no room (section 6.6). Nor
do the maps it draws, at any depth: each spans a timeline that lies
within the line it is drawn at, so no first fit of this paragraph
depends on a map’s slot. Neither extent depends on the row, the level or
the tier of anything outside the child’s subtree, so both are known
before the first fit that places the child. Children bands laid out together (below) are
aligned when every child they place has one band order (The band
order). The lines of a row are those that the first fits of their
parents’ children bands, laid out together, place in it, and the root’s
row holds the root alone; so which bands are laid out together, and
whether they are aligned, is known row by row from the root outwards,
each time from the band orders of children whose parents’ rows are
already known. Aligned bands place each child by its line extent: a
child keeps its row whatever the width of its labels, which the rows
keep apart by their label tiers instead (Rows of one band order, below).
Bands that are not aligned place each child by its whole extent.
The extent of a line runs
from its start to its end; when its end is open (section 3.4), it runs on
to L × u + 9.5w, u the proportion of its end and w
its stroke width, so that its three chevrons (section 6.6) take room in its
row: 9.5w is the distance from the end to the outer chevron’s tip. This
end of the extent is summed as written, L × u plus the constant 9.5w
(section 3.3), measured from the root’s start like every extent and only
compared, never computed from Xr; the drawn tip, and the right edge of
section 6.7, is Xr + 5.5w. So a child placed by bands that are not
aligned takes the room of its whole drawing, also where that reaches
beyond its span, as a label wider than the child does, and every child
the room of its children, as the content of a segment of unknown length
that runs on past the next segment’s start (section 3.4). Since an item
that starts where
another ends shares its row (section 6.3), the segment lines among one
segment line’s segments lie in one row when nothing of theirs reaches
beyond their spans.
A child’s edge on a side is the outer edge of that side of its own drawing (Where a band lies). The lines of a row lie at one ordinate: the root’s row holds the root, and every other row is a row of children bands laid out together. The present children bands of the lines of one row that lie on one side of those lines, above or below, are laid out together, also when there is only one:
They start at one distance
c0outwards from their timelines’ lines, the largest of their own starts (Where a band lies).Each places its own children by its own first fit, and their rows are numbered together: row
kholds every child that any of them places in its rowk, and lies at one distancelkoutwards from their timelines’ lines.Row
khas an inner half (towards their timelines’ lines) and an outer half: each isp / 2,ptheir row pitch (section 6.2), or the largest edge of rowk’s children on that half’s side, whichever band places them, when it is larger. The outer half’s side is the bands’ own side and the inner half’s the opposite one, so a child in a band above its parent’s line has its own above side in its row’s outer half.With
ikandokthe inner and outer halves of rowk, row 1 lies atl1 = c0 + i1and rowk + 1atl(k+1) = lk + (ok + i(k+1)). A band whose children fillCrows isi1 + o1 + i2 + o2 + … + iC + oCwide, summed left to right: its own rows, with the halves they have together.
A child in row k has its line at yl − lk, yl its parent’s, when its
band lies above its parent’s line and at yl + lk when it lies below, and
its own bands lie outwards from its line. The lines of a row lay out their
own children bands together in turn, at every depth, so the sections of a
row of movements share their rows whichever movement holds them.
Rows of one band order. The lines of a row placed by aligned children bands have one band order and lay out their bands together, facet by facet, so that a label of one line reaching over the span of another lies among the labels of its own facet alone, which one first fit over the row keeps apart:
On each side, the band of each of the five facets is present for every line of the row when it is present for one of them (Levels), so that the bands of one facet lie at one level; the band of a line that holds nothing of that facet draws nothing and takes the room of the others.
The bands of one facet at one level start at one distance
c0outwards from their lines, the largest of their own starts (Where a band lies), and each is as wide as the widest of them.The markers bands place the stacks of all of them, line after line in the traversal order of the lines (section 6.1), each line’s in the order its own band takes them (Markers), by one first fit into one set of tiers.
The regions bands place the regions of all of them, line after line in that order, by one first fit into one set of rows, and the drawn labels of each row by one first fit into that row’s label tiers (Regions), so that
Tk,prkandakare the same for all of them; a label in tierj ≥ 2is joined to its brace by a leader.The segment labels of the row’s segment lines are placed, line after line in that order, by one first fit into one set of segment-label tiers, at one
m, the largest of their lines’m(Segment lines), so that every line of the row reaches as far above; a label in tiern ≥ 2is joined to its segment by a leader (section 6.6, Leaders).
Their children bands and conversion maps bands are laid out together as every row’s are (above; Conversion maps). The root’s row holds the root alone, and the lines of a row placed by children bands that are not aligned lay out these bands each alone.
The layout takes three passes. First every first fit, which uses extents alone (section 6.3), so that which row holds which line, every row’s name size and pitch (section 6.2), and then every map’s slot and the count of slots of every conversion maps band (Conversion maps) and the first fits of the rows of one band order (above), which need the rows alone, are known before any distance is. Then the distances, from the deepest rows up: once every row of the children bands of a row’s lines has its halves, each of those lines has the starts and widths of its bands, in the order of the starts (Where a band lies), and so its edges, and the row its halves (the root’s row the outer edges of the root’s sides, section 6.5). Last the ordinates, from the root’s line (section 6.5) down.
No two children’s drawings overlap, and no two names of rows (section 6.6) do, but that two wedges may overlap where they mark positions closer than their widths, as two wedges of one timeline may, and that the stack of a turned wedge in a row of one band order, which the row’s first fit may put in another tier than its line laid out alone, is carried from that tier and may then lie elsewhere than the whole extent of an ancestor counts it (section 6.6): in a row of one band order the extents keep the lines and their children apart, and the first fits of the row the regions and the labels. The extents of two lines of a row never overlap, and meet at most where one ends and the other starts: one band places both by one first fit, or the bands of two lines of one row place them within those lines’ extents; and each row takes on each side the room that its children’s drawings take there. Rows laid out together lie at least a pitch apart, since every half is at least half the pitch, and the rows of the children bands of a row’s lines lie within that row’s room on their side (its half, or the root’s side) and at least half that row’s pitch beyond its ordinate; so any two rows lie at least half the sum of their pitches apart, and a row’s name is at most its row’s pitch high (section 6.2).
A child that is not displayed is not placed; section 2.4 states what it hides.
Regions. The regions band of a timeline places its displayed regions,
in canonical order, by first fit with the extent from the smaller to the
larger of their start and end, never widened by their labels, into R
rows: a region keeps its row whatever its label’s width. On the line of a
virtual timeline or the root line of a switched card, the chunks of its
FlowMap come first, in the order of chunks, each an item whose extent is
its drawn span, a gap among them (section 8.10), and then the regions.
Then the drawn
labels of each row, in the order of their regions, are placed by one
first fit of that row, each with the extent of a label centred on Xm
(section 6.6, Regions), into the row’s label tiers: tier 1 is where
the label lies beside its brace, and tier j lies (j − 1) × h(9)
further out. Row k, whose labels fill Tk tiers, or Tk = 1 when it
has no drawn label, has the pitch prk = 6 + 2 + Tk × h(9) + S (section
6.2), so that a row without a label that needs a second tier is as high
as it has always been. Row k has its brace’s arms at ak = r0 + (pr1 + … + pr(k − 1)) from the timeline’s line, the pitches summed first and
a1 = r0, r0 the start of the band; the band is (pr1 + … + prR) − S
wide, summed left to right. A label in tier j ≥ 2 is joined to its
brace by a leader (section 6.6, Leaders). In a row of one band order the
regions bands of the row’s lines take these first fits together (Rows of
one band order).
Flow control. The root’s flow control band (Gathering) draws the
band’s elements: the flow-control elements it draws, taken in the
traversal order (section 6.1) of the tree they lie in, the tree of the
top-level root, each timeline’s elements in canonical order; the
elements of a timeline whose line or flow control band is not displayed
draw nothing and take no room (section 2.4), and every other draws each
of its parts that is displayed: a flow line its line and its stack, a
jump its arcs, which the display of the element jump governs, its
stack and its fork, and each its symbol. From its start c outwards
it holds:
the flow label tiers,
T × h(9)wide when the stacks (Flow labels) fillTlines, and 0 wide when the band draws no stack;the flow row at
f0 = c + T × h(9), where the flow lines end and the arcs of the jumps leave and arrive;the symbol row, from
f0tof0 + Hs(Symbols;Hs0 when the band draws no symbol);the fork row, from
f0 + Hstof0 + Hs + Hf(Forks;Hf0 when the band draws no fork);the jump rows of the arcs, beyond
f1 = f0 + Hs + Hf, each sum taken left to right.
The band is T × h(9) + Hs + Hf + (4 + S) + (pj1 + … + pj(K − 1)) + 2 + TK × h(9) wide for K ≥ 1 jump rows, and T × h(9) + Hs + Hf
wide for none, summed left to right as written, the pitches pjk of
section 6.2 summed first; so a band drawing nothing but flow lines
without labels is 0 wide and lies at the flow row of its start.
Flow labels. A flow line or a jump has a stack, the labels its
cascaded label-display lists (section 2.4) of the three it can have
(section 5.3), in the order name, ID, label, those whose text is null
left out; the initial name label draws its name and its own label,
so that naming an element shows its name. A displayed
flow line, or a jump, whose stack holds a label draws it, a jump whatever
its arcs show; a flow line that is not displayed draws none. The stacks, in the
order of the band’s elements, are placed by one first fit into flow
label tiers, each stack one item as many lines high as it has labels,
with the extent of section 6.3, starting at x + 3, x that of its
element’s position. A tier is as many lines high as its highest stack,
and each of its stacks starts on its first line. Counting lines inwards
from the flow row, from 1, the label j of a stack in tier k lies on
line n = m1 + … + m(k − 1) + j, mi the height of tier i in lines,
so the first label of a stack lies nearest the flow row: line n lies
at the distance fn = f0 − (n − 1) × h(9) from the timeline’s line, and
its label’s baseline at yl + fn − d(9) when the band lies below the
line and at yl − fn + a(9) when it lies above it, yl the root’s
line. T is the line count of the tiers together. The stack of a jump
in tier k ≥ 2 is joined to the flow row by a leader (section 6.6,
Leaders); a flow line needs none, since its line runs alongside its
stack. Each displayed arc of a jump whose label-display lists label
is labelled with its destination’s label (section 5.3).
Symbols. Each band element whose manifestation has a symbol draws
its symbol where the symbol is displayed, one symbol element, centred on x of its
position on the symbol row, in this table’s text, measured and written
as every text (section 5): the glyphs of Noto Music, in which section 5.1
draws every code point of the Musical Symbols block, and “Fine” in
DejaVu Sans:
Element |
|
Symbol |
|---|---|---|
jump target |
|
𝄆 U+1D106 |
jump target |
|
𝄋 U+1D10B |
jump target |
|
𝄌 U+1D10C |
destination of a jump |
|
𝄇 U+1D107 |
destination of a jump |
|
𝄉 U+1D109 |
destination of a jump |
|
𝄊 U+1D10A |
destination of a jump |
|
𝄌 U+1D10C |
barline |
|
𝄁 U+1D101 |
barline |
|
𝄂 U+1D102 |
section break |
any, or none |
𝄂 U+1D102 |
break |
|
the text |
A jump’s symbol is the symbols of its destinations, in the canonical
order of its targets, joined without a space into one text, centred as
one; a destination drawing a fork’s branch (volta) or an arc alone adds
nothing. Every other manifestation, of the format’s vocabulary
(volta, ossia) or not, has no symbol, nor has an element or a
destination without a manifestation, but for a section break, which
draws 𝄂 whatever its manifestation; an element without a symbol draws
no symbol element. A symbol is no label: it lies on the symbol row
alone, at its element’s x whatever its neighbours, so symbols of
elements lying close may overlap, and it is never placed by first fit
and never moved. With z its font size, its text line starts at f0 + 2, the symbol gap beyond the flow row, and its baseline lies beyond that
start: at yl + (f0 + 2) + a(z) when the band lies below the line and
at yl − (f0 + 2) − d(z) when it lies above it. Its glyph box is
its text line, from that start h(z) outwards, as wide as its text.
The symbol row is Hs = 2 + h(zs) + 2 wide, summed left to right, zs
the largest font size of the drawn symbols, so that every glyph box
keeps the symbol gap 2 to every line it meets: to the flow row, where
the flow lines end, and so, f0 never being negative, to the
timeline’s line, and to what lies beyond the symbol row, a fork, an arc
or the band’s outer edge. A flow line ends at the flow row (Flow lines)
and never enters the symbol row: it is not cut by a glyph but stops
short of it, so where a symbol lies at a flow line’s x, as the 𝄂 of a
section break does at its own line, the line ends 2 before the glyph
box, and no line runs through or touches a glyph.
Forks. The branches of a jump are its destinations whose
manifestation is volta and whose place an arc would have (section
3.1), a destination with by 0 included: a destination whose to
names nothing or an unread element is no branch. A jump with a branch draws one fork, where the fork is
displayed, and no arc for a branch (Arcs): the fork shows that the flow
leaves the jump on one of several ways, and its texts on which passes.
The branches are taken in the order of their places, compared exactly,
branches of one place in the canonical order of targets; of a fork of
N branches, branch k, counted from 1, has the angle θk = min(35, 70 / (N − 1)) × (k − 1) degrees, 0 for N = 1, and the
direction (ck, sk), the cosine and the sine of (θk × π) / 180
radians, each rounded to ten decimal places, ties to even, and read as
the double nearest that decimal (as a wedge’s, section 6.6, Wedges), so
that an engine whose sine errs by a few units in the last place draws
every fork alike. For instance:
|
angles |
|
|---|---|---|
2 |
0°, 35° |
(1, 0), (0.8191520443, 0.5735764364) |
3 |
0°, 35°, 70° |
(1, 0), (0.8191520443, 0.5735764364), (0.3420201433, 0.9396926208) |
4 |
0°, 23.3…°, 46.6…°, 70° |
(1, 0), (0.9182161069, 0.396079766), (0.6862416379, 0.7273736416), (0.3420201433, 0.9396926208) |
ck runs along the axis to the right and sk away from the root’s
line: the first branch runs straight on, the second bends away from the
line, as a motorway exit leaves the road, and every further one by one
step more; the step is 35° up to three branches, and from the fourth on
the branches share the 70° of the largest angle evenly, so the last
always bends by 70° and no two branches share a direction (their texts,
whose lines are h(z) high, may touch where the step is small). A fork has one size on
the canvas whatever the axis’s scale. With X the x of its jump’s
position, w its stroke width, z its font size, and e = (f0 + Hs) + h(zf) / 2 the distance of its stem from the root’s line, zf the
largest font size of the drawn forks (section 6.2), a fork draws:
its stem, a straight line at the distance
efromX − 8to its branch pointX;per branch
k, an arrow from the branch point, 18 long in the direction(ck, sk), ending in an arrowhead like an arc’s (section 6.6, Jumps): a filled triangle, not stroked, of length4wand half-width2w. Witha = 18 − 4 × w, its tip lies atx = X + 18 × ckand the distancee + 18 × sk, the centre of its base atx = X + a × ckand the distancee + a × sk, its first corner atx = (X + a × ck) + (2 × w) × skand the distance(e + a × sk) − (2 × w) × ck, and its second corner atx = (X + a × ck) − (2 × w) × skand the distance(e + a × sk) + (2 × w) × ck; its shaft is a straight line from the branch point to the centre of the base;per branch whose destination has
passes, its text, the passes as printed: the numbers ofpassesin ascending order, each followed by.and joined by,(1.,1., 3.), or for{from: n}nfollowed by.–(U+2013,3.–); a destination withoutpasseshas none. Each text lies at its own branch’s tip: it starts 3 right of the tip, atx = (X + 18 × ck) + 3, and its text line is centred on the tip, starting at the distancet = (e + 18 × sk) − h(z) / 2; its baseline lies beyond that start: atyl + t + a(z)when the band lies below the line and atyl − t − d(z)when it lies above it.
Each product is formed as written, each sum and difference taken left to
right as written, and each distance summed whole before it becomes an
ordinate, yl + d when the band lies below the line and yl − d when it
lies above it (section 3.3). So the fork row is as wide as the lowest tip
of a drawn fork lies beyond its start, plus half a text height: Hf = (h(zf) / 2 + 18 × sM) + h(zf) / 2 (section 6.2), N the most
branches a drawn fork has and sM the sk of the last branch of a fork
of N branches (0 for one branch, 0.5735764364 for two, 0.9396926208
for three or more), so Hf = h(zf) when no drawn fork has more than one
branch; room for every arrow
and every text, the first text’s line starting at the row’s start. A
fork is no label: it lies on the fork row at its jump’s x whatever its
neighbours, so forks of jumps lying close may overlap, as symbols may; it
is never placed by first fit and never moved, and its extent enters the
extents of section 6.7 as a symbol’s does.
Arcs. Each jump whose arcs are displayed (its element jump) draws one arc per destination, from
and to the positions of section 3.1, but none for a destination with
by 0 (going on, no jump), none for a destination whose to names
nothing or names an unread element (section 3.1), and
none for a destination whose manifestation is volta, whatever the
display of the element jump, since its jump’s fork shows it (Forks). The
arcs, jump by jump in the order of the band’s elements and each jump’s
in the canonical order of its targets, are sorted stably by span (the
absolute exact difference of their to and from positions), smallest
first, and placed by first fit with the extent from the smaller to the
larger of their from and to, never widened by their labels, into K
jump rows. Row k reaches its apex at the distance fk' = f1 + (4 + S) + (pj1 + … + pj(k − 1)) from the root’s line, the pitches
summed first, 4 + S the first jump depth, so an arc that encloses
another lies further out. Then the drawn labels of each row’s arcs, in
the order of those arcs, are placed by one first fit of that row, each
with the extent of a label centred on x of the midpoint of its from
and to, into the row’s label tiers: tier 1 starts 2 beyond the apex,
and tier j (j − 1) × h(9) further out. Row k, whose labels fill
Tk tiers, or Tk = 1 when it has none, has the pitch pjk = 6 + S + Tk × h(9) (section 6.2). A label in tier j ≥ 2 is joined to its arc’s
apex by a leader (section 6.6, Leaders). The band’s arc descriptors and
labels follow this order of first fit (section 7.2).
A flow-control element that the reading in force does not read
(section 1), a faded element, is drawn as any other and takes its
room as any other, but with its arcs or its line, its symbol, its fork,
their labels, its stack and their leaders at the opacity 0.35, which
replaces the cascaded opacity and no rule changes. The reading in
force also decides which arcs and branches a jump has and where a
destination lands (section 3.1, Forks, Arcs): an unread section break
is no section’s start, an unread jump target no place. Without a
reading, these follow the rejection of the README (“Flow control”), an
element some actor believes false.
Flow lines. A displayed flow line is a vertical line at x of its
position, from the flow row across the root’s line and every band to the
card margin V of the opposite side, inside its padding: from (x, yf), yf = yl + f0 below the root’s line and yl − f0 above it, to
(x, P + V) when the flow control band lies below the root’s line and to
(x, Hc − P − V) when it lies above it (section 6.5), ordinates of the
member drawing counted from its top (section 8.4). A flow line of a
descendant crosses every line and band in its way, as the root’s does.
6.5 Heights#
The root’s line lies at y_root = max(P + Ea, P + h(s) / 2) + V, Ea
the outer edge of the root’s above side (section 6.4), its descendants’
drawings included in its children band, and V the card margin of
the member drawing (section 8.6), drawn inside the padding above the
first row or band. The content’s height is
Hc = y_root + max(Eb, h(s) / 2) + V + P, Eb the outer edge of the below
side, the card margin drawn again inside the padding below the last row or
band. Where the member drawing has an ancestor band on a side (section
8.3), Ea or Eb is instead the outer edge of that band, which lies
beyond every other band of that side. Here s is the root’s row’s name
font size. So a card margin V
adds V to the card above its contents and V below them, and moves its
contents V down.
A root whose line is not displayed hides its whole drawing (section
2.4): none of its bands is present and its line reaches nothing, so the
outer edges of both its sides are 0. Its row remains, with the name size
s and the pitch p0 of section 6.2, which count its name although the
name is hidden. The formulas above then hold with Ea and Eb the outer
edges of its ancestor bands above and below (section 8.3), each 0 where it
has none: y_root = max(P + Ea, P + h(s) / 2) + V and Hc = y_root + max(Eb, h(s) / 2) + V + P. Each of its ancestor bands starts at
max(p0 / 2, S), the start of section 8.3 with the side’s outer edge and
wm 0. Such a member
drawing draws its displayed ancestor lines, with their displayed names
and what they hold of named timestamps (section 8.3, Named timestamps),
and nothing else, and lies in its card, Hm = Hc
high, as every member drawing does (section 8.4). One without a displayed
ancestor line draws nothing: y_root = P + h(s) / 2 + V and `Hc = y_root
h(s) / 2 + V + P`, and it gives section 8.2 no name, no centred label and no right edge.
6.6 Elements#
Every element below is drawn only when it is displayed, with the cascaded
values of its element. Xs, Xe are x of an element’s start and end;
y is the ordinate of its line (section 6.4); “outwards” points away from
the line of the band’s timeline, up in a band above that line and down in
one below it.
Root and children. A line with stroke width
wfromXs; a filled circle of radiuswcentred at the start. The end tells what the timeline is; the first of these that applies draws it:a timeline whose end is open (section 3.4) ends with three chevrons: the line runs on past
XetoXr = Xe + 4wand stops there, and three chevrons pointing right follow it, each1.5wlong and3whigh, each1.5wfurther right than the one before, so that the inner and the middle chevron each have their tip at the x of the next one’s arms:the inner chevron through
(Xr + w, y − 1.5w),(Xr + 2.5w, y)and(Xr + w, y + 1.5w);the middle chevron through
(Xr + 2.5w, y − 1.5w),(Xr + 4w, y)and(Xr + 2.5w, y + 1.5w);the outer chevron through
(Xr + 4w, y − 1.5w),(Xr + 5.5w, y)and(Xr + 4w, y + 1.5w), so its tip is atXr + 5.5w.
Each x is
Xrplus its own constant multiple ofw, each ordinateyminus or plus1.5w, oryitself, andXrisXeplus4w(section 3.3); no point is computed from another chevron’s. The line runs on4wpast its end and the glyph ends9.5wpast it, 12 and 28.5 with the default stroke width 3 of atimelineorchildline; these are distances, and the tip is written, and is the right edge (section 6.7), asXr + 5.5w. Relative toXr, the inner and middle chevrons lie where an ancestor line that runs on to the right draws its two (section 8.3), and the outer chevron is what tells the marks apart: three chevrons say that a timeline’s length is unknown, two that an ancestor line runs on beyond the member it is clipped to. An ancestor line never ends in three chevrons, whatever its length or the member’s, and an open end never in two. The three chevrons stand for a root, a child, a segment line or a member alike, locked or not: an end that is not known has no position for a circle, an arrowhead or a diamond to mark;a top-level timeline (a root of the manifest) whose end is known and whose
lockedis false ends with an arrowhead of length3wand half-width1.5wwhose base is atXeand whose tip is atXe + 3w, the line ending atXe, so that the drawn timeline is longer than its length; when it is a segment line, the arrowhead is open: the same triangle, stroked with widthw / 2and not filled, since prolonging it appends a segment;a top-level timeline whose end is known and whose
lockedis true ends with a filled circle of radiuswcentred atXe, like its start, the line ending atXe;a child timeline whose end is known, at any depth, ends with an open diamond of half-length
1.5wand half-width1.2wcentred atXeand stroked with widthw / 2, the line stopping at its left corner: the diamond marks where the child ends on its parent’s axis, and is the same whether the child’slockedis true or false. A member that is a child timeline ends so too, although its line is atimelineelement.
The circles and the arrowhead are filled and not stroked; the open arrowhead, the diamond and the chevrons are stroked and not filled, with no dash. Every arrow of a drawing follows one rule: its shaft ends at its head’s base, and the head continues the shaft’s direction at that point.
Boundaries. A line from
(X, y − k)to(X, y + k),Xthe segment’s start andyits segment line’s ordinate (section 6.4), orXthe drawn start of a chunk andythe ordinate of the line that draws it (section 8.10), drawn over the line.Segment labels. Centred on
xof the midpoint of the segment’s start and end, in its tier (section 6.4).Wedges. A filled triangle, not stroked, its tip at
X, at the distancec + w / 2outwards from the line of its band’s timeline,cthe start of the markers band (section 6.4) andwthe stroke width of that line, so that withc = 0the tip lies on the line’s edge. Itsrotationrturns it about its tip:ris the angle in degrees from the outward direction to the direction from the tip to the middle of its base, the base lying to the left ofXwhenr < 0and to the right whenr > 0, on either side of the line, so that a wedge turned −45 points at its coordinate from the lower left below the line and from the upper left above it. Withsandkthe sine and the cosine ofrdegrees, each rounded to four decimal places, ties to even, and read as the double nearest that decimal, its base’s corners lie atX + (13 × s − 3 × k)andX + (13 × s + 3 × k), at the distancesc + w / 2 + (13 × k + 3 × s)andc + w / 2 + (13 × k − 3 × s)outwards, so that withr = 0its base, 6 wide and centred onX, lies 13 further out than its tip. −180 and 180 draw the same wedge. The vertical throughXmeets a wedge turned by 13 to 167 in either direction at its tip alone; at 168 and beyond, up to 180, the base’s corners lie on either side ofXand the vertical runs through the wedge’s body. A wedge takes the room of an unrotated one: its band is as wide whatever its rotation, and what of it lies beyond that room takes none; its labels go round with it (Labels of named timestamps). The wedges of a markers band mark its named timestamps’ primary coordinates and the secondary coordinates on its timeline (section 6.4, Markers; section 2): a wedge of a primary coordinate is turned by 0 unless a rule sets itsrotation, and the defaults turn a wedge of a secondary coordinate −45 (section 4).Labels of named timestamps. A timestamp’s stack lies at the thick end of its wedge, centred on the wedge’s axis, the line from the middle of its base to its tip, which points at the coordinate; whether or not the wedge is displayed, the stack lies where the wedge would carry it. At its unturned place (section 6.4, Markers), the wedge’s
rotationbeing 0, each label is centred onX,xof its timestamp’s position, on its line of the band’s tiers: linenstartsc + w / 2 + 13 + 2 + (n − 1) × h(9)out,candwas for the wedges, the label gap included, and the label’s baseline lies beyond that start. A wedge turned by any otherrcarries its stack, kept upright, as one box: withsandkas for the wedges,jthe number of the stack’s labels,Wthe width of its widest label,H = j × h(9)its height andD = 13 + 2 + (n1 − 1) × h(9)the distance from the tip at which its first linen1starts at its unturned place, the box’s centre lies on the axis at the distancet = D + W / 2 × |s| + H / 2 × |k|
from the tip, summed left to right, so that the box lies wholly beyond the line that crosses the axis at the distance
Dfrom the tip at a right angle, and touches it: beyond the middle of the base by the label gap 2, and by the lines of the tiers before its own. The stack’s carry isvx = t × s: its labels are centred onX + vx, and the box’s centre liesc + w / 2 + t × kout, summed whole first (section 3.3). Its lines, eachh(9)high, fill the box from its side nearer the tip: whenk ≥ 0, lineiof the stack starts(c + w / 2 + t × k) − H / 2 + (i − 1) × h(9)out and its label’s baseline lies beyond that start, outwards; whenk < 0, the box lying across the line, lineistarts(c + w / 2 + t × k) + H / 2 − (i − 1) × h(9)out and its label’s baseline lies beyond that start inwards, away from the tip, as a label’s of a band on the other side of the line does. A wedge at the rotation 0 carries nothing (vx0). Section 8.3 carries the stacks of the named timestamps drawn on an ancestor line so.Cross-section lines. A vertical line at
X,xof its named timestamp’s position (section 3.1), across the whole card of each member drawing that draws its timeline’s line, or draws its timeline as an ancestor line and the timestamp on it (section 8.3, Named timestamps), the ordinates being of the member drawing counted from its top (section 8.4). LetTbe the timestamp’s timeline, whose line or ancestor line holds the cross-section line (sections 2.1 and 8.1), or, for a timestamp of a segment without a line, that segment’s segment line, whose line and bands are the segment’s (section 6.4, Segments without a line). The line runs from(X, yt)to(X, yb),ytthe top of the card andybits bottom, the card’s rectangle as sections 8.4 and 8.6 write it (an ancestor card’s as section 8.8 places it), its shadow not counted, whether or not the card is displayed: from the card’s upper border to its lower border, in every band order and whatever the card holds, less its gap, where the wedge and the labels of its primary coordinate stand on it. The gap spans these distances outwards fromT’s line,candwas for the wedges; on an ancestor line they are measured from it on its outer side, withc0,wits stroke width and the tiers of its row (section 8.3):when the wedge is displayed and the vertical through
Xruns through its body, that is when itsrotationis −12 to 12 or beyond 167 in either direction (Wedges): the distancec + w / 2of its tip and those of its two corners,c + w / 2 + (13 × k + 3 × s)andc + w / 2 + (13 × k − 3 × s);when its stack holds a displayed label and lies across
X, its labels being centred onX + vxand the widestWwide, so thatX + vx − W / 2 ≤ X ≤ X + vx + W / 2(Labels of named timestamps): the distances of the box’s two sides,(c + w / 2 + t × k) − H / 2and(c + w / 2 + t × k) + H / 2; at its unturned place, with its stack in tierk'andn1 = m1 + … + m(k' − 1) + 1its first line, the distancec + w / 2 + 13 + 2 + (n1 − 1) × h(9)at which that line starts and that distance plusj × h(9).
The gap runs from the smallest of these distances to the largest, each summed whole before it becomes an ordinate
y ± o(section 3.3),ythe ordinate ofT’s line andothe distance; with neither the wedge nor the stack counting there is no gap. What remains is drawn as up to two lines, from the top down, and a line of no length is not drawn. So a timestamp drawing its wedge, at the rotation 0, and its labels in tier 1 has its line run from the card’s border through its timeline’s line to the wedge’s tip, and on from the outer edge of its last label, the label gap between them left out too, to the card’s other border; a match timestamp drawing its line alone draws it from border to border. The line is cut nowhere else: it crosses every other element of the card atX, the lines of every other timeline, ancestor lines included, every band, the wedges and labels of other timestamps, and the wedges and labels of its own secondary coordinates, each of which keeps its ownrotation.A named timestamp whose timeline is drawn in several cards, as a member in the frame of each group that has it as a member, as a descendant in another member’s drawing, in an ancestor card (section 8.8), as an ancestor line of a member whose span holds its position (section 8.3), or more than one of these, draws its cross-section line in each, by this rule in that card. A cross-section line is drawn over everything else of its member drawing (section 7.2), takes no room, and widens no band or row. A match timestamp’s cross-section line is drawn by this rule, as every other; the alignment anchors that join such lines are drawn after every item (section 8.7).
A groupstamp (section 2) on a timeline
Tdraws further lines in the frame of each groupGthatTlies in, across the frame’s member cards. LetMbe the member ofGthat isTor hasTas a descendant. The lines lie atX,xof the timestamp’s position inM’s member drawing of that frame, whereT’s line holds the timestamp’s own cross-section line by the rule above. Every member drawing of a frame starts at the samex0and ends atx0 + L(section 8.2), the line of a member of unknown length at its reach (section 3.4, rule 2), so the line marks on every member the same proportion of its drawn length: of its length, or, on a member of unknown length, of its reach. Withytthe top of the topmost card of the members ofGwhose lines are drawn in the frame andybthe bottom of the bottommost, each card’s rectangle as sections 8.4 and 8.6 write it, its shadow not counted, whether or not the card is displayed, the line runs from(X, yt)to(X, yb): from the upper border of the topmost member card to the lower border of the bottommost, across the gaps between the cards and whatever lies between, lessM’s card, from its top to its bottom, which the timestamp’s own cross-section line crosses. What remains is drawn as up to two lines, aboveM’s card and below it, from the top down, and a line of no length is not drawn.The line lies within the drawn span of every member, a member of unknown length included, which it crosses up to its reach; but a proportion of a reach is no coordinate, so the line gives a coordinate without a value (section 2) on a member of unknown length other than
M, and on every timeline that member’s card draws, and, whenMhas an unknown length, on every member other thanMand every timeline their cards draw. Such a coordinate is shown as undefined, as a rule of the drawing that no style changes: the part of the line over the card of a member it gives no value, from the card’s top to its bottom, is cut out of the line above and drawn as a line of its own at opacity 0.35, the opacity the defaults give an ancestor line (section 4), in place of the opacity cascaded for the line; whenMhas an unknown length, both lines are drawn so, whole and uncut. On a timeline where the coordinate has no value, its wedge, where it is displayed, is drawn at opacity 0.35 in place of its cascaded opacity, and nocoordinatelabel is drawn, whatever itsdisplaylists, itsnameandidlabels standing as at any secondary coordinate. Where every member’s length is known, none of this applies.These lines have no gap: they cross secondary coordinates alone (section 2), and cross the wedges and labels of other timestamps and of those secondary coordinates where they meet them. The groupstamp’s own wedge marks its primary coordinate and is turned by 0 unless a rule sets its
rotation, as every named timestamp’s (Wedges). The positions of these lines are item coordinates of the frame, drawn at the frame’s place as every element of the frame is (section 8.6), and the lines take no room and widen nothing.Each of these lines, a faded one included, is a further drawing of the timestamp’s cross-section line (section 2.2): it carries the line’s address, belongs to
T, has no settings of its own, and is drawn when the timestamp’sdisplaylistscross_sectionand that line is displayed inM’s card of the frame, in the values cascaded for it there. It has no wedge and no labels, and nothing is drawn in a frame where the line holding the timestamp’s own cross-section line is not drawn. The timestamp’s wedge, its labels and its own cross-section line are drawn in every card as every named timestamp’s are.Maps. A closed double line: the outline of the rectangle from
XstoXeof the map’s timeline between the ordinatesyc − d / 2and `ycd / 2
,yc` the map’s centre (section 6.4), stroked and not filled.
Gap lines. Over the span of a gap of a FlowMap drawn on a line (section 8.10), from
XatoXb, the line itself is not drawn; a gap line stands in for it, from(Xa, y)to(Xb, y), stroked in the grey#9CA3AFwith the line’sopacity, its stroke widthwand itsstroke-dasharray, so that it keeps the line’s own stroke, solid on a continuous line and dotted (3 3with the default width 3) on a discrete one, and differs from the line in colour alone; it has no mark at either end. Its colour is fixed: the line’sstrokedoes not reach it, and a rule restyling the line changes its width, pattern and opacity alone. It is part of its line, carries its address and has no element of its own.Regions. A brace from
XstoXe, arms atyb, tip 6 further out atXm,xof the midpoint (section 3.1) of the region’s start and end, so it opens towards its timeline’s line; a chunk’s brace alike over its drawn span, and a gap of a FlowMap no brace, its label alone, placed as a brace’s label is; its label centred onXmbeyond the tip, 2 further out, in its label tier. The arms lie at the distanceakof their row (section 6.4), the tip atak + 6, and the line of the label’s tierjstarts atak + 6 + 2 + (j − 1) × h(9), the label’s baseline beyond that start, each distance summed whole, left to right, before it becomes an ordinate (section 3.3), never computed fromyb.Jumps. Each arc of a jump (section 6.4, Flow control) is an arrow from
(Xf, yf)to(Xt, yf),Xf = x(from),Xt = x(to)(section 3.1),yfthe flow row,wthe jump’s stroke width. Its curve is the cubic Bézier curve fromP0 = (Xf, yf)toP3 = (Xt, yf)with controlsC1 = (Xf + q, yc)andC2 = (Xt − q, yc),q = (Xt − Xf) / 4andyc = yf + 4/3 × (ya − yf),yathe ordinate of its jump row’s apex: the controls lie a quarter of the span inwards, so the curve reaches its apex halfway, and a short arc arrives steeply and a long one flatly. The arrow is placed as TikZ places an arrow tip on a curve: the head points along the curve’s direction at its end, the unit vectoru = (ux, uy)fromC2 = (Cx, yc)toP3,ux = (Xt − Cx) / ℓanduy = (yf − yc) / ℓ,ℓ = sqrt((Xt − Cx) × (Xt − Cx) + (yf − yc) × (yf − yc))(the correctly rounded square root); the head is a filled triangle, not stroked, of length4wand half-width2w, its tip atP3and its base centred atBh = (Xt − 4w × ux, yf − 4w × uy), its cornersBh − 2w × nandBh + 2w × n,n = (−uy, ux); the shaft is the curve with its end moved fromP3toBhand its controls kept, so it meets the head’s base at a right angle. The arc’s label is centred onxof the midpoint of its from and to, beyond the apex, 2 further out, in its label tier: the line of tierjof rowkstarts atfk' + 2 + (j − 1) × h(9)(section 6.4, Arcs), the label’s baseline beyond that start.Flow lines. The line of section 6.4 at
xof the flow line; its stack starting atx + 3, in its tier (section 6.4, Flow labels); a jump’s stack alike.Symbols. A text centred on
xof its element’s position, on the symbol row (section 6.4, Symbols), filled and not stroked.Forks. Its stem and the shafts of its arrows, stroked and not filled, its arrowheads and its texts filled in the fork’s
filland not stroked (section 6.4, Forks).Leaders. A leader joins a label or a stack moved out of its first tier to its element: a straight line at
X, from the element’s point to the near edge of the label’s line, in the leader’s cascaded stroke (by default thin and light grey, section 4). For the label of a region in tierj ≥ 2of rowk,X = Xm, from the distanceak + 6of the brace’s tip toak + 6 + 2 + (j − 1) × h(9); for the label of an arc in tierj ≥ 2of rowk,Xthexof the midpoint of its from and to, from the apexfk'tofk' + 2 + (j − 1) × h(9); for the stack of a jump in tierk ≥ 2,Xthexof the jump’s position, from the flow rowf0tofn1 = f0 − (n1 − 1) × h(9),n1the stack’s first line (section 6.4, Flow labels); and for the label of a segment, a child’s name on its segment line, in tiern ≥ 2(section 6.4, Segment lines),Xthexof the midpoint of the segment’s start and end, from the distancemabove its segment line tom + 2 + (n − 1) × h(9),mas that section defines it (in a row of one band order the row’s, section 6.4, Children). Each distance is summed whole, left to right, before it becomes an ordinate (section 3.3). A leader takes no room and crosses whatever lies between its ends. A label in its first tier, or a flow line’s stack, has none. So one rule holds for the labels of regions, of segments, of arcs and of jumps, and for a child’s labels in a row of one band order: the element keeps its row or its place whatever its label’s width, and the label moves.Names. For each row of lines (section 6.4, Children: the root’s row and every row of children bands laid out together, at any depth, so that all lines at one ordinate form one row), the names (section 5.3) of its drawn lines whose names are displayed, in traversal order, joined by
,; the line of a segment contributes no name, since its name is its label, so a row of segment lines alone has no name. When thecontentof the first of these names is notnone, the row shows that text instead (an editor sets it to give a row its own name, and resets it tonone). When the text is wider than that name’smax-width, it is cut to its longest prefix that, followed by…(U+2026), fits, and the cut text is shown. It is drawn starting atx = n(section 8.2), vertically centred on the row: baseline aty + (a(s) − d(s)) / 2,sthe font size of that first name, whose address the text carries. Name descriptors are ordered from the top row down.Elisions. A gap (section 8.9) over the stretch
[a, b]of the card’s root axis, or over[p, q]of a frame’s proportions (section 3.2), is the rectangle fromx(a)tox(b)(x(p)tox(q)), and from the topytto the bottomybof its card, the card’s rectangle as sections 8.4 and 8.8 write it, its shadow not counted; a gap across a frame (section 8.9, Group elisions) runs from the top of the topmost member card drawn in the frame to the bottom of the bottommost, as a groupstamp’s line does, over the cards and the gaps between them. It is filled with itsfilland not stroked, and draws no rectangle while itsfillisnone; the rectangle is its extent all the same, in which an application finds it. A row crosses a gap when it is a line or a map drawn in that card, or in one of the frame’s member cards, the root’s, a child’s or an ancestor line alike, whose span holds the whole gap: its start (section 3.1) at or beforeaand its end (section 3.4) at or afterb, compared exactly, or, across a frame, the proportions of its start and its end at or beforepand at or afterq, compared as doubles, the end of a member whose end is open (section 3.4, rule 2) counting as 1, and an ancestor line that runs on to the right (section 8.3) counting as open like it, so that it crosses every gap at or after its start; its ordinate is its line’sy, or a map’s centreyc. A row that crosses a gap stops atx(a)and resumes atx(b): its line or outline is drawn in pieces, from run to run, with no end mark where a piece stops at a gap and no start mark where one resumes after it, and nothing of it is drawn in the gap. A line or map whose start lies in a gap starts at that gap’s right edge, without a start circle, one whose end lies in a gap ends at that gap’s left edge, without an arrowhead, end circle, diamond or chevrons, and one whose start and end so meet or cross is not drawn. A line that really starts or ends at a gap’s edge keeps its mark there, since an edge lies in no gap. The pieces are written from the left, each a<line>of the line (for a map a closed outline over the piece), and then the line’s start and end marks (section 7.2); a piece that does not end right of where it starts, as where a line starts at a gap’s left edge, two gaps touch, or a child’s line ending at a gap’s right edge would stop at its diamond’s left corner before that edge, is not written.A gap draws, where its elision’s
displaylistsellipsis(for a derived elision the card’selision-display), exactly one ellipsis, never one per row: three filled circles of radius 2 centred atxm − 6,xmandxm + 6, at the ordinateym, withxm = (x(a) + x(b)) / 2the gap’s middle andym = (yt + yb) / 2the middle of its height,ytandybthe top and the bottom border of the card that draws it, or, for a gap across a frame, the top of the topmost and the bottom of the bottommost member card (section 8.9), in binary64; an ellipsis is not drawn in a gap narrower than 20,x(b) − x(a) < 20. Where itsdisplaylistscontinuation, each row that crosses the gap gets a continuation, a line from(x(a), y)to(x(b), y),yits ordinate, drawn in the gap’s stroke, under the ellipsis. Its labels, the stack of section 6.4 (Markers), are drawn with the ellipsis, centred onxmbelow it, whether or not the ellipsis is drawn, in the stack’s drawn tier. The stacks drawn under oneym, those of one card’s gaps or those of one frame’s gaps across its member cards, are placed by one first fit (section 6.3) into drawn tiers, in the order of their gaps from the left, each stack one item as many lines high as it has labels, its extent that of one label as wide as its widest label, each label cut as below, centred on the gap’s middle as section 6.7 places an elision’s label,(l + r) / 2: so the stacks of neighbouring gaps that would touch or overlap as drawn lie one below the other, as the stacks of named timestamps do in their band (section 6.4, Markers). A drawn tier is as many lines high as its highest stack, and each of its stacks starts on its first line. Thei-th label, from 1, of a stack in drawn tierklies on linen = m1 + … + m(k − 1) + i,mqthe height of drawn tierqin lines, and has its baseline atym + (2 + 2 + (n − 1) × h(9)) + a(9), the dot radius and the label gap belowym,h(9)anda(9)those of the markers band that takes the stack’s room, in the card that draws them; that band takes the room of every line up to the stack’s last (section 6.4, Markers). Gaps never move apart for their labels: no gap is widened and no proportion changes. Each label is cut to itsmax-widthas a name is cut (Names), never to the gap. Nothing else that lies on the stretch is drawn in a gap, but for the arc of a jump. An element that marks a position in a gap is not drawn: a wedge with its labels, a cross-section line, a groupstamp’s lines across a frame, a boundary, a segment label, a flow line with its stack, the stack of a jump, a symbol, a fork whose jump’s position lies in one, a region whose start, end or midpoint lies in one with its label, and an arc of a jump whose from, to or the midpoint of the two does with its label, each with its leader. A fork whose jump’s position lies in no gap is drawn whole at its elided x, of its one size, whatever gap it reaches. A region whose start, end and midpoint lie in no gap is drawn at their elided x, and its brace is cut at every gap it spans as a row is. Of the brace’s two straight parts atYm, fromX1 + ktoXm − kand fromXm + ktoX2 − k(X1,X2,Xm,kandYmas section 7.2 writes the brace), the part a gap meets leaves out the stretch from the larger of the gap’s left edge (x(a), orx(p)across a frame) and the part’s start to the smaller of its right edge (x(b),x(q)) and the part’s end, where that stretch has a length, with no tick or other mark at either end of the cut; cuts that touch are one cut, and the brace’s arms, its tip and its label are drawn whole. An arc whose from, to and their midpoint lie in no gap is drawn whole at their elided x, its arc across every gap it spans: the one element drawn in a gap that is not the gap’s own. A position at a gap’s edge lies in no gap, so a named timestamp there is drawn.
A label “beyond” a point at ordinate y lies outwards from it: below, its
baseline is at y + a(9); above, at y − d(9), with the label gap added
where stated.
6.7 Extents#
Section 8 places a member drawing in its card. Its names
are the name texts it draws, its ancestor names included, and every
centred label i it draws (segment and region labels and the labels of arcs, every
label of a named timestamp’s stack on its own, the labels of its
elisions, and its symbols, each centred on its element’s position, and
its forks, each counted as a centred label of width 16 on its jump’s
position, so that its stem reaches 8 left of it) has width wi and the proportion ui (section 3.2) of the
exact position it is centred on, and its carry vi: a label of a
named timestamp is centred at its timestamp’s position, moved by the
carry its wedge gives it (section 6.6, Labels of named timestamps;
section 8.3), a label of an elision at its gap’s middle (section 6.6,
Elisions), for which L × u stands for (l + r) / 2, l and r the
gap’s edges less x0: l = L × ua − D with D the shrinks of the gaps
left of it, and r = L × ub − D' with D' those and its own shrink
(section 3.2), so that no x0 enters it, and every other
centred label has the carry 0.
A centred label at X ends at (X + vi) + wi / 2. Its right edge is the largest right edge of any element it
draws (lines, markers, wedges, braces, arcs, forks, leaders, symbols, labels and names). Right
edges are geometric, no stroke width counted: a timeline’s start circle
Xs + w, its arrowhead’s tip Xe + 3w, its end circle Xe + w or its
diamond’s corner Xe + 1.5w, the outer chevron’s tip of an open end’s
three chevrons Xr + 5.5w, with Xr = Xe + 4w computed first (section
6.6; 9.5w past Xe only as a distance, never as the sum Xe + 9.5w),
the outer chevron’s tip of the two chevrons of an ancestor line that runs
on to the right Xr + 4w, with Xr = x0 + L + 4w computed first (section
8.3; 8w past x0 + L only as a distance), a map’s Xe, a boundary’s
or a cross-section line’s X, the largest x of a wedge’s three points
(section 6.6), X + 3 for a wedge not rotated, the largest x of
the points written in a brace’s or an arc’s descriptors (control
points and an arc’s arrowhead corners included), the largest x of the
points written in a fork’s descriptors (its arrowheads’ tips and corners
included), a
leader’s X, a gap’s x(b),
the right end xm + 8 of an ellipsis, and a text’s end from its advance
widths (a symbol’s and a fork’s texts included). In a card with gaps every x here is the elided one (section
3.2), and a line or map that ends in a gap ends at its left edge
without its mark (section 6.6, Elisions).
7. Writers#
7.1 The page#
A writer draws one or more drawings, each placed at a canvas position (X, Y) with a scale z (one drawing alone: (0, 0) and 1). The page is the
bounding box of the placed blocks, each W × z by H × z, plus a margin of
16 on every side: with left and top the smallest X and Y and
right and bottom the largest X + W × z and Y + H × z, the page is
PW = right − left + 32 wide and PH = bottom − top + 32 high, and a
drawing at (X, Y) lies at the page position (X − left + 16, Y − top + 16), y downwards. Canvas units are CSS pixels in SVG, whose viewBox
matches its unitless width and height, and points in TikZ.
7.2 Element descriptors#
A member drawing becomes a list of SVG element descriptors, in this
order: the flow lines; the maps; the regions; the arcs of the jumps; the
forks, each of these five
band by band in the traversal order of the bands’ timelines, and each
band’s in the order it places them (section 6.4: the flow lines and the
forks in the order of the band’s elements); the root and
then the children in traversal order; the boundaries, in the traversal order
of their segments (a nested segment line’s boundaries thus follow its own
boundary, not its siblings’); the wedges, band by band in the traversal
order of the bands’ timelines, and each band’s in the order it places its
timestamps and then the secondary coordinates on it (section 6.4,
Markers); the names; the marker labels, the labels of the named
timestamps’ coordinates in the same order, coordinate by coordinate,
each one’s in the order of its stack, its name, its ID and its
coordinate, whether or not its wedge is displayed; the leaders, in the
order of the labels they join below; the segment labels, in
the traversal order of their segments, the region labels, the labels of
the arcs and the labels of the stacks, each stack’s in its order, name,
ID, label, the stacks in the order of the band’s elements; the
symbols, in the order of the band’s elements; and last the cross-section lines, in
the order in which the markers bands place their timestamps, whether or not
a wedge, a label or its band is displayed, so that they lie over
everything else of the member drawing. Section
8.5 places them among the background, the titles, frames and cards, and
the ancestor lines. Every
descriptor carries the address of its element (section 2.2), the
background the block’s empty address {}; the several descriptors of one
element carry the same address. The SVG writer writes an address as up to
three attributes, each only when the address has its member: data-id,
the id; data-facet, the facet; and data-part, the words of part
joined by one space (data-part="start label"). The background so
carries none. An editor renders these same descriptors on
screen; the SVG writer serializes them. An element’s hit area is the
painted geometry of its descriptors, each standing for the element whose
address it carries; this specification gives no element a hit area beyond
them. So the three chevrons of an open end, part of their line like an
arrowhead, carry the line’s address {"id": T} and hit the timeline.
A point in a template ({p1}, {P0}, {P3}, {Bh − 2w × n}, …) is
written by where it stands. In a points attribute it is {x},{y}, its
two numbers formatted by section 7.3 and joined by a comma without a
space, and the points are separated by one space, as the polygon templates
spell out; this holds for the chevrons’ polylines and an arc’s arrowhead
too. In path data (d) it is its two numbers separated by one space, as
the brace below writes them, so an arc’s shaft M{P0}C{C1} {C2} {Bh}
opens like M290.9775 63.8555C253.4775 74.5221.
Element |
Descriptors |
|---|---|
background |
|
frame |
|
card, ancestor card |
when its |
a line’s start |
|
gap line |
|
arrowhead |
the line stops at |
open arrowhead |
the line stops at |
end circle |
the line stops at |
diamond |
the line stops at |
three chevrons |
an open end (section 6.6): the line stops at |
two chevrons |
an ancestor line running on (section 8.3): the line stops at |
wedge |
|
map |
|
region |
|
arc of a jump |
|
flow line: break, section break, barline |
|
fork |
its stem, |
leader |
|
symbol |
|
boundary |
|
cross-section line |
for each of its lines (section 6.6: up to two in a card, one on each side of its gap, and a groupstamp’s up to two in a frame), |
alignment anchor |
|
elision |
its gap, |
ellipsis |
|
name, label |
|
The stroke attributes are stroke, stroke-width and, unless it is
none, stroke-dasharray. A path carries fill="none" and a line no
fill; both carry the stroke attributes; a circle, a polygon
and a text carry fill, and the open arrowhead, the diamond and the map’s
outline, the stroked polygons, also the stroke attributes (the map’s dash
included); a polyline carries fill="none" and the stroke attributes; a
group frame, a card and an ancestor card carry fill and the stroke
attributes, a card’s shadow and an elision’s gap fill alone. A line’s descriptors are, in this order, its <line>,
or, where gaps of a FlowMap interrupt it, its pieces from the left, each a
<line>, and then its gap lines from the left (section 8.10), then
its start circle or left chevrons, and its end or right chevrons. Every
descriptor of an element, a card’s shadow included, carries the element’s
opacity, written when it is not 1. An
element without text is written self-closing (<line …/>); a text is written <text …>{text}</text>. Attributes are
written in this order, except the background’s, which follow its template
and then opacity: data-id, data-facet, data-part, the template’s geometric attributes
(x, y, width, height, x1 to y2, cx, cy, r, points, d)
in the order shown, rx, text-anchor,
font-size, fill, stroke, stroke-width, stroke-dasharray,
opacity.
The brace from X1 to X2, arms at Yb, tip at (Xm, Ya) (section
6.6): with Ym = (Yb + Ya) / 2 and k = |Ya − Yb| / 2, the path is M X1 Yb Q X1 Ym X1+k Ym L Xm−k Ym Q Xm Ym Xm Ya Q Xm Ym Xm+k Ym L X2−k Ym Q X2 Ym X2 Yb. A brace cut at gaps (section 6.6, Elisions) writes each of its
two straight parts as the pieces the cuts leave, from the left: the part
from X1 + k to Xm − k with the cuts [c1, c1'], …, [cj, cj']
becomes L c1 Ym M c1' Ym L c2 Ym … M cj' Ym L Xm−k Ym, every L to the
point the pen stands at left out, so that each M starts a piece after a
cut; the part from Xm + k to X2 − k alike. Path data is an upper-case
command letter followed by its coordinates, numbers separated by one
space, no space before a command letter (M80 16L74 14).
7.3 SVG profile#
Every number either writer writes, each number of a stroke-dasharray
included, is formatted by one rule: take the exact value of the double,
round it to the nearest multiple of 1/10000, ties to the even multiple;
write it in decimal without exponent, without a leading +, with its
integer part (0 when zero) and, when not an integer, a point and its
fractional digits without trailing zeros. A value that rounds to zero is
0, never -0.
The output is UTF-8, one element per line, no indentation, a final newline:
<svg xmlns="http://www.w3.org/2000/svg" width="{PW}" height="{PH}" viewBox="0 0 {PW} {PH}" font-family="DejaVu Sans, Noto Music" text-rendering="geometricPrecision" style="font-kerning:none;font-variant-ligatures:none">
<g transform="translate({X} {Y}) scale({z})">
...
</g>
</svg>
with one <g> per drawing, (X, Y) its position on the page, and
scale({z}) left out when z is 1. The font-family list names Noto
Music after DejaVu Sans, so that a renderer draws the code points of
section 5.1 that DejaVu Sans does not map in Noto Music. text-rendering="geometricPrecision"
keeps a renderer from hinting small text, which would move its glyphs off
the advance widths the layout measured. In text, &, < and > are written
&, < and >; in attribute values, so are they, and " as
".
7.4 TikZ profile#
Coordinates are bare numbers in points, y upwards: an SVG ordinate y of a
drawing of height H becomes H − y. With standalone (the default) the
output is a complete LuaLaTeX document:
\documentclass{standalone}
\usepackage{fontspec}
\directlua{luaotfload.add_fallback("music", {"[{font directory}/NotoMusic-Regular.ttf]:mode=node;"})}
\setsansfont{DejaVuSans.ttf}[Path={font directory}/,Kerning=Off,Ligatures={TeXOff,NoCommon},RawFeature={fallback=music}]
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[x=1pt,y=1pt,miter limit=4,font=\sffamily]
\definecolor{ts00CC00}{HTML}{00CC00}
...
\end{tikzpicture}
\end{document}
{font directory} is a writer option, . by default, the directory that
holds both font files. Noto Music is a luaotfload fallback of the sans
font, so that the code points of section 5.1 that DejaVu Sans does not
map are drawn in it. Without
standalone, the output is the tikzpicture environment alone. Each
colour used is defined once, right after \begin{tikzpicture}, as
\definecolor{ts<RRGGBB>}{HTML}{<RRGGBB>}, sorted by its digits. Each
drawing is a scope shifted to the TikZ position of its block’s bottom-left
corner, ({px},{PH − py − H × z}) for the page position (px, py) of
section 7.1 ([shift={(…,…)}], with ,scale={z},transform shape when z
is not 1).
Every descriptor of section 7.2 becomes one command, its attributes mapped one to one:
SVG |
TikZ |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Descriptor |
Command |
|---|---|
rect |
|
line |
|
circle |
|
polygon |
|
polyline |
|
path |
|
text |
`\node[anchor={base west |
An elision’s descriptors take these commands as every other rect, line,
circle and text does: its gap a rect with the fill option alone, its
continuations lines, the dots of its ellipsis circles with the
fill option, \path[fill=ts000000] (…,…) circle[radius=2];, and its
labels texts anchored base.
Options are written in the order of the attributes of section 7.2. In text,
\ becomes \textbackslash{}, ~ becomes \textasciitilde{}, ^
becomes \textasciicircum{}, each of # $ % & _ { } is preceded by
\, and a space at the start or end of a text or after another space is
written \ , so that TeX keeps it.
8. The block: frames and cards#
Every manifest is an alignment bundle and is drawn as one block,
whatever it holds: a manifest of one root as a block holding that root as
an ungrouped root, a manifest of one group as a block holding that group’s
frame, and every other manifest alike. The block opens with the
manifest’s title (section 5.3), which an anonymous bundle, with neither a
name nor an id, does not have.
Every timeline drawn as a root (a member or an ungrouped root, a virtual
timeline included, section 8.10) is drawn as
sections 3 to 6 draw a root, in a card: an ungrouped root and a placed
virtual timeline that is a member of no group in one card
of its own, a member in one card in the frame of each group that has it as
a member. The block’s items are
its frames and the cards of its ungrouped roots and placed virtual
timelines; each lies at its own place
(section 8.6) and has its own graphical length L. The member drawings of
one item share its L and one start x0, so that the members of a group
by definition start and end at the same points. The shared end is
x0 + L, found
from x0 and L alone and never from a length: a member or ungrouped
root of unknown length is drawn with its reach at the shared end (section
3.4), and its line runs on past it into its three chevrons (section 6.6).
8.1 What is drawn#
Groups. A block draws the manifest’s groups in canonical order (by ID), and then every ungrouped root, a root of
timelinesthat no group names as a member and that contains no member, in canonical order (by ID). A root that contains a member is no ungrouped root: it is drawn as an ancestor line of that member and, unless a rule hides it, whole in an ancestor card behind the member’s frame (section 8.8). Then come the placed virtual timelines, those that no group names and whose IDplacesholds, in canonical order (by ID); a virtual timeline that no group names andplacesdoes not hold is not drawn (section 8.10). This is the block’s drawing order; an arrangement takes the items in its own order instead (section 8.6).Frames. Each group is a frame, a
frameelement: a rounded rectangle holding the group’s title and then its members’ cards, a virtual timeline’s among them, one under the other, in the group’s display order: the entry ofgraphical.orderunder the group’s ID, ormemberswhenorderhas no entry for it. An ungrouped root has no frame.Cards. A card is a
cardelement, a raised rounded rectangle around one member drawing of a timelineM(in the tree below, a card holds nothing). An ungrouped rootM, and a placed virtual timelineM, lies in one card; a memberMlies in one card in the frame of each group that has it as a member, every card ofMaddressed{"id": M, "part": ["card"]}(section 2.2). A timeline that several groups have as a member is so drawn once in each of their frames, each drawing laid out with its own frame’s length and scale and its own card’s spacing, margin and size (section 8.6), and its elements carry the same addresses in every one. The card is the same whether it lies on the grey block or in a frame.Member drawings. A member drawing is the drawing of sections 3 to 6 of one timeline
Mtaken as the root: its line is atimelineelement, its markers band draws its named timestamps, and positions are onM’s axis (section 3.1). A member that is a child timeline intimelinesis still atimelineelement in its member drawing, so rules selectingchilddo not reach its line, and it ends with the diamond, or with three chevrons when its length isnull(section 6.6). Such a member’s drawing also has the faded lines of its ancestors, in an ancestor band on each side of its line where one of them lies (section 8.3): by default all of them below it.Titles. A group’s title, a
nameelement with the address{"id": G, "part": ["name"]}, opens its frame. The manifest’s title, anameelement with the address{"part": ["name"]}, opens the block.
The tree of section 2.1: the block holds the manifest’s title, the
ancestor cards and the timeline elements of their roots, the frames,
and the cards and timeline elements of the ungrouped roots; a frame holds
its title, its members’ cards and timeline elements and the gaps of its
group elisions (section 8.9), each gap holding its ellipsis and its
labels; a card or ancestor card holds nothing; a member’s timeline
element holds what a root holds (section 2.1) and its ancestor lines; an
ancestor line holds its name, the
wedges of the named timestamps’ coordinates on it, primary and secondary,
and their labels, each label beside its wedge and not held by it, and the
cross-section lines of its timeline’s named timestamps drawn there
(section 8.3).
within names a timeline at any depth of timelines; a timeline’s depth
(section 2.5) is its depth in its root’s tree, the roots being 1.
8.2 Horizontal#
The block has one horizontal layout, which every item applies at its own
place: the name column, the line’s start and the right margin are found
once over all items, so that items of one length are equally wide wherever
they lie, unless a frame’s group elisions shorten it (below). Each quantity below is computed in item coordinates, measured
from the item’s left edge, before the item’s scale (section 8.6); Li is
the graphical length of item i.
The name column starts at n = Q + K when the block holds a frame and at
n = K otherwise: inside the cards, at the same offset for every card of
every item. Every row name of every member drawing, ancestor names
included, is drawn at x = n. N is the width of the widest name of any
member drawing of the block (section 6.7), and G' = 8 when any such name is
drawn and 0 otherwise; titles are not names of rows and count for neither.
The start is
s0 = max(n + N + G', max over i, j of (n + wj / 2 − (Li × uj + vj)), max over a of (n + N + G' + 8 × wa))
where j runs over every centred label of every member drawing of item
i (section 6.7, with the member’s own proportions and the item’s length
Li, and vj its carry, 0 unless its wedge is turned) and a over every ancestor line of the block that runs on to the left
(section 8.3), wa its stroke width. So no label crosses the name column’s
left edge, and no chevron crosses the gap after the names. Every member
drawing of item i starts at s0, its shared end is s0 + Li, and the
x0 of sections 3 and 8.3 is s0 in item coordinates.
A frame with group elisions is drawn shorter by DGi, the sum of the
shrinks of its gaps (section 8.9), summed from the left, and 0 for every
other item: its members’ shared end is s0 + (Li − DGi) and their
drawn length Li − DGi, the L' of section 8.9. The right margin
Mr is the largest of e − (s0 + (Li − DGi)) over every member drawing
of every item i that draws anything, e its right edge (section 6.7);
it may be negative. Item i’s right edge is Ri = max(s0 + (Li − DGi) + Mr, t), t the right edge of its group’s title, which
starts at Q (none for an ungrouped root’s card), or Ri = max(s0, t)
when no member drawing of the block draws anything; section 8.6 widens it on
request. A block of one item so has the right edge of its widest content. A card
inside a frame spans Q to Ri + K, so that every card of a frame ends
at one x, unless its own request widens it (section 8.6); a frame spans 0
to Ri + K + Q; an ungrouped root’s card spans 0 to Ri + K + Q when
the block holds a frame and to Ri + K otherwise, so that the frames and
ungrouped cards of one length end at one x where no frame has group
elisions, and a frame with group elisions ends DGi further left, unless
its title holds it wider.
8.3 Ancestor lines#
For a member M that is a child timeline, let A1, …, Ak be its
ancestors from its root A1 down to its parent Ak. Each Aj has an
ancestor line, an ancestor element with Aj’s address, drawn at
M’s scale and clipped to M. On M’s axis Aj starts at `ts = −(o(j+1)
… + o(k) + oM)
, the negated sum of the offsets fromAjdown toM(oMbeingM's own offset inAk,o(j+1)that ofA(j+1)inAj), and ends atte = ts +Aj'slength, combined as section 3.1 combines values, when that length is a value;λisM's length, or its reach when its length isnull(section 3.4).ts ≤ 0, andte ≥ λwherever every length involved is a value, since a child lies within its parent. Withwthe line's stroke width andy` its ordinate:
On the left, when
ts < 0(compared exactly) the line runs on: it starts atXa = x0 − 4wand ends in a double chevron pointing left, the inner one through(Xa − w, y − 1.5w),(Xa − 2.5w, y)and(Xa − w, y + 1.5w), the outer one the same1.5wfurther left, through(Xa − 2.5w, y − 1.5w),(Xa − 4w, y)and(Xa − 2.5w, y + 1.5w), so its tip is atx0 − 8w. Whents = 0the line starts atx0with its circle.On the right, when
Aj’s length orM’s length isnull, or `teλ
, the line runs on toXr = x0 + L’ + 4w,L’the drawn length ofM's frame (section 8.2;Lwithout group elisions), and ends in a double chevron pointing right, mirrored: the inner one through(Xr + w, y − 1.5w),(Xr + 2.5w, y)and(Xr + w, y + 1.5w), the outer one1.5wfurther right, through(Xr + 2.5w, y − 1.5w),(Xr4w, y)
and(Xr + 2.5w, y + 1.5w), its tip atXr + 4w,8wpastx0 + L’(section 6.7): where either end is not known, the drawing does not claim that the ancestor ends with the member. A running-on ancestor line has two chevrons on either side, also when its own length orM's isnull: the three chevrons of an open end (section 6.6) mark a line's own unknown length and are never drawn on an ancestor line. Whente = λthe line ends atx0 + L’withAj's own end (section 6.6): the arrowhead, open arrowhead or circle of a top-level timeline, the diamond of a child. Whente < λ, which a manifest allows only where a timeline betweenAjandMhas a length ofnull, the line ends atx(te)(section 3.2), inside the member's span, withAj`’s own end.
Named timestamps. A named timestamp of
Ajwhose position onM’s axis, itscoordinateplusts, combined as section 3.1 combines values, is at least 0 and at mostλ, compared exactly, is drawn on the ancestor line as on a timeline’s line, by what itsdisplaylists (section 2), atX,xof that position (section 3.2). Its wedge lies on the line’s outer side, the side away from the member’s line (below), outside every band, a wedge of section 6.6 on that side with its tip on the line’s edge (y − w / 2above the line,y + w / 2below it), turned by itsrotation, so that, not rotated, its base lies 13 further out. Its stack, its name, its ID and its coordinate inAj’s unit (section 6.4, Markers), is placed by one first fit, the timestamps in canonical order, into tiers beyond the room of the wedges on the same side, as the markers band places its stacks (section 6.4, Markers), each stack as many lines high as it has labels: of a stack in tierk, labelilies on linen = m1 + … + m(k − 1) + i,mqthe height of tierqin lines, which startsw / 2 + 13 + 2 + (n − 1) × h(9)out from the ancestor line, the label’s baseline beyond that start (section 6.6). That is its unturned place: a turned wedge carries its stack as section 6.6 does (Labels of named timestamps), withc0, and the tiers and the band’s room stay those of the unturned places. Its cross-section line crosses the whole ofM’s card, cut by its gap (section 6.6, Cross-section lines). The defaults draw its wedge, its labels and its cross-section line at opacity 1 on the faded line, as for a timestamp named onM(section 4). AfterAj’s own timestamps come the secondary coordinates onAjof the timestamps whose cross-section lines cross its line inM’s card (section 2), in the canonical order of their timestamps, each drawn so, by its wedge and its labels, where it is displayed (the defaults hide it, and fade it with the line where a rule shows it, section 4). A timestamp ofAjat a position outsideM’s span is not drawn inM’s card; it is drawn whereAjis drawn whole, in an ancestor card (section 8.8) or a card of its own.Nothing else of
Ajis drawn on the ancestor line: no maps, regions, flow control, boundaries or other descendants (the flow control ofAjand of its descendants that lies inM’s span is drawn inM’s own flow control band, section 6.4, Gathering), no mark ofM’s start or end, and no named timestamp of another timeline but by the coordinates its lines cross onAj.M’s start and end onAjare the secondary coordinates there ofM’soriginandlengthwhereMnames them as groupstamps (section 2), as an editor does when a child joins a group: their lines cross the ancestor lines, and their wedges and coordinate labels, hidden and turned −45 by the defaults (section 4), are shown by a rule selectingcoordinates: secondary, by their addresses or not. Its name is drawn in the name column on its row (section 6.6, names).
Sides. Each ancestor line lies on one side of the member’s line: the
side opposite to where Aj’s own band order (section 6.4, completed
against its inherited order) puts its children band, below M’s line
when children comes before line in that order and above it when
children comes after line. Aj’s children band holds the way down to
M, so the member’s card shows Aj on the side of M where Aj’s own
drawing has it, and in the same order as the ancestor card does (section
8.8). In the default band order (section 4) every ancestor line lies below
the member. An ancestor line’s outer side is up when it lies above M’s
line and down when it lies below it.
The ancestor lines of one side lie in that side’s ancestor band, the
outermost band of the side, beyond the root’s bands and outside every
band order; it is not an element and has no address. A member drawing
has an ancestor band on each side where a displayed ancestor line lies:
none, one or two. A band starts at the larger of p0 / 2 and S beyond
the larger of the outer edge E of its side (section 6.4: Ea above,
Eb below, of the root’s own bands) and half the stroke width wm of the
member’s line, wm being 0 when that line is not displayed (section 6.5):
at max(p0 / 2, max(E, wm / 2) + S), so that the band keeps the gap S
from the outermost band of its side and from the line’s stroke, as a band
at level 1 or −1 does.
It holds one row per ancestor on its side, the deeper ancestor (the larger
j) nearer the member’s line: of the ancestors on one side, the one
nearest M in the tree lies nearest and the one nearest the root
outermost. An ancestor line that is not
displayed has no row (section 2.4 states what it hides). Row r of a band,
counted outwards from the member’s line, has the row pitch qr of its
name’s font size (p of section 6.2), an inner half ir = qr / 2
towards the member’s line and an outer half or on its line’s outer side,
the larger of qr / 2 and the reach of its wedges, w / 2 + 13, or w / 2 + 13 + 2 + T × h(9) (left to right) when the labels of its named
timestamps fill tiers of T ≥ 1 lines together (9 standing for its
labels’ largest font size), or qr / 2 alone when no wedge or label of a
named timestamp is drawn on it. The line of row 1 lies at c0 + i1 from
the member’s line, c0 the start of the band, and that of row r + 1 at
the distance Δr beyond row r: Δr = or + i(r + 1), except on the
side where the ancestor line of the root R = A1 lies while an ancestor
card of R is drawn behind M’s frame (section 8.8), whether it is
aligned to M or to an earlier member below R, so in every member
card of that frame below R, where Δr = max(dr, or + i(r + 1)), dr the distance between the lines of the two
rows’ ancestors in R’s drawing laid out alone (section 8.8, step 1),
the larger of their ordinates less the smaller. For dr, R’s drawing
alone is laid out on the ancestor card’s elided axis (section 8.9): on the
gaps carried into it, which draw no label but move what lies right of
them, and, as its mode chooses, on the pieces of its stored card elisions
or on the elisions it derives, so that it is the ancestor card’s own
layout, and dr counts the label stacks of every elision the card draws
in its markers bands (section 6.4, Markers), stored and derived alike;
for a root drawn once behind a row (section 8.8, Drawn once) it is the
layout of its once card. The coordinates of the derived elisions depend
on the card’s proportion, and the proportion on the height of M’s frame
(section 8.9), which it reads as laid out before any of its rows align on
a card behind, every Δr there or + i(r + 1), so that dr depends on
nothing of M’s card as drawn.
So, in the card of the member the ancestor card is aligned to, which lies
aligned on R’s line (section 8.8), every ancestor row on that side lies
at exactly its height on the card behind (in a later member’s card the
rows keep those distances from one another), with one exception: where
the wedges and labels of its own named timestamps need more room, that
row and the rows beyond it lie further out.
The
band is i1 + Δ1 + … + Δ(C − 1) + oC wide for C rows, summed in that
order, and its outer edge is c0 plus that width.
8.4 Vertical#
Every member drawing has its own height Hm, its content height Hc of
section 6.5 with its ancestor bands included in Ea and Eb and its card margin
V above and below; its card is Hm high, and the drawing’s top is the
card’s top. The card padding K is
horizontal only: above and below, the member drawing’s own padding P
(section 6.5) lies inside the card. A card’s shadow lies 2 to the
right of and 2 below the card.
A frame or card spanning x = a to b and y = c to d is written with
x a, y c, width b − a and height d − c, its right and bottom
edges being b and d: a card’s b is the end of its span (section 8.2)
and its d its top plus Hm, a frame’s d its top plus its height below.
A card’s shadow is written at x + 2 and y + 2 with the card’s width
and height, and its right and bottom edges are b + 2 and d + 2.
A frame is laid out from its top: the title’s baseline lies at
top + Q + a(s),sthe title’s font size, so the title sits at the top of a sloth(s)high, unlike a row name, which is centred on its row. The frame’s marginVf(section 8.6) lies after the title’s gap: the first card starts attop + Q + h(s) + 4 + Vf(attop + Q + Vfwhen the title is not displayed), and each further one the frame’s spacingSfbelow the previous one’s bottom (section 8.6); the margin lies again after the last card, before the bottom paddingQ. The frame isQ + h(s) + 4 + Vf + Hm1 + Sf + Hm2 + … + Sf + Hmn + Vf + Qhigh, summed in that order, withouth(s) + 4when the title is not displayed, and without eitherVfwhen it holds no card.The block. The manifest’s title, when there is one, lies at the block’s top left corner: drawn at
x = Xl + P, with its baseline atYt + P + a(s), both in place coordinates (below), so in the block atPandP + a(s)wherever the block grows. Its slot,h(s)high, is the top border of the items: no item rises into it, and an item placed higher pushes it up with the block’s top. Every frame and ungrouped card lies at its place (section 8.6).
Within a member drawing, the root’s line lies at the drawing’s top plus the
y_root of section 6.5, computed in that order; every other ordinate
follows from that line as section 3.3 states.
The block grows in every direction to hold its content, with the padding P
on every side. Every position is first computed in place coordinates,
measured from the place origin, as sections 6 and 8 write it (an item’s
positions through its item coordinates and its place, section 8.6). In place
coordinates the content runs from Xl, the smaller of 0 and the smallest
left edge of any frame, card or displayed ancestor card (section 8.8)
minus P, to Xr, P plus the largest right edge of any of these, a
shadow included, or of the
manifest’s displayed title, whose right edge is Xl + P plus its width;
and from Yt, the smaller of 0 and the smallest top of any of these
minus Pt, to Yb, P plus the larger of the largest bottom edge of any
of these, a shadow included, plus the block’s margin Vb
(section 8.6), and of the manifest’s displayed title, whose slot
ends at Yt + P + h(s) (Xr = 2P + K and Yb = P when the block holds none
of these). Pt is P + h(s) + F + Vb when the manifest’s title is displayed,
s its font size, and P + Vb otherwise, so that an item never rises above
F + Vb below the title’s slot. The block’s margin so lies, as its padding
does, between the title’s gap (or the top padding) and the highest item,
and between the lowest item and the bottom padding.
The content is Wb = Xr − Xl wide and Hb = Yb − Yt high, the sum with
P taken first: Wb = (P + max(b + 2, …)) − Xl, and Hb likewise. The place origin lies at
(Ox, Oy) = (0 − Xl, 0 − Yt) in the block, so an origin of 0 is +0; it is
(0, 0) unless an item reaches left of or above the padding. Each finished
position is then drawn in the block with Ox added to its x and Oy to its
y, the last sum of each: the manifest’s title is drawn at (Xl + P) + Ox
with its baseline at ((Yt + P) + a(s)) + Oy. A frame’s or card’s width and height are
taken in item coordinates (section 8.6); the block’s Wb and Hb in place
coordinates, as above. A frame or card that is not displayed is not drawn but keeps
its place, since member drawings lie in it: the layout, n, Wb and Hb
are as when it is displayed, except that a hidden card’s shadow is not
drawn and does not count. The
block is W = max(Wb, width) wide and H = max(Hb, height) high (W = Wb
when width is null, H = Hb when height is); the
background is a rectangle filling it with corner radius rx.
8.5 Descriptors#
A manifest becomes element descriptors in this order: the background; the
manifest’s title; then each displayed ancestor card in the order of
section 8.8, the descriptors of its member drawing and its gaps; then,
for each frame in drawing order, the frame, its
title, and for each of its members in display order, the member’s card and
the descriptors of its member drawing; then, for each ungrouped root and
each placed virtual timeline in drawing order, its card, the descriptors
of its member drawing and its gaps. A card’s gaps
(section 8.9), its own and those carried into it, follow its member
drawing, gap by gap from the left, each gap’s descriptors in this order:
its rectangle where it is filled, its continuations, its ellipsis, then
its labels, name, ID and coordinate. A gap’s rows, which its
continuations follow, are taken in their own order, which
is not that of their descriptors (section 7.2, maps before lines): first
the ancestor lines, from A1 to Ak (section 8.3), then the lines of
the member drawing in the traversal order of their timelines (section
6.1), each line followed by the maps of its conversion maps band in the
order that band places them (section 6.4); a row is taken only where it
is drawn and crosses the gap (section 6.6, Elisions). The descriptors of a member
drawing follow section 7.2, with its ancestor lines, from A1 to Ak,
each with its chevrons, just before its root; the wedges of the named
timestamps’ coordinates on them, from A1 to Ak, each ancestor’s in
the order of its first fit (section 8.3), first among its wedges; their
names, from A1 to Ak, first among its names; the labels of those
coordinates, from A1 to Ak, each ancestor’s in the same order, first
among its marker labels; and the cross-section lines of their
timelines’ named timestamps, from A1 to Ak, each ancestor’s in
canonical order, first among its cross-section lines. After the last item
come the gaps of the frames’ group elisions, frame by frame in drawing
order and in each frame from the left, each written as a card’s gap is,
its rows taken card by card from the top; then the
groupstamps’ lines, timestamp by timestamp in the order of timestamps
and frame by frame in the order of groups, each frame’s lines from the
top down (section 6.6); then the alignment anchors and then their labels (section 8.7), so that they
lie over everything else. In an arranged block (section 8.6) the item
order, or for horizontal the row, takes the place of drawing order
throughout: the frames and the ungrouped roots’ cards are written in
that one order, a frame or a card each where it stands in it, and the
gaps of the frames follow it too. In a block arranged horizontal the
ancestor cards written are its once cards (section 8.8, Drawn once), in
the order of their roots from the top, each followed by its gaps from
the left as a card’s gaps are, a seam writing nothing; a line of the
member drawing cut by gaps is written as its pieces from the left, in the
line’s place.
A title is a text descriptor of section 7.2, anchored at start;
its content and max-width apply as section 6.6 applies them to a row’s
name.
8.6 Places#
Every item of the block, a group’s frame or the card of an ungrouped root
or of a placed virtual timeline, lies at a place: its left edge x and its top y, measured from the place
origin in canvas units, its graphical length length, its scale
scale (positive), its spacing (finite, ≥ 0), its margin (finite,
≥ 0), and its requested size width and height (positive, or left out for its
content’s own size). places (section 1) states any of
these members for the item whose ID is its key, and a group’s entry states
in its cards, under a member’s ID M, the card of M in that group’s
frame, places[G].cards[M]. A key naming no item, such as a member’s ID
at the top of places, or a key of cards that is not a member of its
group, is not used, and so is any of a value’s members that this section
gives no use for (a member’s card uses only width, height,
spacing and margin, and an ungrouped root’s card no cards). A member that is not stated takes its default:
length: the placement’slength;scale: 1;spacing: 8 for a frame, 4 for a card;margin: 0;widthandheight: none, the content’s own size;x:P;y: for the first item in drawing order (section 8.5),P + h(s) + F + Vbbelow the manifest’s title,sits font size andVbthe block’s margin, orP + Vbwhen there is no title or it is not displayed; for every further item, the block’s spacing below the largest bottom edgedof the items before it and of their displayed ancestor cards (section 8.8), and lower still where its own ancestor cards rise above it (section 8.8, No room). That edge is the frame’s or card’sdof section 8.4, its placeyplusscaletimes its height, summed in place coordinates before any shift; a card’s shadow does not count, and an item that aheightrequest makes higher ends at its requested bottom.
So with places empty the items lie one under the other, as an editor
first shows them.
Arrangements. An arrangement (section 1) takes the block’s items in
its own item order: the items its order names, each at its first
mention, an ID that names no item passed over, and then every item it
leaves out, in drawing order (section 8.1). An arranged item takes no
x and no y from places, which keeps them for when the block is
not arranged; every other member of its place applies as above.
vertical: every item lies at its defaultxandy, as above, the items taken in the item order instead of drawing order: the first at the first item’s defaulty, each further one the block’s spacing below the largest bottom edge of the items before it and of their displayed ancestor cards, as above.horizontal: the items stand in one row, in the row of section 8.8 (Drawn once), which keeps the item order wherever the stretches of the groups on their roots leave it free. The first item lies atx = P, each further one at the previous item’sxplus its width plus the row gapmax(S, 48),Sthe block’s spacing, summed in that order; an item’s width is its drawn width,scaletimes itsb − a(section 8.4), a card’s shadow not counted. Their tops, and the once cards of the roots they hang on, are those of section 8.8; where no group hangs on a root every item’s top is the first item’s defaulty. When the rules of section 8.8 refuse the row, the block is drawn asvertical, in the item order, and the drawing states why.
An item is laid out by sections 8.2 and 8.4 with its own length as L,
in item coordinates, its left edge and top at 0, every sum written as those
sections write it. Its frame or card is wider when width asks for more:
for a frame, Ri is taken as the larger of its Ri and width − K − Q,
so its cards still end at one x inside it; for an ungrouped root’s card,
as the larger of its Ri and width − K − Q when the block holds a frame
and width − K otherwise. It is higher when height asks for more: the
frame or card is the larger of its own height and height high, every card
and member drawing keeping its top. width and height are in item
coordinates, before the scale.
The card spacing S of a member drawing (sections 6.2 to 6.5 and
8.3) is its card’s spacing: the entry places[G].cards[M] for a
member M drawn in the frame of group G (section 1), or the entry under
the ungrouped root’s ID. A group’s entry states its frame’s
spacing Sf, the gap between its member cards (section 8.4); the
placement’s spacing is the gap between the block’s items at their default
y. The card margin V of a member drawing (section 6.5) is its
card’s margin, from the same entry; a group’s entry states its frame’s
margin Vf, and the placement’s margin is the block’s margin Vb
(section 8.4). A container’s margin is drawn inside its padding, above its
contents and below them (section 1), and changes no width. Each
container’s spacing and margin space only its own contents: none
multiplies another, and a frame’s padding Q, its title’s slot, the block’s
padding P and the card’s padding P above and below do not change with
any of them.
A member’s card may request a size, a spacing and a margin of its own:
the entry places[G].cards[M], for the card of member M in the frame
of group G, states its width and height, in item coordinates, before
G’s scale, its spacing and its margin, and nothing else of it is used; the cards
of M in other groups’ frames take their own entries. The card is then the larger of its own width and width wide,
spanning Q to max(Ri + K, Q + width), and the larger of Hm and
height high; its member drawing keeps its place at the card’s top left,
so the request adds room to its right and below. The frame holding it
grows with it: the frame spans 0 to the largest right edge of its cards
plus Q, and its height sums its cards’ heights.
The item is then drawn at its place: every position of its elements, its
frame’s or card’s included, is the item-coordinate position (px, py)
taken to (x + scale × px, y + scale × py), and every length of them, a
width or height, a radius (a frame’s or card’s corner radius rx
included), a stroke width, every dash of a dash array, a font size, a
text’s max-width and the size of every marker, is multiplied by scale;
a frame’s or card’s width and height are scale times its
item-coordinate b − a and d − c; a card’s shadow is written at its
card’s written x and y plus scale × 2, with the card’s width and
height, its right and bottom edges for the block being x + scale × (b + 2) and y + scale × (d + 2); with
scale 1 that is (x + px, y + py) and every length unchanged. So an item’s
scale scales everything in it, proportions kept, text included, about its
top left corner, as the block’s scale z scales the block (section 1). Its
edges for the block (section 8.4) and for the default y above are its
drawn edges, after the scale.
The members of a group are never placed: they lie one under the other in their frame, in the group’s display order (section 8.1), and only that order changes; their cards may only request a size, a spacing and a margin. The bands of every timeline likewise lie outwards from its own line in its band order (section 6.4).
8.7 Alignment anchors#
Every alignment anchor of a named MatchStamp (section 2) is placed
between the cross-section lines of its two timestamps, in the block’s
coordinates, after every item is drawn at its place (section 8.6) with
Ox and Oy added (section 8.4). A timestamp has one cross-section
segment in every member drawing in a frame or card, an ancestor card’s
excepted, that draws its timeline’s line, or for
a segment without a line its segment line’s line, or draws its timeline
as an ancestor line and the timestamp on it (section 8.3): the vertical segment
from (X, yt) to (X, yb) of section 6.6 as drawn in the block, from
the card’s upper border to its lower border, its gap included. A
segment counts whether or not its cross-section line is displayed. An
anchor one of whose timestamps has no cross-section segment draws
nothing.
Between a segment A from (Xa, a1) to (Xa, a2) and a segment B from
(Xb, b1) to (Xb, b2), a1 ≤ a2 and b1 ≤ b2, the line is the
shortest one, with lo = max(a1, b1) and hi = min(a2, b2):
when
lo ≤ hi, the two overlap vertically, as on cards side by side, and the line is horizontal at their middleym = (lo + hi) / 2, from(Xa, ym)to(Xb, ym);when
a2 < b1,Alies aboveB, and the line runs from(Xa, a2)to(Xb, b1);otherwise from
(Xa, a1)to(Xb, b2).
A is a segment of the first timestamp of the anchor’s timestamps and
B of the second. When a timestamp has several segments, its timeline
being drawn in several cards, the line is the shortest over every pair of
one segment of each: the one whose dx × dx + dy × dy is smallest, dx
and dy the differences of its end points’ coordinates, in binary64; of
equal ones, the first in the descriptor order of the first timestamp’s
segments, then of the second’s (section 8.5). A line of no length is not
drawn. The line is straight, crosses whatever cards lie between its ends,
takes no room and widens nothing.
The alignment_anchor element, with the address {"id": A} of its
anchor’s ID A, is the <line> of section 7.2 from the first point to
the second. When its anchor’s display lists name, the MatchStamp’s
name is drawn as a label element with the address {"id": A, "part": ["name"]}, centred on the line’s midpoint (xm, ym), xm = (x1 + x2) / 2 and ym = (y1 + y2) / 2 in binary64, with its baseline at ym + (a(s) − d(s)) / 2, s its font size, vertically centred as a row’s name is
(section 6.6); it is placed so whether or not the line is displayed or
has a length, and it takes no room either.
The lines are written after the last item’s descriptors, MatchStamp by
MatchStamp in the order of matchstamps and each MatchStamp’s anchors in
the order of its alignment_anchors, and then their labels in the same
order (section 8.5).
8.8 Ancestor cards#
A member that is a child timeline is drawn with the faded lines of its
ancestors (section 8.3). Its root may also be drawn whole, behind the
member’s frame, in an ancestor card: an ancestor_card element with
the root’s card address {"id": R, "part": ["card"]} (section 2.2),
belonging to the root R, drawn as a card is (section 7.2), with the
member drawing of R in it. Every ancestor between R and the member is
a row of that drawing at its true proportions, and R’s own line
continues the member’s faded ancestor line of R beyond the frame’s
borders. In the tree of section 2.1 the block holds the ancestor card and
the timeline element of R drawn in it, and the ancestor card holds
nothing, so nothing of its drawing lies inside an ancestor element and
none of it is faded. The defaults show every ancestor card (section 4);
a rule of a later layer hides them as it hides any element, all of them
with
{"select": {"element": "ancestor_card"}, "set": {"display": "none"}}
and those of one root R with "addresses": [{"id": "#R", "part": ["card"]}] added to the selector.
Which. The groups are taken in drawing order (section 8.1), and the
members of each group G in its display order. Each member M that is a
child timeline gives one ancestor card of its root R (A1 of section
8.3) behind G’s frame, aligned to M, unless an earlier member of G
lies below the same R: a root has at most one ancestor card behind a
frame, aligned to the first member below it in display order, and a later
member below it adds none, whether or not that card is drawn. A root with
members below it in the frames of several groups has one ancestor card
behind each of them, each laid out with its own frame’s length and drawn
at its own frame’s place and scale; several roots with members in one
frame have one ancestor card each. A root that is a member of another
group keeps its card in that group’s frame too.
When it is drawn. An ancestor card is drawn when it is displayed
(section 2.4), the line of R in its member drawing (below) is displayed,
and the line it is aligned to is drawn in M’s card in G’s frame:
R’s ancestor line there, or M’s own line where that ancestor line is
not displayed. Otherwise nothing of it is drawn, it takes no room and the
block does not grow for it.
Geometry. Let ts be the start of R on M’s axis (section 8.3,
with Aj = A1 = R), λ M’s length, or its reach when its length is
null, and λR R’s length, or its reach when its length is null
(section 3.4); te = ts + λR, combined as section 3.1 combines values.
us = ts / λ and ue = te / λ are proportions formed as section 3.2
forms them. With x0 the start of the member drawings of G’s frame and
L its graphical length (section 8.2), in item coordinates and binary64:
xs = x0 + L × us
xe = x0 + L × ue
LA = xe − xs
Alone.
Ris laid out by sections 3 to 6, 8.2 and 8.4 as the one ungrouped root of a block that holds nothing else and has no title: at the graphical lengthLA, with the card spacing 4 and the card margin 0 whateverplacesstates, the name column atn = K, its gaps (section 8.9) on its elided axis (section 3.2), and its ownN,G', starts0'and right margin, so that its card spans0toRi' + Kand isHmhigh, its top at 0.Ris a root, so its drawing has no ancestor band.yRis the ordinate ofR’s line in it.Placed.
yAis the ordinate, inG’s item coordinates, ofR’s ancestor line inM’s card, or ofM’s line where that ancestor line is not displayed. Every position(px, py)of the layout of 1, its card’s included, becomes(px + dx, py + dy)withdx = (xs + DL) − s0'anddy = yA − yR,DLthe sum of the shrinks of the gaps left ofM’s span (section 8.9), summed from the left, and 0 without gaps, lessOL. The card’s axis has two seams (section 3.2), at the start−tsand at the end−ts + λofM’s span onR: the firstOL = x0wide, the room ofG’s frame from its left edge, at 0 in item coordinates, to its member drawings, and the secondOR = Fw − (x0 + L')wide, the room from the members’ drawn end to the frame’s right edge,Fwthe width of the frame as drawn andL'its members’ drawn length (section 8.9), in binary64. A position at either seam lies on the side ofM’s span, so an element at the span’s start or end lies under the frame. SoR’s line starts atxs + DL,M’s span on it lies overM’s line, its gaps carried from the frame (section 8.9) over the frame’s gaps, everything left of the span, the card’s names included, lies left of the frame, everything right of it lies right of the frame,ORfurther right andDGfurther left with the frame’s shared end,R’s line runs whole across both seams under the frame, and it lies atyA. The ancestor card is then drawn atG’s place and scale, as every element of the frame (section 8.6).No room. No quantity of the block’s one horizontal layout (section 8.2) and no size of
G’s frame or cards counts it; but an item’s defaulty(section 8.6) counts the displayed ancestor cards behind the frames before it and behind its own frame: it lies the block’s spacing below the largest bottom edge of the earlier items and their ancestor cards, and so much lower that its own ancestor cards’ tops lie that spacing below too (the first item keeps its defaulty), shadows not counted. The block grows to hold it as it holds a card: its left edge, top, right and bottom edges, its shadow included, count among the edges of section 8.4, so the block may grow to the left or upwards, moving the place origin within it while every item keeps its place.Order. Ancestor cards are written before every frame and card, in the order of Which (section 8.5), so that every item and every alignment anchor lies over them, and a later ancestor card over an earlier one where they meet.
Nothing else.
placesstates nothing of it: a keyplaces[G].cards[R]names no member ofGand is not used (section 8.6). It gives no cross-section segment to an alignment anchor (section 8.7), and no groupstamp line is drawn for it, since those lines span the member cards of a frame alone (section 6.6, Cross-section lines); the named timestamps of its drawing draw their own cross-section lines in it, across the whole ancestor card, as in every member drawing.
The fixture group_parent_both drawn with the defaults shows the root
piece (16 quarters) behind the frame of its child middle (8 quarters
at offset 4), so us = −0.5 and ue = 1.5 and LA = 800 at the
length 400; its proportion is 1 (section 8.9), so it derives no elision,
and the card is written at x 8 and y 36.207, 1013.0391 wide
and 63.3789 high, piece’s line runs from 60.3354 to 1004.0391 at
y 85.1836, on the faded ancestor line of piece, which the default band
order puts below middle’s line in middle’s card, and the block grows
to the left, its place origin at (252.3354, 0). In the card middle’s
row lies above piece’s line, at 51.207, 4 lower than middle’s own line
at 47.207: between middle’s markers band and the line of piece,
middle’s card holds the card spacing S and the inner half 7 of the
row of piece, and piece’s drawing only the start 7 of its children
band.
In group_parents_mixed, three roots lie behind one frame, each aligned
to the first of its members in the display order; sonata is drawn
whole, session and page with the gaps they derive (section 8.9).
Drawn once. In a block arranged horizontal (section 8.6) every
root that groups hang on is drawn once, behind the row of items, and
each group stands where its stretch lies on that root.
Words. A group hangs on a root R when it has an ancestor card of
R (Which, above): when one of its members lies below R, a child, a
grandchild or deeper. The member that card is aligned to, the group’s
first member below R in its display order, is the group’s anchor
on R, and the anchor’s stretch runs on R’s axis from the
anchor’s start (section 3.1) to its end (section 3.4), so that a member
of unknown length stretches to its drawn end. A member that is the root
itself anchors nothing; an ungrouped root’s card hangs on nothing.
The rules.
The items stand side by side in one row, and each root that a group hangs on is drawn once behind them, the roots one under another.
Along every root, the stretches of the groups hanging on it follow the row from left to right without overlapping; touching is allowed.
In every group, the anchors lie in the same top-to-bottom order as their roots.
The orders. Rule 2 gives, for each root in canonical order (by ID) and
each two groups hanging on it, taken in the item order (section 8.6),
“G before H” when G’s stretch ends at or before the start of
H’s, and “H before G” when H’s ends at or before the start of
G’s, compared exactly: nothing when both hold (two stretches without
length at one position), and an overlap when neither does. Rule 3
gives, for each group in canonical order and each two of its anchors
next to each other in its display order, “the upper anchor’s root above
the lower’s”. The row is the item order sorted by the first
relation: repeatedly the first item of the item order left that no item
left must precede. The roots, every root some group hangs on, are
sorted likewise by the second relation, starting from canonical order.
So the row keeps the item order wherever the stretches leave it free,
and roots no group orders lie in canonical order.
Refusal. When no row and no order of the roots satisfy rules 2 and 3
for all groups at once, horizontal is refused, and the first of these
names the conflict:
An overlap, on the first root in canonical order where two stretches overlap, of the first such pair in the item order: its groups are the pair, its root that root, and its reason
"G" and "H" overlap on "R" (a–b), the stretch both cover, from the later start to the earlier end, written as an elision’s coordinate label writes its elided coordinates (section 5.3):"Theme A" and "Theme B" overlap on "Score" (8–16 ♩).The row in a cycle: of the items the sort leaves, every item that must precede none of the others still left is set aside, again and again until none is. From the first item of the item order still left, step along the first relation, each time to the item earliest in the item order among those still left, until an item repeats. The cycle so found, begun at its item earliest in the item order, gives the groups, the root of each step (of two roots giving one step, the earlier in canonical order) and the reason, for two groups
on "R" "G" comes first, on "S" "H", and for moreon "R" "G" comes before "H", on "S" "H" before "J", on "T" "J" before "G".The roots in a cycle, found and begun likewise among the roots in canonical order, every root that must lie above none of the others still left set aside first: the groups of its steps (of two groups giving one step, the earlier in canonical order), its roots and the reason
"G" holds "R" above "S", "H" holds "S" above "R".
Each group and root is named in a reason by its title or name (section
5.3), in double quotes. A refused arrangement is drawn as vertical
(section 8.6), and the drawing states the conflict (section 1); nothing
else refuses one.
Vertically. In place coordinates, with S the block’s spacing: the
once card of a root R is its ancestor card behind the first group
of the row hanging on it, G1, aligned to G1’s anchor M1, laid out
alone as step 1 above lays it out, at that card’s graphical length LA,
and drawn at G1’s scale s1; yR is the ordinate of R’s line in
that layout and Hm its height, so the card reaches aR = s1 × yR
above its line and bR = s1 × (Hm − yR) below it. For the anchor M of
a group G on R, yM is the ordinate in G’s item coordinates of
R’s ancestor line in M’s card, laid out as section 8.4 lays out the
frame, or of M’s line where that ancestor line is not displayed (the
yA of step 2 above).
Lines. The line of the first root lies at
y1 = 0, and that of each further rootR'at the largest of(y + bR) + S + aR',Rthe root above it andyits line, so that the cards of two roots never overlap, and, for each group whose anchorM'onR'comes after an anchorMon a rootQin its display order,Mthe one just beforeM',yQ + sG × (yM' − yM),yQthe line ofQandsGthe group’s scale, so that the group can lie on both roots.Padding. In each such group the card of each anchor
M'after the first liesδ = (yR' − yQ) / sG − (yM' − yM)lower than section 8.4 lays it, the gap above it grown byδ,yR'andyQthe lines of the two anchors’ roots: every card after it moves with it, no card changes its height, and the frame is the sum of itsδhigher. So every anchor lies on its root’s line, up to the rounding of binary64.Tops. A group hanging on roots has its top at
yR − sG × yMof its first anchorM, on the rootR, and a once card atyR − aR. The row’s topT0is the smallest of these tops; every item that hangs on nothing has its top atT0. Then every ordinate moves byY − T0,Ythe first item’s defaulty(section 8.6), so that the highest frame or once card lies where the first item would.Left. Where a once card’s left edge (below) lies left of
P, the row is packed again fromx = P + δxinstead ofP,δxthat edge’s distance fromPfor the leftmost such edge, and every abscissa below follows from the new places.
The axis of a once card. R’s line in its once card is drawn in
runs, each at the scale of one anchor’s frame. The run of an anchor
M of a group G, at the place (xG, yG) with the scale sG, M
starting at a on R’s axis and λ its length, or its reach when its
length is null, gives a position t of R’s axis the x
XM(t) = xG + sG × (x0 + (L × u − D))
with u the proportion of t − a, M’s own position, of λ (section
3.2), x0 and L the start and the graphical length of G’s member
drawings and D the sum of the shrinks of the gaps of G’s frame with
q ≤ u (section 3.2): where R’s ancestor line in M’s card puts t,
continued to either side of M’s span. Between two anchors next to each
other along R, A, whose stretch ends at b, and B, whose stretch
starts at a, with c the middle of the room right of A’s frame, the
mean of that frame’s right edge and the left edge of the next item of
the row, in binary64:
sis the largest whole unit ofR’s axis (section 8.9, Derived elisions, step 1) no less thanbwithXA(s) ≤ c − 16, orbwhere none is, andethe smallest whole unit no more thanawithXB(e) ≥ c + 16, orawhere none is;when
s < e, a gap leaves outRfromstoe:Rlies onA’s run up tosand onB’s frome, and the gap is drawn fromXA(s)toXB(e), at least the standard gap of 32 wide;otherwise a seam (section 3.2) lies at
m = max(b, min(a, s)):Rlies onA’s run up tomand onB’s fromm, the seamXB(m) − XA(m)wide. It leaves out nothing: it marks where the scale changes where the room holds no whole unit.
So every change of scale lies in a gap or at a seam. A gap is an elision
the card derives on R (section 8.9), with the address {"id": R, "part": ["elision"]} (section 2.2) and the elided coordinates s and
e, drawn as every gap is (section 6.6), its display the card’s
elision-display. A seam is none, and a row crossing it is drawn across
it whole (section 3.2). An element at m lies on B’s run when it
belongs to a timeline that starts at m (its line’s start, its named
timestamps there with their wedges, labels and cross-section lines) or
is the start of a region at m or the place m of a jump’s destination,
where its arc arrives, and on A’s run
otherwise; a line ending at m ends there on A’s run, one starting
there starts on B’s.
Left of the first anchor’s stretch R lies on that anchor’s run and
right of the last one’s on the last anchor’s run, and there the card
draws the gaps its elision mode gives (section 8.9): left of the first
stretch those that R’s ancestor card behind the first anchor’s group
draws left of its protected span, right of the last those that the one
behind the last anchor’s group draws right of its own, with their
natural and drawn widths taken from those cards and multiplied by their
groups’ scales; the proportion r of their derived elisions is the
least of the proportions of R’s ancestor cards behind every group
hanging on it (section 8.9), each as section 8.9 gives it. As in an ancestor card (step 2), a seam lies at the start of the
first stretch, s1 × OL wide with the OL of the first anchor’s frame,
and one at the end of the last stretch, sN × OR wide with the OR of
the last anchor’s frame, N the last anchor and sN its group’s scale;
a position at either lies on its stretch’s side. A position t left of
the first stretch in no gap lies at XM(t) + s1 × (DL − OL), DL the
sum of the shrinks of those gaps that start at or after t, and one
right of the last stretch at XN(t) − sN × (DR − OR), DR the sum of
those that end at or before t, each sum taken from the left. Between
the first stretch and the last the arrangement’s gaps leave out what
they leave out whatever the mode, and stored card elisions lying there are kept and
not drawn; the gaps of each anchor’s frame lie in its run, carried as
section 8.9 carries them.
Drawing a once card. The once card draws the layout of step 1 with
every ordinate y of it at (yR − aR) + s1 × y, and every abscissa by
the position it belongs to: an element at a position t of R’s axis,
or at an offset o from it (a wedge’s corners, a label centred on it, a
mark at a line’s end), lies at X(t) + s1 × o, X the run the position
lies on; a line or row crossing a gap is drawn in pieces (section 6.6,
Elisions), and one crossing a seam whole across it (section 3.2); the names, the chevrons and everything else of
the layout left of R’s start s0' keep their distance from it at
X(start) + s1 × (x − s0'), so the card’s left edge lies at X(start) − s1 × s0'; and the card’s right edge lies at X(end) + s1 × ((Ri' + K) − xe'), xe' the x of R’s end in the layout of step 1. Where R
starts where the first stretch starts, its start lies on the seam there,
on the stretch’s side, while its names and everything else of the layout
left of s0' keep their distance from X(start) − s1 × OL, outside the
first anchor’s frame, as a card behind one frame keeps its names outside
it (step 2), so that the card’s left edge lies at X(start) − s1 × (OL + s0'). Every length of
it, a stroke width, a font size, a mark, is s1 times its length there.
The rows are those of step 1, as gaps never move a row (section 3.2).
The once card is the ancestor card of R behind G1; R’s ancestor
cards behind the other groups hanging on it draw nothing and take no
room. A once card that is not displayed draws nothing but keeps its
place in 1 to 4, so that hiding it moves nothing.
Worked example. The fixture bundle_arranged_roots arranged
horizontal in the order page, group_3, group_1, group_2
(bundle__bundle_arranged_roots__horizontal): the score score (48
quarters) holds the touching movements exposition, development and
recapitulation (16 quarters at 0, 16 and 32), the session session
(130.0 seconds) the takes take_a (30.0 at 0.0) and take_b (30.0 at
100.0); “Exposition” (group_1) lists exposition and take_a,
“Development” (group_2) development and the root notes,
“Recapitulation” (group_3) recapitulation, the root annotations
and take_b, and page is ungrouped. On score Exposition comes
before Development before Recapitulation, on session Exposition before
Recapitulation, and page hangs on nothing, so the row is page,
group_1, group_2, group_3, and score lies above session.
Every item is 567.39013671875 wide, so with the row gap 48 they lie at
x 8, 623.39013671875, 1238.7802734375 and 1854.17041015625.
Vertically:
score’s once card, laid out atLA= 1200, holds the three movements in one row of one band order (section 6.4, Children), their stacks in two tiers, since the end of one movement and the start of the next share a position, so it has its line at 59.453125 of 73.85546875;session’s, atLA= 1733.3333333333333, at 48.9765625 of 83.953125. The ancestor line ofscorelies at 77.18359375 in each frame, that ofsessionat 152.5625 in Exposition and 209.94140625 in Recapitulation, sosession’s line lies at the largest of 71.37890625, 75.37890625 and 132.7578125, the last set by Recapitulation, and Exposition’s card oftake_ais padded by 57.37890625. The tops are −77.18359375 for the three frames, −59.453125 and 83.78125 for the once cards;T0= −77.18359375, and everything moves by 28.8046875 + 77.18359375 = 105.98828125: the frames andpagelie at 28.8046875,score’s line at 105.98828125 andsession’s at 238.74609375.Along
score, 25 canvas units per quarter in each frame: between Exposition and Developmentc= 1214.7802734375,s= 17 ande= 11, so a seam at 16, from 1150.7802734375 to 1366.17041015625; between Development and Recapitulation a seam at 32, from 1766.17041015625 to 1981.560546875.score’s line, the one row crossing them, runs across each whole; the movements’ lines and the timestamps at their starts lie on the right runs, those at their ends on the left ones.Along
session, 400 / 30.0 canvas units per second: between Exposition and Recapitulation, through the room right of Exposition,s= 33.0 (XA(33.0)= 1190.7802734375 ≤ 1198.7802734375) ande= 44.0 (XB(44.0)= 1234.8938802083335 ≥ 1230.7802734375): a gap leaving out 33.0 to 44.0, 44.113606770833485 wide, its ellipsis centred at x 1212.8370768229167, andsession’s line runs on behind Development totake_b.Both roots start where Exposition’s stretch starts, so their names lie
s1 × OL= 127.39013671875 further left, outside Exposition’s frame, and the once cards span 451.322265625 to 2398.839599609375 (score,s0'= 172.06787109375, its movements’ row name cut toExposition, Development, …) and 525.13720703125 to 2398.560546875 (session,s0'= 98.2529296875). The block is 2429.560546875 wide, the right edge of Recapitulation’s frame plusP, and 283.72265625 high, the bottom ofsession’s once card with its shadow plusP.
8.9 Elisions#
Where. Elisions (section 2) are drawn where their timeline is drawn
whole. A card elision, one on a timeline that lies in no group, is
drawn in the cards that draw its root whole: the ungrouped root’s card
and every ancestor card of that root (section 8.8), and for a virtual
timeline, its own root, its placed card (section 8.10); never in a
member’s card, whose members convert linearly between their shared start
and end (README, “Groups and the graphical object”). A group elision, one
on a timeline that lies in a group, is drawn across the frame of each
group its timeline lies in, at one place in every member card of that
frame, and carried into the ancestor cards behind that frame (below); an
ancestor of a member lies in no group through it (section 2), so an
elision on the root of a member, or on an ancestor between, is a card
elision of that root. A root that is a member of one group and holds a
member of another lies wholly in the first, so all its elisions are
group elisions of that frame, and its ancestor cards behind other frames
have no card elision. An elision is drawn where its gap is displayed
(section 2.4); a group elision also only where its timeline’s line is
drawn in the frame, as a groupstamp’s lines across a frame are (section
6.6).
Modes. Which elisions a card draws is the card’s mode, its
elision-mode (section 2.4), cascaded as every property is; every card
of a root R, its ungrouped card and its ancestor cards, carries the
address {"id": R, "part": ["card"]}, so one rule addressed to it sets
the mode of all of them, beside the display that hides them:
|
What the card draws |
|---|---|
|
no card elision, and no derived one |
|
the elisions the card derives (Derived elisions, below), and no stored card elision |
|
the stored card elisions lying on |
|
as |
Group elisions are never counted and never switched by a card’s mode: an
ancestor card draws the gaps carried into it in every mode, so a group
elision neither turns auto into custom nor disappears under full;
a card that is not displayed draws nothing at all. An ungrouped root’s
card has no protected span and derives nothing, so proportional draws
no gap there. elision-proportion and elision-depths act under
proportional alone, and elision-display is the display of every
elision the card derives (none an empty one), the order and repetition
of its words meaning nothing. A frame reads elision-mode for its group
elisions as an ungrouped root’s card reads it for its own: full draws
none, neither across the frame nor carried, auto and custom draw
them, and proportional draws none; it reads none of the other three. So
the rules
{"select": {"addresses": [{"id": "#clt_1", "part": ["card"]}]}, "set": {"elision-mode": "full"}}
{"select": {"addresses": [{"id": "#clt_1", "part": ["card"]}]}, "set": {"elision-mode": "proportional", "elision-proportion": 0.05, "elision-depths": "1", "elision-display": "ellipsis name coordinate"}}
{"select": {"addresses": [{"id": "#group_1"}]}, "set": {"elision-mode": "full"}}
draw the root clt_1 whole in every card, its stored elisions kept and
not drawn; derive its elisions at the proportion 0.05 on its own row
alone, each drawing its ellipsis and its name and coordinate labels; and
draw the frame of group_1 without its group elisions.
Pieces. A card elision’s stretch on the root’s axis runs from its
start to its end, each carried to the root as section 3.1 carries a
coordinate, and no further than the root’s start and end (section 3.4).
In an ancestor card aligned to a member M, the protected span, M’s
span on the root’s axis from −ts to −ts + λ (section 8.8), is never
elided by a card elision. The card elisions a card draws are taken in
canonical order (section 2), and each draws as its pieces what of its
stretch lies outside the protected span and outside every piece taken
before it: none, one or several stretches, each with the elision’s
address, name, width and display. So an elision overlapping the
protected span is clipped to what lies outside it, drawn as up to two
pieces; of two elisions that overlap, the earlier is drawn whole and the
later clipped; a piece without length is not drawn; and nothing is
refused. A stored elision the card does not draw, its gap not displayed
or its timeline not drawn there (Where, above), has no pieces and takes
no stretch from the elisions after it. Each piece of a stored elision
is one gap of section 3.2 over the whole piece, its elided coordinates
the piece’s ends on the elision’s timeline’s own axis.
Widths. A gap of a stored elision over [a, b] has the natural width
n of section 3.2 and the drawn width set by its elision’s width
(section 2): when it is absent, the standard gap 32; for {"ratio": q},
q × n; for {"span": v}, L × uv, uv = v / λR a proportion formed
as section 3.2 forms one and λR the root’s length, or its reach when its
length is null; for {"canvas": c}, c; each in binary64, and n
instead when it is larger than n. L is the card’s graphical length,
LA in an ancestor card (section 8.8), and a width is in the card’s item
coordinates, so its item’s scale scales it. Each piece of a clipped
elision takes its width so, as if it were the whole elision.
Group elisions. Let M be the member of a group G that is the
elision’s timeline T or has it as a descendant, and λ M’s length,
or its reach when its length is null (section 3.4). The elision’s
start and end, carried to M’s axis as section 3.1 carries a
coordinate to a root, become the proportions p and q of λ (section
3.2), each clipped to [0, 1]: the elision’s stretch in the frame.
The frame’s group elisions are taken in canonical order, and each draws
as its pieces what of its stretch lies outside every piece taken before
it, one the frame does not draw (Where, above) taking no stretch; each
piece is one gap of the frame’s elided axis (section 3.2), with the
natural width n = L × q − L × p and the drawn width set by its
elision’s width as above, {"span": v} giving L × uv with uv = v / λ, and {"canvas": c} c in the frame’s item coordinates, so the
frame’s scale scales it; n instead when it is larger. One stored
width thus sets the gap of every member card at once, and a timeline
lying in two groups has a gap in each frame, each by that frame’s L
and scale. The frame is drawn shorter by DG, the sum of the shrinks
of its gaps (section 8.2), its members’ drawn length L' = L − DG. A
gap runs across the frame’s member cards, from the top of the topmost to
the bottom of the bottommost (section 6.6); every row of every member
card that crosses it stops and resumes there, and the gap draws one
ellipsis, centred on the member cards together, with its label stack
once, below that ellipsis in its drawn tier (section 6.6), its room
taken in the markers band of the elision’s own timeline T in its card
in that frame (section 6.4, Markers) and nowhere else. Its labels show the piece’s ends on T’s
own axis: the elision’s start and end where the piece is its whole
stretch, neither clipped to [0, 1] nor cut by an earlier piece; on any
other piece both ends are read on T at the piece’s proportions, p × λ and q × λ on M’s axis (where λ is exact, the piece’s exact
proportions, defined under Carried gaps below, and the products exact;
where λ is a float, the doubles p and q and the products in
binary64), less T’s start on M’s axis, combined as section 3.1
combines values, and written as section 5.2 writes a coordinate. The
gap’s elided coordinates on a member, or on a timeline its card draws,
are the positions at the proportions p and q of that member’s drawn
length, each the exact product of the piece’s exact proportion (Carried
gaps, below) and that length, a float length taken at its exact binary
value, read on the timeline and written in its number type as a
groupstamp’s coordinates are (section 2). They have no value where a
groupstamp’s coordinate would have none: on a member of unknown length,
and on every member when M’s length is unknown; where a member has
none, no timeline of its card has one. They are listed by an application
and never drawn: card by card in the display order of the frame’s
members, in each card its member, then the other timelines of the
member’s tree the card draws, in traversal order (section 6.1), then the
ancestors whose lines the card draws, from the member’s parent up to its
root. A timeline other than the member is listed only where its span,
its ends included, holds both positions, as a row crossing the gap does
(section 6.6), an ancestor of unknown length having no end. The gap is a
place of the drawing, not a coordinate, so nothing of it is faded. A
position in a frame’s gap has no x (section 3.2): a groupstamp’s lines
and wedges at such a position are not drawn, and at a gap’s edge they
are.
Carried gaps. The ancestor card of R behind G, aligned to M
(section 8.8), keeps M’s span on R over M’s line, so it draws the
frame’s gaps inside its protected span: each gap of the frame over [p, q] becomes a gap of the card over R’s stretch from −ts + p × λ to
−ts + q × λ, with the frame’s natural width n and drawn width g,
taken and never recomputed, so that the card’s gaps lie over the frame’s,
up to the rounding of binary64. Here p and q are the piece’s
exact proportions: the exact quotients of the elision’s start and
end, carried to M’s axis, and λ, each clipped to [0, 1] (a float
taken at its exact binary value), not the doubles that place the frame’s
gap; where an earlier piece cut the elision’s stretch, the cut end is
the earlier piece’s exact end there, so that the carried gaps meet
exactly where the frame’s gaps meet. On an exact axis of R the stretch
is exact, −ts, p × λ and their sum computed exactly, and on a float
axis it is combined as section 3.1 combines values, each exact operand
converted to the nearest double; only its x is rounded (section 3.2). A carried gap is drawn where the frame draws its gap, by the
frame’s mode and display and not by the card’s cascade, in every mode of
R; it is a further drawing of the frame’s gap, carries its elision’s
address and takes the values cascaded for the frame’s gap, ellipsis
included, and it draws one ellipsis, centred on the ancestor card, and
no label. Card
elisions and derived ones are clipped around the protected span, so they
never meet a carried gap, and everything right of M’s span lies OR
further right and DG further left with the frame’s shared end (section
8.8, step 2). A gap of theirs whose edge falls on a seam at the protected
span’s start or end ends or starts there on its own side, at the frame’s
edge, and every row running on from it crosses the seam whole (section
3.2). Rows
are untouched: the card’s ordinates are those of section 8.8.
Derived elisions. An ancestor card of a root R aligned to a member
M derives elisions where its mode is proportional and its proportion
r (below) is less than 1. Let A1 = R, …, Ak be M’s ancestors, Ak
its parent (section 8.3). Depth j holds Aj and, for j ≥ 2,
every other child of A(j − 1) the card draws (a displayed child,
section 2.4; a segment without a line of its own counts when it is
displayed); depth 1 holds R alone. The chosen depths are those of
elision-depths: all of 1 … k for auto, otherwise the depths it
lists that are at most k. From the deepest chosen depth up, and within
a depth in canonical order (section 6.1), each stretch of a timeline’s
span (from its start to its end, sections 3.1 and 3.4) that lies outside
the protected span, outside the spans of the timelines of the deeper
chosen depths and outside every piece found before becomes one piece
lying on that timeline, its ends on that timeline’s own axis. A stretch
no chosen depth covers stays at full scale. So with auto M’s parent
and its siblings take what they cover of R, what they leave uncovered
falls to the next depth up and R takes the rest, and with "1" alone
R is elided once on each side of the protected span, its pieces taken
from R’s own span and their gaps cutting every row of the card that
crosses them, its children’s rows included (section 6.6).
Each piece is drawn as its middle left out: a piece over [a, b]
of its timeline’s own axis, [aR, bR] on the root’s axis, with the
natural width n (section 3.2, with LA), is drawn W = r × n wide as a
visible start, a gap and a visible end. With h = (W − min(32, W)) / 2
and k = n / (b − a), the canvas units per unit of the timeline at full
scale, the difference formed as section 3.1 forms one and the division
in binary64,
its elided coordinates are
start, the larger ofaand⌊a + h / k⌋, andend, the smaller ofband⌈b − h / k⌉, each sum combined as section 3.1 combines values and rounded outwards to a whole unit of the timeline, an integer, which every number type holds exactly:intas the integer,floatas the double equal to it andfractionas[n, 1];the visible ends keep their natural widths,
e1fromaRtostartande2fromendtobR, each on the root’s axis (section 3.2), both 0 wherestart = aandend = b;the gap over
[start, end]is drawng = W − e1 − e2wide, in binary64 left to right, so that the piece staysWwide up to the rounding of binary64.
The gap is that of a derived elision lying on the piece’s timeline,
with the address of section 2.2, no name and no ID, the display that
elision-display gives, and the elided coordinates start and end,
which its coordinate label shows and which an application stores as
they are where it makes the derived elisions stored ones. A piece whose
start and end are its own ends is a gap whole.
The proportion r of an ancestor card is the number its
elision-proportion states, or, for auto, the largest at which (a)
the gaps’ pieces together are no wider than M’s drawn line and (b)
with the view (section 1) centred on the frame at the zoom zb, the
elided card lies within the view. With, in G’s item coordinates:
Symbol |
Meaning |
|---|---|
|
the |
|
|
|
|
|
the width and the height of |
|
|
|
the stretches of |
the zoom at which the group’s frame fills four fifths of the view, capped
at 4, is zG = min(4, 0.8 × VW / (sG × Fw), 0.8 × VH / (sG × Fh)), the
constant factor 0.8 formed first (section 3.3); Z is the double
nearest 5/7, the legibility floor: a row of the default pitch 14 drawn at
Z lies 10 from the next, the fixed part of its pitch (section 6.2); and
zb = min(zG, Z), so that a frame whose zG is below Z is not zoomed
out further. At zb the view shows B = 0.8 × VW / ((2 × zb) × sG) on
either side of c; the card’s line reaches dl = c + σ left of c and dr = (Fw + 8) − c right of it before its gaps, since its seams (section 8.8, step
2) put what lies outside M’s span outside the frame’s edges, at 0 and
Fw, the name column σ left of the one and the card padding K, 8,
right of the other. Then
r = min(1, λ / E × (L' / L), (B − dl) / (L × uL), (B − dr) / (L × uR))
with uL = EL / λ and uR = ER / λ; λ / E, uL and uR are
proportions formed as section 3.2 forms one, λ / E × (L' / L) is that
proportion times the binary64 quotient L' / L, and everything else is
binary64 in the order written. The term of (a) is left out when E is 0,
the left term when EL is 0 or B ≤ dl, and the right term when ER
is 0 or B ≤ dr: a side with nothing to elide, or on which the root
cannot lie within the view whatever its gaps, sets no bound. Where the
term of (a) is the minimum, the drawn widths of the pieces sum to L',
up to the rounding of binary64, and the elided line is 2L' long. A
stated proportion sets r whatever (b) gives, so the drawing then does
not depend on the view.
Worked examples, at the default view 1280 × 720 and the length 400,
so 0.8 × VW = 1024, 0.8 × VH = 576, zb = Z = 0.7142857142857143 and
B = 716.8 wherever zG exceeds Z, which it does in each:
The fixture
group_elided_inside(auto): the rootpieceof 64 quarters, its movementsfirst(32 at 0) andsecond(32 at 32), and the memberexcerptof 8 at 8 infirst, sots= −8,EL= 8,ER= 48,E= 56 andLA= 3200, 50 canvas units per quarter. Depth 2 holdsfirstandsecondand gives the piecesfirst0–8,first16–32 andsecond0–32; depth 1 is left nothing.r= 0.14285714285714285, set by (a): the frame, 543.70361328125 wide and 171.5625 high as laid out before its rows align (drawn 191.5390625 high oncepiece’s row aligns on the card, section 8.3), giveszG= 1.8833790598156273 andc= 271.851806640625, and withx0= 103.70361328125 andσ= 87.4248046875 (N'the width of the row nameFirst, Second),dl= 359.276611328125 anddr= 279.851806640625, so (b)’s terms are 0.8938084716796874 on the left and 0.1820617472330729 on the right. The natural widths are 400, 800 and 1600,W57.14285714285714, 114.28571428571428 and 228.57142857142856, andh / k0.2514285714285714, 0.8228571428571427 and 1.9657142857142855: the first two round outwards to their own ends, so each is a gap whole, 57.14285714285714 and 114.28571428571428 wide; the third leaves outsecond1–31 (labelled1–31 ♩), keeping 50 ofsecondat full scale on each side, its gap 128.57142857142856 wide.DL= 239.1535295758929, the shrink 342.8571428571429 of the one gap left of the frame lessOL= 103.70361328125. The gaps overfirstcut the rows ofpieceandfirst, that oversecondthe rows ofpieceandsecond, each gap with one ellipsis.The fixture
bundle_elided_layerit, the card of the suiteclt_1(1616 quarters) behind the frame ofclt_8“Clair de Lune mm. 1–6” (27 at 0 inclt_4“Clair de Lune”, 324 at 668):x0= 182.8037109375, the block’s start (n + N + G' + 8w,Nthe width 134.8037109375 ofPassepied mm. 153–156),LA= 23940.74074074074,E= 1589 andr= 0.016991818753933293, set by (a): the frame ofclt_8isx0 + L + 8w + K + Q= 622.8037109375 wide, its right edge the outer chevron tip ofclt_1’s ancestor line, and 171.5625 high as laid out before its rows align (drawn 191.5390625 high once they align on the card, section 8.3, the four movements forming one row there), sozG= 1.6441777433512452 andc= 311.40185546875;σ= 175.8974609375,N'= 159.8974609375 being the width of the movements’ row name cut toPrelude, Menuet, Clair de L…(section 6.6, Names), sodl= 487.29931640625,dr= 319.40185546875 and (b)’s terms are 0.023190563087691803 on the left and 0.029125271179000402 on the right. Depth 2 gives the pieces Prelude 0–356, Menuet 0–312, Clair de Lune 27–324 and Passepied 0–624, drawnW= 89.61611076148522, 78.53996224040277, 74.7640025173065 and 157.07992448080557 wide. Their gaps leave out Prelude 1–355 (h / k= 1.944543738200126), Menuet 1–311, Clair de Lune 28–323 and Passepied 4–620 (h / k= 4.221447451227188), so each movement keeps its start and end at full scale: the visible ends are 14.814814814814815 and 14.814814814814781 of Prelude, 14.814814814814781 and 14.814814814813872 of Menuet, 14.81481481481569 and 14.814814814813872 of Clair de Lune, and 59.259259259259125 on either side of Passepied, the gaps 59.986481131855626, 48.91033261077412, 45.13437288767693 and 38.561405962287324 wide. In the card ofclt_1behind the frame ofclt_9(Passepied mm. 153–156) the name labelsMenuet(33.7763671875 wide) andClair de Lune(59.431640625 wide) of the neighbouring gaps over Menuet and Clair de Lune would overlap as drawn, soClair de Lunelies in drawn tier 2, one line below the labelsPrelude,MenuetandPassepiedin drawn tier 1, and the markers band of Clair de Lune takes its room as an item two lines high, and with it the markers band of every movement of that row of one band order (section 6.4, Rows of one band order), so that the frame ofclt_9is drawn 202.015625 high; no gap moves andris unchanged (section 6.6).The fixture
group_elided_members: the frame ofgroup_1(L400) draws two group elisions.elision_1on the memberexcerpt(16 quarters) from 2 to 8 has the stretchp= 0.125 toq= 0.5, the natural width 150 and the standard gap 32;elision_2onphrase, at 12 in the membervoice(24 quarters), from 2 to 6 is 14 to 18 onvoice,p= 0.5833333333333334 toq= 0.75, the natural width 66.66666666666666 and, with{"ratio": 0.5}, the gap 33.33333333333333.DG= 151.33333333333331 andL'= 248.66666666666669. Each gap cuts every row of the three cards that crosses it, the ancestor line ofpiecein the card ofexcerptincluded, and the line ofsketch, whose open end counts as its whole drawn length; the stack ofelision_1,Developmentand2–8 ♩, takes its room in the markers band ofexcerptand stands under the gap’s ellipsis;elision_2, which states nodisplay, draws its ellipsis and its name labelPhrase, whose room the markers band ofphrasetakes. Onvoicethe elided coordinates are 3 to 12 and 14 to 18, onsketch, of unknown length, none have a value. The groupstamp at 15 ofvoicelies in the second gap and is not drawn; that at 21 is drawn, faded oversketch(section 6.6). The ancestor card ofpiece(48 quarters;ts= −16,LA= 1200, 25 canvas units per quarter) carries the gaps overpiece18 to 24 and 76/3 to 28 (16 + 7/12 × 16and `163/4 × 16
, exact on its fraction axis), 32 and 33.33333333333333 wide of 150 and 66.66666666666666. Underautoit derives elisions atr= 0.5 × (248.66666666666669 / 400) = 0.31083333333333335, set by (a), the frame being drawn 383.2599283854167 wide (DGnarrower) and 259.9921875 high:zG= 2.2154511854322547,c= 191.62996419270834,x0= 90.09326171875,σ= 58.09326171875,dl= 249.72322591145834 anddr= 199.62996419270834, so (b)'s terms are 1.167691935221354 and 1.292925089518229. Depth 1 givespiece0–16 and 32–48, each of natural width 400,W= 124.33333333333334 andh / k= 1.846666666666667, so their gaps leave outpiece1–15 and 33–47, 25 at full scale on either side and 74.33333333333334 wide;DL= 185.57340494791663, their shrink 275.66666666666663 left of the frame lessOL` = 90.09326171875.
Stored elisions, the fixture
bundle_elisions_stored. In the ancestor card ofscore(64 quarters) aligned to its childtheme(8 at 16;LA= 3200, the protected span 16 to 24), underauto, which readscustom:elision_4from 0 to 20 with{"ratio": 0.5}is clipped to 0–16, natural width 800, drawn 400 wide;elision_5from 32 to 48 with{"span": [4, 1]}is drawn 3200 × 0.0625 = 200 wide of 800, its nameDevelopmentits one label;elision_6from 40 to 56 with{"canvas": 30}overlaps it, comes later in canonical order and is clipped to 48–56, 30 wide of 400, a bare gap;elision_1lies oncoda, whose line a rule hides, and is not drawn, the coda’s stretch drawn at full scale.elision_3on the member rootrecording(10.0 seconds) from 0.0 to 2.0 is a group elision: its stretch in the frame runs from 0.0 to 0.2, its natural width 80 and its standard gap 32, soDG= 48 andL'= 352; it is carried into the ancestor card ofscoreover 16 to 88/5 (16 + 1/5 × 8, 1/5 the exact quotient of 2.0 and 10.0, exact on the score’s fraction axis) and into that ofsessionover 30.0 to 35.1 (on its float axis), which draws it although the session’s cards arefull: a carried gap follows the frame, not the card’s mode, and the rule hiding every elisionwithinsessionmatches no elision ofrecording. The session’s ownelision_7is not drawn, hidden by that rule and left out byfullalike, and kept in the manifest. In the ungrouped card ofpage(1754 pixels, length 400),elision_2“Appendix” from 600 to 1754 has the natural width 263.169897377423 and the standard gap 32, so the line is 168.830102622577 long, and its labelsAppendixand600–1 754 pxstand under its ellipsis.
8.10 Virtual timelines and switched cards#
A FlowMap (README, “FlowMaps and virtual timelines”) is drawn as the axis
it plays, its virtual axis: by the card of a virtual timeline that
applies it, a virtual card, and by the card of its own timeline where
the card’s flow names it, a switched card. Both draw the chunks of
the FlowMap alike. Nothing here reads flow control or computes a flow:
every position comes from the FlowMap’s chunks by the arithmetic of
section 3.1.
Resolution. A FlowMap F whose timeline names a root R is
resolved into a list of pieces on R’s axis, taking the entries
of its chunks in their order; the entry at index k, from 0, gives
for a gap
{gap: g}: one gap piece, of the lengthg;for the ID of a region
Xof a timelineTofR’s tree,Ritself included: one stretch[s + X.start, s + X.end],sthe start ofTonR’s axis (section 3.1);for the ID of a child timeline
Cat any depth: one stretch[s, s + C.length],sthe start ofConR’s axis;for the ID of a virtual timeline
W: the piecesWresolves to, below, in their order.
Every piece belongs to the entry that gave it, so the pieces of a virtual
timeline named as a chunk are one entry. F is unresolved where its
timeline names no root, where an entry names a child of unknown length
or a virtual timeline that does not resolve, and where it is reached again
while it is resolved, through the virtual timelines its entries name. A
virtual timeline V resolves where its map is a FlowMap that
resolves, its timeline is that FlowMap’s timeline and it states no
through, to that FlowMap’s pieces; every other virtual timeline, one
applying a conversion map, one stating through, one applied to another
timeline, is unresolved.
The pieces lie end to end on the virtual axis from 0: the first starts at
P0 = 0, and each further one where the one before it ends, P(i + 1) = Pi + ℓi, ℓi the length of piece i, b − a for a stretch [a, b] and
g for a gap, each sum combined as section 3.1 combines values; the
played length Λ of F is the end of the last piece, 0 where there
is none. An entry’s span runs from the start of its first piece to the
end of its last.
Runs. A run is a longest sequence of n ≥ 2 consecutive entries
naming one ID; gaps form none. In a card that is an item of the block,
never in a frame, a run is drawn once: its first entry is drawn, and
the rest of its span, from the end of its first entry a to the end of
its last b, is a run gap, a gap of section 3.2 over [a, b] whose
drawn width is 0, so that its whole natural width is its shrink: the run
takes the drawn width of one entry and every position after it lies that
shrink further left, as after an elision. The shrink is not subtracted,
though: a position t at or after the end b of a run gap, compared
exactly, and before the start of the next one has the x
x(t) = x(a) + (L × u − L × ub − D)
x(a) the x of the gap’s start, by this same rule where an earlier run
gap lies before it, ub the proportion of b, the two products formed
first, and D the sum of the shrinks of the gaps of elisions lying on the
card’s virtual timeline (Elisions of a virtual timeline, below) from b
up to t, those with b ≤ a' and b' ≤ t for a gap over [a', b'],
compared exactly and summed from the left as section 3.2 sums them, 0
where there is none; the end of the line, at u = 1, so lies at x(a) + (L − L × ub − D) for the last run gap, D the shrinks of every gap of an
elision after it. So x(b) = x(a) exactly, and the entry after a
run starts where the run’s drawn entry ends, which L × u − D would miss
by the rounding of D. A run gap is no elision: it has
no address, draws nothing, neither rectangle, ellipsis, continuation nor
label, and cuts no row, a row that crosses it being drawn across it whole
as across a seam (section 3.2); a position in it, a < t < b compared
exactly, is not drawn and takes no room. A card with run gaps lays out
every first fit (section 6.3) by the drawn x less x0, not by L × u, so
that the rows follow the drawn widths. In a frame every
entry is drawn: the members of a group share one linear axis (section
8.2), which a gap of one member’s runs would break.
The virtual card. A virtual timeline V is drawn as the root of its
member drawing (section 8.1): in a card of its own where it is a placed
virtual timeline, an item of the block at the place places states under
its ID, and in the frame of each group that has it as a member. Removing
the ID from places hides the card and keeps the virtual timeline. Its
axis is its own, from 0 to its length, its λ of section 3.2 that
length, and the positions of its named timestamps their coordinates. Where
V resolves, the entries of its FlowMap lie on that axis at their spans,
whatever V’s length states (a valid manifest states their sum where
the axis is exact). Its card draws
its line, a
timelineelement with the address{"id": V}in the style ofV’s unit, fromx(0)tox(λ), with the start circle and, its end fixed by its map, the end circle of a locked root (section 6.6), never an arrowhead or chevrons; over the span of every gap entry the line is not drawn and a gap line stands in for it (section 6.6, Gap lines), the line written as its pieces from the left;its chunks, in its regions band (section 6.4, Regions): each drawn entry
ka brace over its drawn span, for a run drawn once over its first entry’s span, aregionelement with the address{"id": V, "facet": "regions", "part": [k]}, and a gap entry no brace; each entry its label, alabelelement{"id": V, "facet": "regions", "part": [k, "label"]}placed as a region’s label (section 6.6, Regions) with its leader{"id": V, "facet": "regions", "part": [k, "leader"]}where it moves to a further tier. The label is the name of the entry’s source: a region’sname, or its whole ID where the name is null, so that every chunk is labelled; a child timeline’s or a virtual timeline’s name (section 5.3); and for a gap the pretty text of its length onR’s axis (section 5.2:2 ♩,5.764″). The label of a run drawn once is its first entry’s followed by a space,×(U+00D7), a space andnin decimal digits, in the label’s own font size and place, so that a loop of four bars played eight times is labelledLoop × 8. A chunk’s brace matches{"element": "region"}and the rules selecting its address, never aclass(it has notypestatement), so the default hiding atomic sections hides no chunk whose source is one;its boundaries: at the drawn start of every entry
k ≥ 1that is not the second or a later entry of a run drawn once, aboundaryelement{"id": V, "facet": "regions", "part": [k, "start"]}drawn as a segment’s (section 6.6, Boundaries), held by the line and hidden with it, not with the regions band, and reaching the boundary half-height 8 on both sides of the line (section 6.4, Level 0);its named timestamps, in its markers band, with their cross-section lines, and in a frame its groupstamps across the frame, as every root’s;
its name (section 6.6, Names): the name of
V(section 5.3) followed by· unfolded fromand the name of itstimelinewhere itsmapis a FlowMap, and by· converted fromand that name where it is a conversion map,·being U+00B7:Allegro, default · unfolded from Allegro. A rule setting the name’scontentreplaces the whole text.
A virtual timeline has no children, conversion maps or flow control, so
its children, conversion maps and flow control bands are never present;
its band order is its entry of graphical.order, else the default of
section 4. It lies in no tree: it has no ancestor line and no ancestor
card. A new virtual timeline is so drawn stripped down: it lends nothing
of the bands of the timeline it comes from, unlike a switched card
(below). An unresolved virtual timeline draws its line whole, its named
timestamps, its elisions and its name, and no chunk, boundary or gap
line.
Elisions of a virtual timeline. An elision may lie on a virtual
timeline V (section 2). Its start and end are positions on V’s own
axis, the played axis from 0 to V’s length, never on the axis of the
timeline V comes from: it leaves out a stretch of the playing, and
nothing of the written timeline, so a stretch played twice is left out
only where the elision lies, and no other card of that timeline draws it.
V is the root of its member drawing and lies in no tree, so an elision
on it is a group elision of each group V is a member of, drawn across
that group’s frame (section 8.9, Group elisions), and otherwise a card
elision of V’s placed card, drawn as that card’s elision-mode selects
(section 8.9, Modes): a placed virtual card, like an ungrouped root’s
card, has no protected span and derives nothing, so proportional draws
no gap there, and auto and custom draw the stored ones. A card
elision of V is taken as section 8.9 takes one (Pieces, Widths), on
V’s axis with λ V’s length, except that its pieces are what of its
stretch lies outside every run gap of the card as well: a run gap is
drawn 0 wide already, and an elision leaves nothing out there. Each piece
is a gap of section 3.2 and cuts what crosses it as every gap does
(section 6.6, Elisions): the line and its gap lines are drawn in pieces,
a chunk’s brace is cut as a region’s is, and is not drawn, with its
label, where its start, end or midpoint lies in the gap, and a boundary
or a named timestamp marking a position in the gap is not drawn. A
card switched to V (below) draws none of V’s elisions: it draws its
own timeline, and no elision at all.
So, in the worked example below, an elision of virtual_1 from [10, 1]
to [14, 1] on its placed card (L = 400) lies wholly in the run gap
[8, 16] of entries 0 and 1: it has no piece and draws no gap. One from
[17, 1] to [19, 1] with the width {"canvas": 8} lies in entry 2: its
one piece has the natural width 400 × u(19) − 400 × u(17) =
316.66666666666663 − 283.33333333333337 = 33.33333333333326, the drawn
width 8 and the shrink 25.333333333333258; it lies after the run gap, so
x(17) = x0 + (133.33333333333331 + (283.33333333333337 − 266.66666666666663 − 0)) = x0 + 150.00000000000006 and x(19) = x0 + (133.33333333333331 + (316.66666666666663 − 266.66666666666663 − 25.333333333333258)) = x0 + 158.00000000000006; the brace of B, whose
midpoint 20 lies in no gap, is cut there, the gap draws no ellipsis (it is
narrower than 20), and the line ends at `x(24) = x0 + (133.33333333333331
(400 − 266.66666666666663 − 25.333333333333258)) = x0 + 241.33333333333343` in its end circle.
Switched cards. A card of a timeline T that reads flow (section
2.4), a member’s card or the card of an ungrouped root, is switched
where its cascaded flow names a FlowMap F of T that resolves, or a
virtual timeline that resolves to such a FlowMap; it is drawn as written
otherwise. A switched card is laid out by section 6 on F’s virtual axis,
λ being Λ:
its root line is drawn as a virtual card’s line, from 0 to
Λ, with its gap lines, its chunks and their labels in its regions band beforeT’s regions, and their boundaries, each carryingT’s ID in place ofV’s ({"id": T, "facet": "regions", "part": [k]});it keeps the band configuration of the card drawn as written: every band of
Tand of every timeline of its tree, the children, markers, regions, conversion maps and flow control bands alike, is laid out by section 6.4, displayed or hidden, in its band order and in its cascaded style as it is there, so that a band hidden on the card drawn as written is hidden on the switched card, and hides what it holds (section 2.4);every element those bands hold, and every segment’s boundary and label on a line of
T’s tree, is unfolded: drawn in every stretch piece whose written stretch holds it, at its played positions. A positiontonT’s axis (section 3.1) lies in a stretch piece[a, b]starting atPwherea ≤ t < b, or wheret = band that piece is the last or is followed by a gap or by a stretch that does not start atb, and is played there atP + (t − a), combined as section 3.1 combines values; a position in no stretch is not drawn. An element at a position, a flow-control element with its flow line, symbol, fork and stack, a named timestamp’s wedge with its labels and cross-section line, a segment’s boundary, is drawn at every played position of its position, each drawing with its labels. An element over[s, e], a child’s line, a region, a map over the extent of its timeline (sections 3.1 and 3.4), is drawn once in every stretch piece wheremax(s, a) < min(e, b), over the played positions of those two ends, so clipped to the piece, keeping its start mark only wheremax(s, a) = sand its end mark only wheremin(e, b) = e, as a row cut at an elision (section 6.6, Elisions); an element over a stretch that no piece reaches into is not drawn. A region so clipped is drawn as a whole brace over its played stretch, with its whole label centred on that brace’s played midpoint in every drawing (section 6.6, Regions), never a part of its name; a child’s line so clipped keeps its one name in the name column (below); a map so clipped is a closed double line over its played stretch; a segment’s label is placed over each drawing of its segment as a clipped region’s label is over its brace. An arc of a jump is drawn in a piece only where its from and its to both lie in that piece, from the played x of the one to that of the other, with its label, as the flow control band of a member that is a child timeline draws no arc whose to lies outside its stretch (section 6.4, Gathering): a jump played in a piece that does not hold its to draws its symbol, its fork and its stack there and no arc. Within one piece the drawings keep the tree of section 2.1, a child’s drawing holding the drawings in that piece of what the child holds, and section 6 lays each drawing out as one item, the conversion maps’ slots and the flow rows included, the drawings taken piece by piece, in the order of the pieces, and within a piece as section 6 takes the elements. Every drawing keeps its element’s address (section 2.2), and a label of a coordinate shows the written coordinate, never the played one. A row of the name column holding several drawings of one timeline names it once (section 6.6, Names). An alignment anchor joins the nearest pair of its timestamps’ cross-section segments (section 8.7);no gap of a stored, derived or group elision (section 8.9), and none of an elision lying on the virtual timeline
flowmay name;its name is the row name of
Tfollowed by·and the name of the FlowMap or virtual timelineflownames, itsnameor, where that is null, its whole ID.
Runs are drawn once on the switched card of an ungrouped root and on no card in a frame (Runs, above).
So switching keeps what the card shows, where a new virtual timeline’s
card starts stripped down (The virtual card, above). In flow/switched_card
the card of allegro (1644 quarters) is switched to default, playing
section_a, section_b, section_a, section_c: the pieces [0, 953/2] at 0, [953/2, 500] at 953/2, [0, 953/2] at 500 and [500, 1644] at 1953/2, Λ = 4241/2. Its bands are those of the card drawn as
written, in the default band order. The jump volta_jump at 953/2 ends
piece 0, which a stretch starting at 953/2 follows, so it lies in piece 1,
and it ends piece 2, which a stretch starting at 500 follows, so it lies
there too: its symbol, fork and stack are drawn at the played positions
953/2 and 500 + 953/2 = 1953/2. The three elements at 500, repeat_end,
second_ending and volta_break, end piece 1, which a stretch starting
at 0 follows, and start piece 3: each is drawn at 953/2 + (500 − 953/2) =
500 and at 1953/2. A rule showing the arcs draws none on this card: the
one arc, of repeat_end, runs from 500 back to 0 (its destination states
no place, neither to nor by, so it leads back to 0, no section break
lying before it, section 3.1), and no piece holds both ends. The atomic
sections, which the defaults hide, are drawn under the rule of section
2.3 after the chunk braces in the regions band:
A over [0, 953/2] and [500, 1953/2], B over [953/2, 500] and
C over [1953/2, 4241/2], each with its whole label. A child of
allegro over [450, 520], were one added, crosses the ends 953/2 and
500 of the stretches: it is drawn over [450, 953/2] in piece 0 with its
start circle, over [953/2, 500] in piece 1 with no mark, over [950, 1953/2] in piece 2 with its start circle and over [1953/2, 1993/2] in
piece 3 with its end mark, and named once in its row.
Switched frames. A frame is switched where exactly one of its
members T has a switched card in it: every member card of the frame is
drawn on T’s FlowMap F, every member carried through the group. A
position m on the own axis of a member M goes to T’s axis at t = (m × λT) / λM, λM and λT the lengths of M and T or their reaches
where unknown (section 3.4): exact where all three are exact, and
otherwise in binary64, each exact operand taken as the nearest double and
the product formed first. It is the position a groupstamp’s line marks on
T (section 6.6, Cross-section lines), and unfolds there as above; an extent
of M goes so at both ends, and M’s own line, from 0 to its end, is
drawn as a child’s line is, once in every stretch piece it reaches into,
its start circle and its end mark kept only where they lie in that piece.
Every member drawing of the frame then lies
on F’s virtual axis from x0 to x0 + L (section 8.2) and draws its
own tree unfolded, its ancestor lines included, keeping the band
configuration of its card drawn as written as a switched card does
(above): every band of its tree as written, flow control and conversion
maps included, every element they hold carried to T’s axis and then
unfolded, an arc drawn in a piece only where its from and its to, both
carried, lie in that piece. In groups/switched_frame the card of
allegro switches the frame of performance to default: allegro’s
card in the frame draws its flow control, and its atomic sections where
a rule shows them, at the played positions of the worked case above, and recording (702.5 seconds)
draws its line once in each of the four pieces, a position m of it
carried to t = (m × 1644) / 702.5 in binary64, so that a timestamp at
351.25 would lie at 822.0 and be played in piece 3 at 976.5 + (822.0 −
500) = 1298.5. Only T’s card draws the
chunks of F, their boundaries and its gap lines, a virtual member’s own
chunks unfolding as every other element of its drawing, and over a gap of
F every other member draws nothing. An ancestor line of a member M
that is a child timeline (section 8.3) is unfolded as M’s own line is:
the stretch of M’s axis it is drawn over, from 0 to te where te < λ
and to λ otherwise, goes to T’s axis at both ends and is drawn once in
every stretch piece it reaches into, from the played x of its start there
to that of its end, keeping its start only where max(s, a) = s and its
end only where min(e, b) = e; a start or end so kept is drawn as section
8.3 draws it, with the played x of 0 in place of x0 (a line running on
to the left starts 4w before it, in chevrons) and the played x of its
end in place of x0 + L' and of x(te) (a line running on to the right
ends 4w after it, in chevrons), and an end not kept draws no mark. The
named timestamps on it and the secondary coordinates on it are drawn at
every played position of their positions on M’s axis, labelled with the
written coordinates, their stacks placed by its one first fit piece by
piece, in the order of the pieces, and within a piece in the order of
section 8.3. The start s0 of section 8.2 still counts every ancestor
line that runs on to the left. A groupstamp’s lines cross the frame
at every played x of its position. A switched frame draws no group elision and
carries none into the ancestor cards behind it, which are drawn as
written. Where two or more members of a group have switched cards, which
both validators warn of (flow_conflict), its frame and all its cards are
drawn as written: a frame has one axis, and no member’s flow outranks
another’s.
Overlays. The flow subeditor’s pane, which an editor folds out under the card it edits, is an overlay of the editor and no element of a drawing; SVG and TikZ never write it. The translucent twin a drag lifts out of that pane is such an overlay too. The ribbons that join a chunk to its stretch on its source’s card are such overlays as well, like the coordinate flag.
Worked example. The FlowMap flow_map_1 of score (16 quarters,
the regions region_1 “A” from 0 to 8 and region_2 “B” from 8 to 16)
plays region_1, region_1, region_2; the virtual timeline
virtual_1 (24 quarters) applies it to score. Its pieces are [0, 8]
at 0, [0, 8] at 8 and [8, 16] at 16, Λ = 24. In a card of its own
at the length 400, entries 0 and 1 are a run drawn once: the run gap over
[8, 16] has the natural width 266.66666666666663 − 133.33333333333331
= 133.33333333333331, its shrink; entry 0 is drawn from x0 to x0 + 133.33333333333331 labelled A × 2, entry 2 from x(16) = x0 + (133.33333333333331 + (266.66666666666663 − 266.66666666666663)) = x0 + 133.33333333333331 to x(24) = x0 + (133.33333333333331 + (400 − 266.66666666666663)) = x0 + 266.6666666666667 labelled B, with one boundary at x(16), addressed {"id": "virtual_1", "facet": "regions", "part": [2, "start"]}, and the line
ends at x(24) in an end circle. In a frame with recording (10.0
seconds) the run is not drawn once: the entries are drawn at x0, x0 + 133.33333333333331 and x0 + 266.66666666666663 to x0 + 400,
labelled A, A and B, with boundaries at entries 1 and 2.