Skip to main content

Module segment

Module segment 

Source
Expand description

A part cut into segments of braille music, measure by measure and grouping by grouping: music21’s braille.segment and braille.noteGrouping.

music21 marks the notes of the part it transcribes with attributes for the time it transcribes them – the slurs over them, how their beams read, a full measure’s rest – and writes each sign’s English onto the element. Here each element of a segment is a BrailleElement that carries those beside a copy of the element.

Structs§

BrailleElement
An element of a segment with what music21 keeps on it while transcribing: where it stands, its affinity, how it sorts, its English, its note context, and a key signature’s predecessor.
BrailleElementGrouping
A grouping of elements written together: music21’s BrailleElementGrouping.
BrailleGrandSegment
A piano’s two staves cut into segments of groupings for each hand, written side by side: music21’s BrailleGrandSegment.
BrailleSegment
A part cut into segments of groupings, ready to transcribe: music21’s BrailleSegment.
NoteGroupingTranscriber
Writes the elements of a grouping one after another, octaves where needed: music21’s NoteGroupingTranscriber.
SegmentKey
Where a grouping stands: its measure, its place among the measure’s groupings, its kind and its hand: music21’s SegmentKey.
SegmentOptions
The options music21’s translation takes, as a segment reads them.

Enums§

Affinity
Which kind of grouping an element goes in, in the order a measure’s groupings are written: music21’s Affinity.
Hand
The hand a keyboard part is played by.

Functions§

extract_braille_elements
The elements of a measure or voice braille writes, clefs before the note they stand before, sorted by offset and braille’s sort order: music21’s extractBrailleElements.
find_segments
A part’s segments, each told its options, its groupings their attributes and its articulations fixed: music21’s findSegments.
get_raw_segments
A part’s measures cut into segments of groupings: music21’s getRawSegments. A segment ends after a double or final barline once it holds more than 48 elements.
prepare_beamed_notes
Marks the notes of a measure that begin and continue a beamed group of three or more notes of one value shorter than an eighth, which braille writes as eighths after the first: music21’s prepareBeamedNotes. The marks go in contexts, by element.
prepare_slurred_notes
The slurs of a part as each note writes them, by leaf: short slurs after each note, long ones with brackets or doubled at their ends: music21’s prepareSlurredNotes.
split_note_grouping
A measure of groupings split in two at the middle of its bar, or nearer its start by beat_division_offset divisions of a beat, tied notes kept with the first half and each half beamed again: music21’s splitNoteGrouping.
transcribe_note_grouping
A grouping in braille from a fresh transcriber: music21’s transcribeNoteGrouping.