Expand description
What decides which of two things comes first in a stream: music21’s
sorting.
music21’s sorting: the rules of its SortTuple, the six numbers that
decide which of two things comes first in a stream.
The tuple itself is a Python class; what is here is what it decides that is not plain tuple order: how one compares against a bare offset, how two combine, and how one is written short.
Enums§
- Comparison
- A comparison of a sort tuple against a bare offset.
Constants§
- SORT_
TUPLE_ FIELDS - The tuple’s fields, in music21’s order, which is the order they are compared in.
Functions§
- at_
end_ compared - What a tuple stored at the end of its stream answers when compared against a bare offset: it stands after every offset but infinity, and equals infinity alone.
- is_
flag_ field - Whether a field combines with another tuple’s by the larger of the two
in
addand the smaller insub, asatEndandisNotGracedo, rather than by adding or subtracting. - short_
repr - A tuple written short, each part already written as Python writes it:
1.0 <0.20.323>, orEnd <4.7.[Grace].200>for a grace note stored at the end, whose offset is left out.