visualization.layout
layout
From an OmkGraph to a DotGraph: the one place that knows what OMK’s edges mean for placement.
Two axes. The rank is a node’s column along the sequence axis: the order of onsets, as a timing walk (OmkGraph.onsets) finds them, so everything that starts at one instant shares a column, whether a pin says so or the durations imply it. Nodes the walk cannot reach are ranked by NEXT alone. The row is a node’s position across the sequence axis: every NEXT chain is a row, an attached node (a mark, a part, a marker) is a satellite of a row, and the conventions below say which row goes above which.
Both are computed here and handed to Graphviz explicitly: every rank is a rank=same subgraph whose nodes are chained by invisible edges in row order, and an invisible spine of one node per rank fixes the order of the columns. Graphviz then only assigns coordinates and routes the edges.
The conventions are the tables and small predicates at the top of this module; the machinery below reads them and should not need to change when one does.
Attributes
| Name | Description |
|---|---|
| ABOVE | |
| BELOW | |
| ALIGNING_TYPES | |
| SEQUENCE_TYPES | |
| UNDRAWN_CONTAINERS | |
| INVISIBLE_NEXT | |
| BRANCH_DISTANCE | |
| LYRIC_DISTANCE | |
| PIN_DISTANCE | |
| SATELLITE_DISTANCE |
Functions
| Name | Description |
|---|---|
| satellite_side | Which side of its line an attached node sits on. |
| satellite_distance | |
| pinned_row_side | Where a line pinned to another goes: a chord line above, anything else below. |
| highest_tone | |
| branch_side | Where a branched line goes: above its parent’s line when its head sounds |
| build | The DOT model of graph under config. |