Skip to main content

notes_and_durations_to_stream

Function notes_and_durations_to_stream 

Source
pub fn notes_and_durations_to_stream(
    notes: &[StreamElement],
    lengths: &[usize],
    score_notes: Option<&Stream>,
    remove_rests_at_beginning: bool,
) -> Result<(Stream, FloatType)>
Expand description

A score of one part holding notes, each as long as its length in quantize_durationd quarters of the estimated quarter length, and that estimate: music21’s notesAndDurationsToStream. The estimate is quarter_length_estimation against the most common note length of score_notes where given, or against a quarter. With remove_rests_at_beginning, rests before the first note are left out. The score is titled Automatic Music21 Transcription.

§Errors

Fewer notes than lengths, or no lengths.