ClefEvent
ClefEvent(duration: Duration | None = None, clef: Clef | None = None)Sets the clef for the material that follows: what fixes the meaning of the staff’s lines (in WSMN, a StaffClef: a G, F or C sign on a line, with an optional octave change).
A clef belongs to the line it is in, as a meter does, and governs what follows it there until the next one. None means undefined or undecided. A percussion line takes the percussion clef (symbols.percussion_clef). A clef says nothing about the tones themselves, only about where a renderer puts them on a staff, so a ClefEvent is not a TonalObject and transposing a span leaves it alone.
>>> from openmusickit.systems.wsmn.scoring.symbols import bass_clef_8vb, treble_clef
>>> ClefEvent(clef=treble_clef)
ClefEvent(clef=StaffClef(ClefSign.G, 2))
>>> ClefEvent(clef=bass_clef_8vb).clef.reference_tone
TonalVector((3, 5, -2))
>>> ClefEvent().clef is None
TrueAttributes
| Name | Description |
|---|---|
| meta | |
| id | |
| duration | |
| clef |
Methods
| Name | Description |
|---|---|
__setattr__ |
|
| alter_duration |
__setattr__
__setattr__(name: str, value: Any)alter_duration
alter_duration(operation: Callable[[Duration, Any], Duration], operand: Any)