The clef object
Type: Dictionary
Keys
Name | Type | Required? | Description |
---|---|---|---|
style class | No | An optional style class to use for this element and all child elements. | |
simple color | No | An optional color to be used when rendering this element and all child elements. | |
smufl glyph | No | A specific SMuFL glyph name to be used when rendering this clef, e.g. gClefArrowUp . See SMuFL clef glyphs.We encourage you to use this sparingly. In the case of octave-transposing clefs, it's better to use octave and showOctave rather than just using glyph . |
|
ottava amount or zero | No | The number of octaves by which the sounded pitches normally indicated by the given clef sign should be transposed. Default is zero. | |
boolean | No | Whether the clef's glyph should display an octave offset visually (such as an "8" at the top or bottom of a G clef). This is used together with octave . If octave is set to a non-zero value, showOctave encodes whether the octave offset should be displayed as part of the clef's glyph.If octave is non-zero and showOctave is not provided, showOctave is to be interpreted as true.We encourage you to use showOctave instead of the lower-level glyph , because the former encodes intent. |
|
clef sign | Yes | The clef sign. | |
staff position | Yes | The staff position at which the clef is drawn. For example, a standard G glef is drawn at position -2. |
Parent objects
This object is used by the following parent objects:
- positioned clef: "clef"
Examples
This object is used in the following examples: