Skip to main content

Module tokens

Module tokens 

Source
Expand description

RomanText’s tokens as music21’s romanText.rtObjects reads them: a tagged line, a measure line and the atoms of a measure, each sorted by the patterns music21 sorts them by.

The reader in this crate’s super module reads a whole document into a score; these are the single steps, for those who look at the tokens themselves.

Structs§

MeasureLine
A measure line read as music21’s RTMeasure reads one.

Enums§

AtomKind
What one word of a measure is: music21’s subclasses of RTAtom.
Tag
What a tagged line’s tag says it is: music21’s RTTagged.isComposer, isTitle and the rest.

Functions§

atoms
The atoms of a measure’s data, each word with what it is: music21’s RTHandler.tokenizeAtoms. A lone = ends them, since what follows it is copied.
beat_float_or_frac
A beat atom’s beat, independent of any meter: music21’s RTBeat.getBeatFloatOrFrac. b1.66 is beat one and two thirds, and a third part is that much of the second’s denominator: b1.66.5 is half a third further on.
copy_target
The measures a copying measure line copies, from its data: music21’s RTMeasure.getCopyTarget.
header_end
The index of a document’s first measure line, where its header ends.
key_signature_sharps
The sharps a key signature atom gives, negative for flats: KS-2 is two flats.
measure_number_data
A measure number, or the two of a range, and the repeat letter of each: music21’s RTMeasure._getMeasureNumberData.
measure_tag_length
How much of a line its measure tag takes, m3-4 of m3-4 = m1-2, or nothing where it starts with none.
optional_key_name
The key an optional key’s start or end names, as music21 writes a key: ?(Bb: names B-.
read_measure_line
A measure line’s parts.
split_tagged
A tagged line’s tag and data, either side of its first colon and stripped; a line without one is all data.
tag_of
The tag a line’s tag names, any case, or nothing for another.