pub fn replaced_elements(
stream: &Stream,
variant: usize,
class_list: &[&str],
keep_original_offsets: bool,
include_spacers: bool,
) -> Result<Stream>Expand description
What the variant at event variant of a stream stands in for: the
elements of the stream of the classes of what the variant holds (and of
class_list) starting where it does and within its replacement length,
at their offsets from the variant’s unless keep_original_offsets:
music21’s replacedElements. With include_spacers, the span goes on
by as long as the first hidden rest the variant holds.
A variant shorter than what it replaces stands in, past what it holds, for everything there whatever its class, which music21 puts that much later again.
§Errors
No variant at variant, or with include_spacers no hidden rest in it.