Skip to main content

cut_translation_into_segments

Function cut_translation_into_segments 

Source
pub fn cut_translation_into_segments(
    translation: &Translation,
    segment_length: usize,
    overlap: usize,
) -> Result<Segments>
Expand description

A translation cut into stretches segment_length characters long, each starting segment_length - overlap after the one before, the last as long as what is left: the second half of translate_monophonic_part_to_segments, for a caller whose translator answers a Result – music21’s diatonic translation does, and its own translateMonophonicPartToSegments takes it.

§Errors

As translate_monophonic_part_to_segments.