notetools.yield_groups_of_notes_in_sequence

abjad.tools.notetools.yield_groups_of_notes_in_sequence.yield_groups_of_notes_in_sequence(sequence)[source]

New in version 2.0.

Yield groups of notes in sequence:

abjad> staff = Staff("c'8 d'8 r8 r8 <e' g'>8 <f' a'>8 g'8 a'8 r8 r8 <b' d''>8 <c'' e''>8")
abjad> f(staff)
\new Staff {
    c'8
    d'8
    r8
    r8
    <e' g'>8
    <f' a'>8
    g'8
    a'8
    r8
    r8
    <b' d''>8
    <c'' e''>8
}
abjad> for note in notetools.yield_groups_of_notes_in_sequence(staff):
...     note
...
(Note("c'8"), Note("d'8"))
(Note("g'8"), Note("a'8"))

Return generator.

This Page