A timeline is the one argument a host is most likely to hold from somewhere
else — an in-memory project value, a previous run restored to a timeline, or
another library's output — and
it is read field by field deep inside an analysis. Checking it once at the
entrance names the argument that is wrong instead of reporting the library's
own TypeError from wherever the first segments lookup happened to be.
The segments are checked too: every reader of a timeline compares beats, and
a segment whose bounds are missing compares as neither before nor after, so
it disappears from the analysis rather than being reported.
Reject a value that is not a chord timeline.
A timeline is the one argument a host is most likely to hold from somewhere else — an in-memory project value, a previous run restored to a timeline, or another library's output — and it is read field by field deep inside an analysis. Checking it once at the entrance names the argument that is wrong instead of reporting the library's own
TypeErrorfrom wherever the firstsegmentslookup happened to be.The segments are checked too: every reader of a timeline compares beats, and a segment whose bounds are missing compares as neither before nor after, so it disappears from the analysis rather than being reported.