Staff

class paeonia.Staff(voice, clef='treble', name=None, midi_channel=None, midi_program=None)[source]

Bases: object

A voice together with its score-level presentation metadata.

Parameters:
  • voice (Voice) – Musical material carried by the staff.

  • clef (str, default="treble") – LilyPond clef name. Supported values are "treble", "alto", "tenor", and "bass".

  • name (str | None) – Optional displayed staff name.

  • midi_channel (int | None) – Optional zero-based MIDI channel in the range 0 through 15.

  • midi_program (int | None) – Optional MIDI program in the range 0 through 127.

Raises:
  • TypeError – If a field has an incompatible type.

  • ValueError – If the clef, MIDI channel, or MIDI program is outside its supported range.