containertools.rest_half — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# containertools.rest_half

`abjad.tools.containertools.` `rest_half`(container, rested_half, bigger_half, rest_direction='automatic')

  Turn half of the elements in container into rests. Function works by the number of elements in container, and not, for example, by the duration of elements in container.

  Either the leftmost, or rightmost, elements in container may rest; set the ‘rested_half’ keyword to ‘left’ or ‘right’, respectively.

  Measures with 3, 5, 7 or some other odd number of elements read the mandatory ‘bigger_half’ parameter to decide whether more elements on the left, or right, will group together into a half; set the bigger_half keyword to ‘left’, or ‘right’, respectively.

  The optional rest_direction keyword should be set to ‘automatic’, ‘big-endian’ or ‘little-endian’. The helper reads rest_direction only when the duration of new rests to construct is nonassignable, like 5/16 or 9/16.

  Return container.

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »