construct.leaves

abjad.tools.construct.leaves(pitches, durations, direction='big-endian', tied_rests=False)

Constructs a list of prolated and/or unprolated leaves of length len(durations). The type of the leaves returned depends on the type of the pitches given. Integer pitches create Notes. Tuple pitches create Chords. None pitches create Rests. e.g. pitches = [12, (1,2,3), None, 12] Will create a Note with pitch 12, a Chord with pitches (1,2,3), a Rest and another Note with pitch 12.

  • pitches is a single pitch or a list/tuple of pitches. If the list is

    smaller than that of the durations, the pitches are cycled through.

  • durations is a sinlge duration or a list of durations. The durations

    need not be of form m / 2**n and may be any rational value.

  • direction may be ‘big-endian’ or ‘little-endian’.

    ‘big-endian’ returns list of notes of decreasing duration. ‘little-endian’ returns list of notes of increasing duration.

  • tied_rests: Set to True to return Tied rests. False otherwise.

Previous topic

construct.engender

Next topic

construct.note_train

This Page