The clef object

Type: Dictionary

Keys:

Name Type Required? Description
"class" style class object No An optional style class to use for this element and all child elements.
"color" simple color object No An optional color to be used when rendering this element and all child elements.
"glyph" smufl glyph object No A specific SMuFL glyph name to be used when rendering this clef, e.g. gClefArrowUp. See SMuFL clef glyphs.
"octave" integer (signed) object No The number of octaves by which the pitches normally indicated by the given clef sign should be transposed. Default is zero.
"sign" clef sign object Yes The clef sign.
"staffPosition" staff position object Yes The staff position at which the clef is drawn. For example, a standard G glef is drawn at position -2.

Examples

This object is used in the following examples:

Accidentals, Articulations, Beams, Beams (across barlines), Beams (hooks), Beams (secondary beam breaks), Beams (with inner grace notes), Clef changes, Dotted notes (augmentation dots), Grace note, Grace notes (beamed), Jumps (D.S. al Fine), Jumps (Dal Segno), Key signatures, Multimeasure rests, Multiple layouts, Multiple voices, Octave shifts (8va), Organ layout, Parts, Repeats, Repeats (more than once repeated), Repeats (with alternate endings, advanced), Repeats (with alternate endings, simple), Repeats (with implied start repeat), Rest positions, Slurs, Slurs (for chords), Slurs (incomplete slurs), Slurs (targeting specific notes), Styling elements (basic), Styling via a class (basic), Tempo markings, Three-note chord and half rest, Ties, Time signatures, Tremolos (single-note), Tuplets, Two-bar C major scale, “Hello world”